Take the 2-minute tour ×

In Apache / cPanel, I can set the number MinSpareServers and MaxSpareServers. But the user of idle process is nobody.

I am running SuPHP , and PHP is running under CGI. So, If I increase Min / Max spareServer number for my busy site, will the it effect with CGI/SuPHP ? or it only help increase speed for DSO under nobody?

( I am using Nginx as Proxy to handle static files )

If I can search this question on Google, I don't need to ask here.

share|improve this question

1 Answer 1

From what I know, the number of "spare" servers is, as the name suggests, the number of worker processes the apache server is preparing in advance to serve future requests.. (I'm assuming an "MPM-prefork" configuration here)

It is quite difficult to say in general if it will give a boost or make the server hog, since it depends on a number of factors: the kind of activity the server does, on the usage pattern, the number and duration of connections, memory size required to process each request, keepalive settings, etc...

As a general rule consider that having too much spare servers is a waste, since you'll have your apache using memory to keep ready a number of processes, just in case they are needed, even if they are not needed, maybe reduncing the memory available to the running processes.

On the other hand, having too few spare servers forces clients to wait for the apache process to create a new one to handle the request, have it up and running and then pass the connection to it so it can go on working it..

Bottom line: youl'll probably have to tweak more parameters than the two you mentioned, and you'll have to balance them by figuring out which settings are best for your situation.

Just to mention it, since you'll might find it useful, check out the "server status" page (you can see it also using the apachectl from command line, look on the man pages): it will show you a lot of details about the state of the running processes, so you can judge if you have too many or too few slots serving requests.

Also check if your usage pattern would benefit from a keep-alive, so that short and close-in-time requests from the same client get served by the same worker process, without having to settle a new connection on each request. Don't push too much on keepalive duration, anyway, otherwise the worker process will have to wait a lot before accepting a new client, and you'll eventually run out of free slots to serve new requests..

As you can see, there's a lot of space for tweaking, but the reason is simple: each situation is different, so you have to know which knobs to turn and then try a bit..


[edit] Here is the link where Min/MaxSpareServers Directives are described in the official Apache2.2 documentation.

MaxSpareServers Directive


MinSpareServers Directive


In the same page there is a good description of what the mechanics are:



share|improve this answer
of course, most of the reasoning is related to what is being served dynamically by apache, which is often the biggest part.. Static files serving is a simpler task, as compared to that, so I didn't take it in account –  Luke Jun 5 '13 at 22:13

Your Answer


