httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sl...@locus.apache.org
Subject cvs commit: httpd-docs-1.3/htdocs/manual/misc perf-tuning.html
Date Sun, 05 Nov 2000 19:48:31 GMT
slive       00/11/05 11:48:30

  Modified:    htdocs/manual/misc perf-tuning.html
  Log:
  Some cleanups of perf-tuning.  Nothing content-related is changed.
  Submitted by:	Chris Pepper <pepper@mail.reppep.com>, Joshua Slive
  
  Revision  Changes    Path
  1.22      +44 -19    httpd-docs-1.3/htdocs/manual/misc/perf-tuning.html
  
  Index: perf-tuning.html
  ===================================================================
  RCS file: /home/cvs/httpd-docs-1.3/htdocs/manual/misc/perf-tuning.html,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- perf-tuning.html	2000/09/12 02:29:10	1.21
  +++ perf-tuning.html	2000/11/05 19:48:30	1.22
  @@ -11,11 +11,27 @@
    VLINK="#000080"
    ALINK="#FF0000"
   >
  -<H1>Apache Performance Notes</H1>
  +<!--#include virtual="header.html" -->
  +<H1 align="center">Apache Performance Notes</H1>
   
   <P>Author: Dean Gaudet
   
  -<H3>Introduction</H3>
  +<ul>
  +<li><a href="#introduction">Introduction</a></li>
  +<li><a href="#hardware">Hardware and Operating System Issues</a></li>
  +<li><a href="#runtime">Run-Time Configuration Issues</a></li>
  +<li><a href="#compiletime">Compile-Time Configuration Issues</a></li>
  +<li>Appendixes
  +  <ul>
  +  <li><a href="#trace">Detailed Analysis of a Trace</a></li>
  +  <li><a href="#patches">Patches Available</a></li>
  +  <li><a href="#preforking">The Pre-Forking Model</a></li>
  +  </ul></li>
  +</ul>
  +
  +<hr>
  +
  +<H3><a name="introduction">Introduction</A></H3>
   <P>Apache is a general webserver, which is designed to be correct first, and
   fast second.  Even so, its performance is quite satisfactory.  Most
   sites have less than 10Mbits of outgoing bandwidth, which Apache can
  @@ -40,12 +56,14 @@
   it does some things which slow it down.
   
   <P>Note that this is tailored towards Apache 1.3 on Unix.  Some of it applies
  -to Apache on NT.  Apache on NT has not been tuned for performance yet,
  +to Apache on NT.  Apache on NT has not been tuned for performance yet;
   in fact it probably performs very poorly because NT performance requires
   a different programming model.
   
  -<H3>Hardware and Operating System Issues</H3>
  +<hr>
   
  +<H3><a name="hardware">Hardware and Operating System Issues</a></H3>
  +
   <P>The single biggest hardware issue affecting webserver performance
   is RAM.  A webserver should never ever have to swap, swapping increases
   the latency of each request beyond a point that users consider "fast
  @@ -63,8 +81,10 @@
   HTTP serving completely breaks many of the assumptions built into Unix
   kernels up through 1994 and even 1995.  Good choices include
   recent FreeBSD, and Linux.
  +
  +<hr>
   
  -<H3>Run-Time Configuration Issues</H3>
  +<H3><a name="runtime">Run-Time Configuration Issues</a></H3>
   
   <H4>HostnameLookups</H4>
   <P>Prior to Apache 1.3, <CODE>HostnameLookups</CODE> defaulted to On.
  @@ -225,8 +245,10 @@
   <A HREF="http://www.research.digital.com/wrl/techreports/abstracts/95.4.html"
   >most of the benefits are lost</A>.
   
  -<H3>Compile-Time Configuration Issues</H3>
  +<hr>
   
  +<H3><a name="compiletime">Compile-Time Configuration Issues</a></H3>
  +
   <H4>mod_status and ExtendedStatus On</H4>
   
   <P>If you include <CODE>mod_status</CODE>
  @@ -257,11 +279,11 @@
   	for (;;) {
   	    fd_set accept_fds;
   
  -	    FD_ZERO (&accept_fds);
  +	    FD_ZERO (&amp;accept_fds);
   	    for (i = first_socket; i &lt;= last_socket; ++i) {
  -		FD_SET (i, &accept_fds);
  +		FD_SET (i, &mp;accept_fds);
   	    }
  -	    rc = select (last_socket+1, &accept_fds, NULL, NULL, NULL);
  +	    rc = select (last_socket+1, &amp;accept_fds, NULL, NULL, NULL);
   	    if (rc &lt; 1) continue;
   	    new_connection = -1;
   	    for (i = first_socket; i &lt;= last_socket; ++i) {
  @@ -315,15 +337,15 @@
   	for (;;) {
   	    fd_set accept_fds;
   
  -	    FD_ZERO (&accept_fds);
  +	    FD_ZERO (&amp;accept_fds);
   	    for (i = first_socket; i &lt;= last_socket; ++i) {
  -		FD_SET (i, &accept_fds);
  +		FD_SET (i, &amp;accept_fds);
   	    }
  -	    rc = select (last_socket+1, &accept_fds, NULL, NULL, NULL);
  +	    rc = select (last_socket+1, &amp;accept_fds, NULL, NULL, NULL);
   	    if (rc &lt; 1) continue;
   	    new_connection = -1;
   	    for (i = first_socket; i &lt;= last_socket; ++i) {
  -		if (FD_ISSET (i, &accept_fds)) {
  +		if (FD_ISSET (i, &amp;accept_fds)) {
   		    new_connection = accept (i, NULL, NULL);
   		    if (new_connection != -1) break;
   		}
  @@ -475,7 +497,7 @@
   	    select (s for reading, 2 second timeout);
   	    if (error) break;
   	    if (s is ready for reading) {
  -		if (read (s, junk_buffer, sizeof (junk_buffer)) <= 0) {
  +		if (read (s, junk_buffer, sizeof (junk_buffer)) &lt;= 0) {
   		    break;
   		}
   		/* just toss away whatever is read */
  @@ -528,8 +550,10 @@
   <CODE>-DDYNAMIC_MODULE_LIMIT=0</CODE> when building your server.
   This will save RAM that's allocated only for supporting dynamically
   loaded modules.
  +
  +<hr>
   
  -<H3>Appendix: Detailed Analysis of a Trace</H3>
  +<H3><a name="trace">Appendix: Detailed Analysis of a Trace</a></H3>
   
   Here is a system call trace of Apache 1.3 running on Linux.  The run-time
   configuration file is essentially the default plus:
  @@ -721,7 +745,7 @@
   <CODE>Timeout</CODE>.
   
   <P>It may even be the case that <CODE>mmap</CODE> isn't
  -used on your architecture, if so then defining <CODE>USE_MMAP_FILES</CODE>
  +used on your architecture; if so then defining <CODE>USE_MMAP_FILES</CODE>
   and <CODE>HAVE_MMAP</CODE> might work (if it works then report back to us).
   
   <P>Apache does its best to avoid copying bytes around in memory.  The
  @@ -753,7 +777,7 @@
   are buffered before writing.  At no time does it split a log entry
   across a <CODE>PIPE_BUF</CODE> boundary because those writes may not
   be atomic.  (<EM>i.e.</EM>, entries from multiple children could become mixed
together).
  -The code does it best to flush this buffer when a child dies.
  +The code does its best to flush this buffer when a child dies.
   
   <P>The lingering close code causes four system calls:
   
  @@ -818,7 +842,7 @@
   cost of removing some functionality.
   </UL>
   
  -<H3>Appendix: The Pre-Forking Model</H3>
  +<H3><a name="preforking">Appendix: The Pre-Forking Model</a></H3>
   
   <P>Apache (on Unix) is a <EM>pre-forking</EM> model server.  The
   <EM>parent</EM> process is responsible only for forking <EM>child</EM>
  @@ -857,7 +881,7 @@
   1.3 is multithreaded on NT.  There have been at least two other experimental
   implementations of threaded Apache, one using the 1.3 code base on DCE,
   and one using a custom user-level threads package and the 1.0 code base;
  -neither is available publically.  There is also an experimental port of
  +neither is publicly available.  There is also an experimental port of
   Apache 1.3 to <A HREF="http://www.mozilla.org/docs/refList/refNSPR/">
   Netscape's Portable Run Time</A>, which
   <A HREF="http://www.arctic.org/~dgaudet/apache/2.0/">is available</A>
  @@ -869,5 +893,6 @@
   can continue to support the pre-forking model, and also support various
   threaded models.
   
  +<!--#include virtual="footer.html" -->
   </BODY>
   </HTML>
  
  
  

Mime
View raw message