View Single Post
Old 23rd November 2005, 00:24
Ovidiu Ovidiu is offline
Senior Member
Join Date: Sep 2005
Posts: 1,269
Thanks: 84
Thanked 25 Times in 21 Posts

thx a lot,

there were some useful links there.

the main thing I learned is that its all about the ram

first of all:

these are my own conclusions after reading some articles about apache2 so treat them carefully, read on your own and don't hold me responsible for any errors but please do correct me if I stated something wrong here.

here are my main settings, maybe someone wants to experiment with that too:

<IfModule prefork.c>
StartServers 5
MinSpareServers 5
MaxSpareServers 10
MaxClients 35
MaxRequestsPerChild 150
Timeout 150
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15
This is on a Celeron 2400MHZ with 512MB RAM

One simple thing to do is to use top, have a look at the average size of your apache2 processes then multiply the number of MaxClients with that number, i.e. my average apache2 process is 12MB*35=420MB of RAM which sounds like a lot, but it is working, as webserving is the main role of this system.

The next thing you should tweak is the MaxRequestsPerChild - my system was initially set to 0 which meant the process nerver dies, setting it to 150 means after 150 of requests that child proces dies and thus prevents for example memory leaks which might let the process grow too fat by killing and then respawning accordingly to the number of spareservers and maxclients you have set.

Could someone else maybe post his setting, together with the machine specs?
I just want to get the most out of my machine and after looking at the stats: h**p:// especially at the apache2 stats I can see that I am stuck with 40 processes of apache2 for a while... does this mean there are clients I can't serve at that moment or does it mean that maybe 10 of those procs are idle (spare servers) ? ...

btw. is there a way to limit the number of mysql children ? I always have a minimum of 12 loaded and they each use 36MB...

Last edited by Ovidiu; 24th November 2005 at 14:17.
Reply With Quote