]> granicus.if.org Git - apache/commitdiff
Documentation rebuild
authorLuca Toscano <elukey@apache.org>
Fri, 19 Feb 2016 14:57:35 +0000 (14:57 +0000)
committerLuca Toscano <elukey@apache.org>
Fri, 19 Feb 2016 14:57:35 +0000 (14:57 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1731252 13f79535-47bb-0310-9956-ffa450edef68

docs/manual/mod/event.html.en
docs/manual/sections.xml.fr
docs/manual/sections.xml.ja
docs/manual/sections.xml.ko
docs/manual/sections.xml.meta
docs/manual/sections.xml.tr

index af3402335d8e9b7658c6d837f405ded39d5b8c08..9a12efc9c3ffbb4a6b9e012c5d654986815d363f 100644 (file)
@@ -154,7 +154,7 @@ of the <code class="directive">AsyncRequestWorkerFactor</code>.</p>
         thread serving the response content can flush the first bytes until <code>EWOULDBLOCK</code>
         or <code>EAGAIN</code> is returned, delegating the rest to the listener. This one in turn
         waits for an event on the socket, and delegates the work to flush the rest of the content
-        to the first idle worker thread. Meanwhile in the latter example (FCGI/CGI/proxed content)
+        to the first idle worker thread. Meanwhile in the latter example (FCGI/CGI/proxied content)
         the MPM can't predict the end of the response and a worker thread has to finish its work
         before returning the control to the listener. The only alternative is to buffer the 
         response in memory, but it wouldn't be the safest option for the sake of the
@@ -231,15 +231,18 @@ of the <code class="directive">AsyncRequestWorkerFactor</code>.</p>
     no worker thread is available to handle new work on established async
     connections.</p>
 
-    <p>To mitigate this problem, the event MPM does two things: Firstly, it
-    limits the number of connections accepted per process, depending on the
-    number of idle request workers. Secondly, if all workers are busy, it will
-    close connections in keep-alive state even if the keep-alive timeout has
-    not expired. This allows the respective clients to reconnect to a
-    different process which may still have worker threads available.</p>
+    <p>To mitigate this problem, the event MPM does two things:</p>
+    <ul>
+        <li>it limits the number of connections accepted per process, depending on the
+            number of idle request workers;</li>
+        <li>if all workers are busy, it will
+            close connections in keep-alive state even if the keep-alive timeout has
+            not expired. This allows the respective clients to reconnect to a
+            different process which may still have worker threads available.</li>
+    </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>
 
@@ -249,13 +252,64 @@ of the <code class="directive">AsyncRequestWorkerFactor</code>.</p>
         <var>number of idle workers</var>)
     </strong></p>
 
-    <p>This means the absolute maximum numbers of concurrent connections is:</p>
+    <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>
+
+
+    <p class="indent"><strong>
+        (<code class="directive"><a href="../mod/mpm_common.html#threadsperchild">ThreadsPerChild</a></code> +
+        (<code class="directive">AsyncRequestWorkerFactor</code> *
+        <var>number of idle workers</var>)) * 
+        <code class="directive"><a href="../mod/mpm_common.html#serverlimit">ServerLimit</a></code>
+    </strong></p>
+
+    <div class="note"><h3>Example</h3>
+    <pre class="prettyprint lang-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</pre>
+
+    </div>
+
+    <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>
         (<code class="directive">AsyncRequestWorkerFactor</code> + 1) *
         <code class="directive"><a href="../mod/mpm_common.html#maxrequestworkers">MaxRequestWorkers</a></code>
     </strong></p>
 
+
+    <div class="note"><h3>Example</h3>
+    <pre class="prettyprint lang-config">ThreadsPerChild = 10 
+ServerLimit = 4
+MaxRequestWorkers = 40
+AsyncRequestWorkerFactor = 2</pre>
+
+
+    <p>If all the processes have all threads idle then: </p>
+
+    <pre class="prettyprint lang-config">idle_workers = 10</pre>
+
+
+    <p>We can calculate the absolute maximum numbers of concurrent connections in two ways:</p>
+    
+    <pre class="prettyprint lang-config">max_connections = (ThreadsPerChild + (AsyncRequestWorkerFactor * idle_workers)) * ServerLimit 
+                = (10 + (2 * 10)) * 4 = 120
+    
+max_connections = (AsyncRequestWorkerFactor + 1) * MaxRequestWorkers 
+                = (2 + 1) * 40 = 120</pre>
+
+    </div>
+
+    <p>Tuning <code class="directive">AsyncRequestWorkerFactor</code> 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 <code class="module"><a href="../mod/mod_status.html">mod_status</a></code>.</p>
+
     <p><code class="directive"><a href="../mod/mpm_common.html#maxrequestworkers">MaxRequestWorkers</a></code> was called
     <code class="directive">MaxClients</code> prior to version 2.3.13. The above value
     shows that the old name did not accurately describe its meaning for the event MPM.</p>
index d9ed9b91b3c3b66947c218af1a8c9e9075388f6a..fd0a5ff5b6a6e89ce8d479865470114b35c1360e 100644 (file)
@@ -3,7 +3,7 @@
 <?xml-stylesheet type="text/xsl" href="./style/manual.fr.xsl"?>
 <!-- French translation : Lucien GENTIS -->
 <!-- Reviewed by : Vincent Deffontaines -->
-<!-- English Revision: 1673563 -->
+<!-- English Revision: 1673563:1731194 (outdated) -->
 
 <!--
  Licensed to the Apache Software Foundation (ASF) under one or more
index 782fad01d31b53b7e041059324c436a07d912596..c42bd133aacdc88139e382cf20be12dc0b066579 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE manualpage SYSTEM "./style/manualpage.dtd">
 <?xml-stylesheet type="text/xsl" href="./style/manual.ja.xsl"?>
-<!-- English Revision: 420990:1673563 (outdated) -->
+<!-- English Revision: 420990:1731194 (outdated) -->
 
 <!--
  Licensed to the Apache Software Foundation (ASF) under one or more
index cb78a587da6f9f1e91ad100475a158ea36e2a84e..9a29e4d83dfd8b2ccccb33fff6b3bd02de6e36fc 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="EUC-KR" ?>
 <!DOCTYPE manualpage SYSTEM "./style/manualpage.dtd">
 <?xml-stylesheet type="text/xsl" href="./style/manual.ko.xsl"?>
-<!-- English Revision: 105989:1673563 (outdated) -->
+<!-- English Revision: 105989:1731194 (outdated) -->
 
 <!--
  Licensed to the Apache Software Foundation (ASF) under one or more
index 4e91a361f4c9f4698194932c5d86cd3242def214..0e839c6dc7f5e0ad058d389e5dfc5a81da065571 100644 (file)
@@ -8,9 +8,9 @@
 
   <variants>
     <variant>en</variant>
-    <variant>fr</variant>
+    <variant outdated="yes">fr</variant>
     <variant outdated="yes">ja</variant>
     <variant outdated="yes">ko</variant>
-    <variant>tr</variant>
+    <variant outdated="yes">tr</variant>
   </variants>
 </metafile>
index 9f2cd4ad18c5c57ac7282dffdeb1839562dc6ac0..a3a383566a676baa994ac85f56d0915ca10a45a2 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE manualpage SYSTEM "./style/manualpage.dtd">
 <?xml-stylesheet type="text/xsl" href="./style/manual.tr.xsl"?>
-<!-- English Revision: 1673563 -->
+<!-- English Revision: 1673563:1731194 (outdated) -->
 <!-- =====================================================
  Translated by: Nilgün Belma Bugüner <nilgun belgeler.gen.tr>
    Reviewed by: Orhan Berent <berent belgeler.gen.tr>