httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <dgau...@arctic.org>
Subject Re: a page about apache performance
Date Fri, 12 Sep 1997 22:42:31 GMT
Thanks for all the comments.  I just made a few tweaks to it.  I do plan
to put it into the Apache tree at some point.

Dean

--- perf.html	1997/09/12 22:26:11	1.1
+++ perf.html	1997/09/12 22:41:05	1.2
@@ -50,7 +50,7 @@
 a general guideline is to always apply the latest vendor TCP/IP patches.
 HTTP serving completely breaks many of the assumptions built into Unix
 kernels up through 1994 and even 1995.  Good choices include
-recent FreeBSD, Linux, and Solaris.
+recent FreeBSD, and Linux.
 
 <h3>Run-Time Configuration Issues</h3>
 
@@ -63,7 +63,8 @@
 <code>deny from domain</code> directives then you will pay for a
 double reverse DNS lookup (a reverse, followed by a forward to make sure
 that the reverse is not being spoofed).  So for the highest performance
-avoid using these directives.
+avoid using these directives (it's fine to use IP addresses rather than
+domain names).
 
 <p>Note that it's possible to scope the directives, such as within
 a <code>&lt;Location /server-status&gt;</code> section.  In this
@@ -421,7 +422,7 @@
 for your architecture and look for either <code>HAVE_MMAP</code> or
 <code>HAVE_SHMGET</code>.  Defining one of those two enables the
 supplied shared memory code.  If your system has another type of
-shared memory then eidt the file <code>src/main/http_main.c</code> and
+shared memory then edit the file <code>src/main/http_main.c</code> and
 add the hooks necessary to use it in Apache.  (Send us back a patch
 too please.)
 
@@ -430,6 +431,15 @@
 in really poor and unreliable behaviour of earlier versions of Apache
 on Linux.
 
+<h4><code>DYNAMIC_MODULE_LIMIT</code></h4>
+
+<p>If you have no intention of using dynamically loaded modules
+(you probably don't if you're reading this and tuning your
+server for every last ounce of performance) then you should add
+<code>-DDYNAMIC_MODULE_LIMIT=0</code> when building your server.
+This will save RAM that's allocated only for supporting dynamically
+loaded modules.
+
 <h3>Appendix: Detailed Analysis of a Trace</h3>
 
 Here is a system call trace of Apache 1.3 running on Linux.  The run-time
@@ -523,6 +533,18 @@
 
 <p>Note that it is theoretically possible to eliminate all three of
 these calls.  But in rough tests the gain proved to be almost unnoticeable.
+
+<p>In order to implement virtual hosts, Apache needs to know the
+local socket address used to accept the connection:
+
+<blockquote><pre>
+getsockname(3, {sin_family=AF_INET, sin_port=htons(8080), sin_addr=inet_addr("127.0.0.1")},
[16]) = 0
+</pre></blockquote>
+
+It is possible to eliminate this call in many situations (such as when
+there are no virtual hosts, or when <code>Listen</code> directives are
+used which do not have wildcard addresses).  But no effort has yet been
+made to do these optimizations.
 
 <p>Apache turns off the Nagle algorithm:
 



Mime
View raw message