Tuning the Apache MaxClients parameter
One thing that can have a really drastic effect on a large site using Apache, is the value assigned to the MaxClients parameter.
This parameter defines how many simultaneous request can be served. Any connection request from browsers that come in after that will be queued.
Apache prefork, StartServers, MaxSpareServers and MinSpareServers
In the most common case, you will be using Apache in the prefork mode, meaning one process per connection, with a pool of processes pre-forked to standby for connections. The number of spare processes is defined by the values MaxSpareServers, MinSpareServers, while the number to start is defined by StartServers.
Maxclients default
By default, the MaxClients parameter has a compiled in hard limit of 256. This can be changed by recompiling Apache however. Some distributions, or hosting companies raise this limit to a very high value, such as 512 or even 1024 in order to cope with large loads.
While this makes sense when the web server is serving static content (plain HTML, images, …etc.), it can be detrimental to a dynamic web application like Drupal. So often, we have clients calling because their web server has grind to a halt, and the reason would be a too high MaxClients value. Read more…