I'm trying to take advantage of a 4-way machine using the PreforkServer?. While using up to 4 child processes (1 for each cpu), I'd like the server to return to 1 child after load dies down. Specifically I'm using the scgi_fork server. With these settings:
maxSpare=1
maxChildren=4
The number of children jump up to 4 under high load, but the PIDs keep incrementing so I think children are being killed and created while under load. I think that the children should not die until the load drops off.
I get much better performance (100% of 4 cpus) with this setting:
maxSpare=4
maxChildren=4
But then I've got RAM tied up for no reason.
A think that a solution to this is to specify a time to live for excess children. When an excess child has not been used for x seconds, it can be killed. Otherwise it should continue to serve.
Randall - randall at tnr dot cc