Hi,

 I have the task of reviewing httpd settings, in particular, for 'MaxClients' . 
The server I am looking at has both worker and prefork running (on different 
ports for different jobs). For worker MPM, the config had been set by a 
previous admin to have 5000 MaxClients with ServerLimit of 50 and 
ThreadsPerChild of 100. It will start all 50 servers on startup (StartServers), 
so there is a pool of 5000 workers immediately available. The server itself has 
12GB of RAM and 8 hyperthreaded 2.93 Ghz cores. I have been examining RSS of 
each httpd worker child process, and I noticed that the size varies quite a 
bit. The first 10 or so httpd processes use between 20 to 100MB of resident 
memory, whereas the rest use about 11MB. There are around 600 workers in use 
actively serving connections (from server-status), so I assume that the child 
processes with the higher resident mem counts are those that are actively 
serving clients. Am I also correct in assuming, for maximum memory efficiency
 , that httpd tends to serve clients from one child until that child has used 
all its threads before serving from another child process? Anyway, if the 
foregoing assumptions are correct, my guess is that if each child was busy, it 
would have an RSS of around 100MB, and so with 50 children with 100 active 
threads each serving a connection, that should make around 5GB maximum. On the 
other hand, the prefork processes use around 10MB each, so I am thinking I 
could go to 500 MaxClients, leaving around 2GB for the OS and other sundry 
processes on the same host.

 Sound reasonable?

 Cheers,

 -Cam

Reply via email to