Process Creation
Prior to Apache 1.3 the
MinSpareServers,
MaxSpareServers, and Start- Servers
settings all had drastic effects on
benchmark results. In particular, Apache required a
“ramp-up” period in order to reach a number of children
sufficient to serve the load being applied. After the initial
spawning of StartServers children, only 1 child
per second would be created to satisfy the
MinSpareServers setting. So a server being
accessed by 100 simultaneous clients, using the default
StartServers of 5, would take on the order of 95
seconds to spawn enough children to handle the load. This works fine
in practice on real-life servers, because they aren’t restarted
frequently. But it does really poorly on benchmarks that might only
run for ten minutes.
The one-per-second rule was implemented in an effort to avoid
swamping the machine with the startup of new children. If the machine
is busy spawning children, it can’t service requests. But it
has such a drastic effect on the perceived performance of Apache that
it had to be replaced. As of Apache 1.3, the code will relax the
one-per-second rule. It will spawn one, wait a second, then spawn
two, wait a second, then spawn four, and it will continue
exponentially until it is spawning 32 children per second. It will
stop whenever it satisfies the MinSpareServers
setting.
This appears to be responsive enough that it’s almost
unnecessary to twiddle the
MinSpareServers
, MaxSpareServers,
and StartServers knobs. When more than 4 children ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access