diff -Naur apache_1.3.6+01-08/ABOUT_APACHE apache_1.3.6+01-09/ABOUT_APACHE --- apache_1.3.6+01-08/ABOUT_APACHE Sat Feb 13 18:30:47 1999 +++ apache_1.3.6+01-09/ABOUT_APACHE Wed Oct 20 16:39:42 1999 @@ -104,7 +104,8 @@ Other major contributors - Howard Fear (mod_include), Florent Guillaume (language negotiation), + Mike Abbott (performance), Howard Fear (mod_include), + Florent Guillaume (language negotiation), Koen Holtman (rewrite of mod_negotiation), Kevin Hughes (creator of all those nifty icons), Rasmus Lerdorf (mod_info, mod_php, mod_php3), diff -Naur apache_1.3.6+01-08/conf/httpd.conf-dist apache_1.3.6+01-09/conf/httpd.conf-dist --- apache_1.3.6+01-08/conf/httpd.conf-dist Thu Sep 2 10:12:04 1999 +++ apache_1.3.6+01-09/conf/httpd.conf-dist Wed Oct 20 16:39:51 1999 @@ -160,7 +160,7 @@ # isn't really needed, but a few (such as Solaris) do have notable leaks # in the libraries. # -MaxRequestsPerChild 30 +MaxRequestsPerChild 0 # # Listen: Allows you to bind Apache to specific IP addresses and/or diff -Naur apache_1.3.6+01-08/htdocs/index.html apache_1.3.6+01-09/htdocs/index.html --- apache_1.3.6+01-08/htdocs/index.html Wed May 20 07:59:42 1998 +++ apache_1.3.6+01-09/htdocs/index.html Wed Oct 20 16:40:02 1999 @@ -47,5 +47,9 @@
+
+
+ +
diff -Naur apache_1.3.6+01-08/htdocs/manual/invoking.html apache_1.3.6+01-09/htdocs/manual/invoking.html --- apache_1.3.6+01-08/htdocs/manual/invoking.html Mon Mar 22 16:17:34 1999 +++ apache_1.3.6+01-09/htdocs/manual/invoking.html Wed Oct 20 16:40:18 1999 @@ -129,6 +129,10 @@
Windows only: signal Apache to restart or shutdown. option is one of "shutdown" or "restart". (Apache 1.3.3 and later). +
-i +
For testing: Do not daemonize (i.e., do not fork and exit on startup). +(Apache 1.3.X and later.) +
-?
Print a list of the httpd options, and then exit (up to Apache 1.3.3. Later version use -h instead). diff -Naur apache_1.3.6+01-08/htdocs/manual/misc/perf-mja.html apache_1.3.6+01-09/htdocs/manual/misc/perf-mja.html --- apache_1.3.6+01-08/htdocs/manual/misc/perf-mja.html +++ apache_1.3.6+01-09/htdocs/manual/misc/perf-mja.html Wed Nov 3 10:28:37 1999 @@ -0,0 +1,409 @@ + + + + + Making Apache Ten Times Faster + + + +

+

[APACHE DOCUMENTATION]

+

+Apache HTTP Server Version 1.3

+

+

+

+Making Apache Ten Times Faster

+

+Mike Abbott - mja@sgi.com

+

+

+I have contributed ten patches to +the Apache Project that together increase the performance of the Apache +HTTP server up to 900%. This document summarizes how to maximize the +performance of Apache using my patches. The measure of performance in +this document is the SPECweb96 +benchmark, which measures only the number of static HTTP/1.0 GET +requests a web server can service per second. This paper assumes a +working knowledge of Apache internals.

+
+The advice that follows may or may not apply to your system and may +increase or decrease your system's performance depending on factors +beyond the scope of this document. Use this guide only in conjunction +with a clear understanding of your performance goals and overriding +needs.
+

+Contents

+ +

+Introduction

+

+The patches + I contributed to the Apache Project modify Apache's source code and +standard configuration files to speed up the processing of HTTP +requests in various ways. Still, Apache must be configured, compiled, +and tuned to achieve the best performance on a given system. The +following sections describe the configurable options relevant for high +performance.

+

+The options fall into three categories: those that control the QSC, +those that control Apache's child processes, and those that control +other things.

+

+Tuning the QSC

+

+The Quick Shortcut Cache (QSC) cuts out +unnecessary processing for requests to cached static content. It sports +a number of configurable options. +Two of these, QSC_HASH_SIZE and QSC_MAX_SIZE, +limit the maximum size of the cache and almost certainly need to be +increased from their default values to provide the maximum benefit for +a given system. A third, QSC_HEADER_GRAIN (which normally +uses the same value as CACHE_ALIGNMENT), regulates +alignment and padding and can improve performance more than you might +think when set correctly. See the QSC +documentation for details on these +options and for instructions on using +the QSC.

+

+Also, the QSC can manage the very large amounts of data enabled by a 64-bit address space although with a slight +performance penalty.

+

+As patched, Apache's standard run-time configuration file httpd.conf + enables the QSC when the mmap_static module is installed. Leave the QSC +on directive as is.

+

+Summary of options in this section:

+ +

+Tuning Child Processes

+

+Under heavy load, a system can spend most of its computing power +creating, destroying, and scheduling Apache +child processes. Eliminating all this overhead allows the system to +spend more of its time processing HTTP requests but reduces Apache's +ability to adapt to a changing load.

+

+As patched, Apache's standard run-time configuration file httpd.conf + removes the limit on the number of requests each child process handles +before terminating itself and forcing the parent Apache process to fork +a replacement. Leave the MaxRequestsPerChild + 0 directive as is.

+

+Choose a number of processes and force Apache always to use that +number, never more or less. Set the MinSpareServers, MaxSpareServers, StartServers, +and MaxClients + options all to the same value and ignore the resulting warning:

+
+server reached MaxClients setting, consider raising the +MaxClients setting
+

+The number you use is up to you but remember, sometimes having fewer +processes runs faster than having more. Start with, say, two per +network interface and increase from there as necessary.

+

+Bind interrupts from network interface devices to specific processors +(distributing them as evenly as possible across all the processors) and +bind the Apache child processes listening to those interfaces to the +same processors using the Listen + directive. Force each child process to listen only to its designated +interface -- and eliminate performance-sapping accept serialization + -- by turning SingleListen + on.

+

+Summary of options in this section:

+ +

+General Tuning

+

+Always compile optimized.

+

+Define SPEED_DAEMON which defines all of these other +tokens:

+ +

+Define the value of LOG_BUFSIZE + to be some multiple of the system's page size, less a few dozen bytes +or so for overhead.

+

+Use only the Common Log Format.

+

+Raise the limit on the number of response bytes written at a time by +defining the value of MMAP_SEGMENT_SIZE to be larger than +the largest cached file -- but not on Linux, where this actually slows +things down!

+

+Make the listen queue size as large as possible using the ListenBacklog + directive.

+

+Summary of options in this section:

+ +

+Example

+

+Here is the configuration I use to achieve maximum SPECweb96 +performance on an SGI Origin200 server running Irix 6.5 with two +processors, two gigabytes of memory, and four 100BaseT network +interfaces. Without any patching or tuning Apache on this system +handles 240 operations per second; with my patches and the following +tuning it handles 2400*.

+
+* These are actual SPECweb96 results and while I believe they are +accurate and meaningful, they have not been submitted to SPEC for +review or publication. The following is for illustrative purposes only +and is not a SPECweb96 disclosure.
+ +

+See also

+ +
+

+Apache HTTP Server Version 1.3

+

+Index

+ + diff -Naur apache_1.3.6+01-08/htdocs/manual/misc/perf-tuning.html apache_1.3.6+01-09/htdocs/manual/misc/perf-tuning.html --- apache_1.3.6+01-08/htdocs/manual/misc/perf-tuning.html Tue Jul 20 22:24:35 1999 +++ apache_1.3.6+01-09/htdocs/manual/misc/perf-tuning.html Wed Nov 3 10:28:37 1999 @@ -39,6 +39,13 @@ performance out of Apache's current model, and want to understand why it does some things which slow it down. +

Mike Abbott from SGI has increased Apache's performance ten-fold for +static HTTP GET requests such as those issued by the SPECweb96 benchmark. See +his tuning document and SGI's Web Server Performance Tuning +Guide for more information. +

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, in fact it probably performs very poorly because NT performance requires diff -Naur apache_1.3.6+01-08/htdocs/manual/misc/perf.html apache_1.3.6+01-09/htdocs/manual/misc/perf.html --- apache_1.3.6+01-08/htdocs/manual/misc/perf.html Mon Mar 22 16:17:45 1999 +++ apache_1.3.6+01-09/htdocs/manual/misc/perf.html Wed Nov 3 10:28:37 1999 @@ -33,6 +33,7 @@

  • BSD-based (BSDI, FreeBSD, etc)
  • Digital UNIX
  • HPUX +
  • SGI IRIX
  • Linux
  • Solaris
  • SunOS 4.x @@ -73,6 +74,15 @@
  • We have some newsgroup postings on how to tune Digital UNIX 3.2 and 4.0. + +


    +

    +IRIX +

    + +See Mike Abbott's performance tuning +document and SGI's Web Server +Performance Tuning Guide.


    diff -Naur apache_1.3.6+01-08/htdocs/manual/mod/mod_mmap_static.html apache_1.3.6+01-09/htdocs/manual/mod/mod_mmap_static.html --- apache_1.3.6+01-08/htdocs/manual/mod/mod_mmap_static.html Thu Sep 2 11:40:28 1999 +++ apache_1.3.6+01-09/htdocs/manual/mod/mod_mmap_static.html Wed Oct 20 16:41:09 1999 @@ -64,6 +64,10 @@ is that this check would need an extra stat() every time which is a waste and against the intent of I/O reduction.

    +

    + Note that mapping a large number of files greatly increases server + start-up and restart time. +

    Directives