Linux – Fine tunning of Apache 2 MPM Prefork module parameters

apache-2.2linux

I am running Apache 2 on a Linux Debian machine (Kernel 2.6, Debian 5) with 3GB of RAM.
This server should handle approximately 200 Million requests per 24 hours.
Can anyone tell me what should be the values of the following mpm_prefork parameters that can suite this load ?
The parameters I am seeking to set are:

  1. ServerLimit
  2. StartServers
  3. MinSpareServers
  4. MaxSpareServers
  5. MaxClients
  6. MaxRequestsPerChild

I would also like to know what should be the value of: MaxKeepAliveRequests parameters.

10x in advance

Best Answer

You are going to run out of ram before you will be able to server a Million requests. How large are you apache client processes? I bet over 10MB (probably 25MB). You server could probably only handle 250 clients if the clients were only 10MB.

Might try lighttpd with fast-cgi.

To answer you question you would need to edit the mpm.conf files /etc/apache2/modules.d/00_mpm.conf for me, but im on gentoo so it will be a bit diffrent depending on the distro of linux you are using. But in that config there is a secion for prefork

Here is mine for a server with 12Gb of ram. (and we load balance the sites of 20 identical servers)

<IfModule mpm_prefork_module>
        StartServers            100
        MinSpareServers          5
        MaxSpareServers         200
        ServerLimit             375
        MaxClients              375
        MaxRequestsPerChild      0
</IfModule>