]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Simplified the AsyncRequestWorkerFactor section of mod_event's doc page
authorLuca Toscano <elukey@apache.org>
Tue, 16 Feb 2016 07:50:59 +0000 (07:50 +0000)
committerLuca Toscano <elukey@apache.org>
Tue, 16 Feb 2016 07:50:59 +0000 (07:50 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1730640 13f79535-47bb-0310-9956-ffa450edef68

docs/manual/mod/event.xml

index 27b6753a79ea36cd4d27e7954f017a24f24375a3..9d2722a3e565643966c3c0b2eddd0bf88b549608 100644 (file)
@@ -245,7 +245,7 @@ of the <directive>AsyncRequestWorkerFactor</directive>.</p>
     </ul>
 
     <p>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 <strong>process</strong> will only accept new connections if the current number of
     connections (not counting connections in the "closing" state) is lower
     than:</p>
 
@@ -255,27 +255,36 @@ of the <directive>AsyncRequestWorkerFactor</directive>.</p>
         <var>number of idle workers</var>)
     </strong></p>
 
-    <note><title>Idle connections handled by each process</title>
-    <highlight language="config">
+    <p>An estimation of the maximum concurrent connections across all the processes given
+        an average value of idle worker threads can be calculated with:
+    </p>
 
-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 
+    <p class="indent"><strong>
+        (<directive module="mpm_common">ThreadsPerChild</directive> +
+        (<directive>AsyncRequestWorkerFactor</directive> *
+        <var>number of idle workers</var>)) * 
+        <directive module="mpm_common">ServerLimit</directive>
+    </strong></p>
 
-max_connections = max_idle_connections + busy_workers 
+    <note><title>Example</title>
+    <highlight language="config">
 
-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
+    
     </highlight>
     </note>
 
-    <p>The absolute maximum numbers of concurrent connections is:</p>
+    <p>When all the worker threads are idle, then absolute maximum numbers of concurrent 
+        connections can be calculared in a simpler way:</p>
 
     <p class="indent"><strong>
         (<directive>AsyncRequestWorkerFactor</directive> + 1) *
@@ -283,7 +292,7 @@ max_idle_connections = (AsyncRequestWorkerFactor + 1) * idle_workers
     </strong></p>
 
 
-    <note><title>Example 1</title>
+    <note><title>Example</title>
     <highlight language="config">
     
 ThreadsPerChild = 10 
@@ -310,24 +319,6 @@ max_connections = (AsyncRequestWorkerFactor + 1) * MaxRequestWorkers
     </highlight>
     </note>
 
-    <p>The above example is only related to a theoretical maximum, let's take a look to a more common use case:</p>
-
-    <note><title>Example 2</title>
-    <highlight language="config">
-
-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
-    
-    </highlight>
-    </note>
-
     <p>Tuning <directive>AsyncRequestWorkerFactor</directive> 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 <module>mod_status</module>.</p>
 
     <p><directive module="mpm_common">MaxRequestWorkers</directive> was called