Commit 0b345433 authored by Yann Ylavic's avatar Yann Ylavic
Browse files

mpm_event, mpm_worker: Fix computation of MinSpareThreads' lower bound

according the number of listeners buckets.

We want the number of children processes to be a multiple of the number of
buckets so to optimally accept connections (the system will distribute them
accross all the buckets/listeners anyway, thus children must follow).

For MinSpareThreads, this means that we need neither more nor less than one
thread above 'threads_per_child * (num_buckets - 1)' to achieve this, since
each created child adds threads_per_child workers.

Actually, given that perform_idle_server_maintenance() is called per bucket,
and hence checks 'threads_per_child / num_buckets' for one bucket, let's lower
bound MinSpareThreads to 'threads_per_child * (num_buckets - 1) + num_buckets'.

Previously we used 'threads_per_child * num_buckets' which caused one spurious
child to be created from the very first busy worker thread of each newly added
child.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1737447 13f79535-47bb-0310-9956-ffa450edef68
parent 9526bd0a
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment