From: Luca Toscano Date: Tue, 16 Feb 2016 07:50:59 +0000 (+0000) Subject: Simplified the AsyncRequestWorkerFactor section of mod_event's doc page X-Git-Tag: 2.5.0-alpha~2065 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=583a3ec62cbaab68768e7e992bb0ff3163edd7b9;p=thirdparty%2Fapache%2Fhttpd.git Simplified the AsyncRequestWorkerFactor section of mod_event's doc page git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1730640 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/mod/event.xml b/docs/manual/mod/event.xml index 27b6753a79e..9d2722a3e56 100644 --- a/docs/manual/mod/event.xml +++ b/docs/manual/mod/event.xml @@ -245,7 +245,7 @@ of the AsyncRequestWorkerFactor.

This directive can be used to fine-tune the per-process connection - limit. A process will only accept new connections if the current number of + limit. A process will only accept new connections if the current number of connections (not counting connections in the "closing" state) is lower than:

@@ -255,27 +255,36 @@ of the AsyncRequestWorkerFactor.

number of idle workers)

- Idle connections handled by each process - +

An estimation of the maximum concurrent connections across all the processes given + an average value of idle worker threads can be calculated with: +

-max_connections = ThreadsPerChild + (AsyncRequestWorkerFactor * idle_workers) -ThreadsPerChild = idle_workers + busy_workers - -max_connections = (idle_workers + busy_workers) + (AsyncRequestWorkerFactor * idle_workers) - = busy_workers + (AsyncRequestWorkerFactor + 1) * idle_workers +

+ (ThreadsPerChild + + (AsyncRequestWorkerFactor * + number of idle workers)) * + ServerLimit +

-max_connections = max_idle_connections + busy_workers + Example + -max_idle_connections + busy_workers = - busy_workers + (AsyncRequestWorkerFactor + 1) * idle_workers +ThreadsPerChild = 10 +ServerLimit = 4 +AsyncRequestWorkerFactor = 2 +MaxRequestWorkers = 40 -max_idle_connections = (AsyncRequestWorkerFactor + 1) * idle_workers +idle_workers = 4 (average for all the processes to keep it simple) +max_connections = (ThreadsPerChild + (AsyncRequestWorkerFactor * idle_workers)) * ServerLimit + = (10 + (2 * 4)) * 4 = 72 + -

The absolute maximum numbers of concurrent connections is:

+

When all the worker threads are idle, then absolute maximum numbers of concurrent + connections can be calculared in a simpler way:

(AsyncRequestWorkerFactor + 1) * @@ -283,7 +292,7 @@ max_idle_connections = (AsyncRequestWorkerFactor + 1) * idle_workers

- Example 1 + Example ThreadsPerChild = 10 @@ -310,24 +319,6 @@ max_connections = (AsyncRequestWorkerFactor + 1) * MaxRequestWorkers -

The above example is only related to a theoretical maximum, let's take a look to a more common use case:

- - Example 2 - - -ThreadsPerChild = 10 -ServerLimit = 4 -AsyncRequestWorkerFactor = 2 -MaxRequestWorkers = 40 - -idle_workers = 4 (average for all the processes to keep it simple) - -max_connections = (ThreadsPerChild + (AsyncRequestWorkerFactor * idle_workers)) * ServerLimit - = (10 + (2 * 4)) * 4 = 72 - - - -

Tuning AsyncRequestWorkerFactor requires knowledge about the traffic handled by httpd in each specific use case, so changing the default value requires extensive testing and data gathering from mod_status.

MaxRequestWorkers was called