Commit f739d983 authored by Jim Jagielski's avatar Jim Jagielski
Browse files

Submitted by: Jim Jagielski

Do make the code a bit clearer, some minor #define changes (and
the resultant flow-thru in the docs).

   SAFE_UNSERIALIZED_ACCEPT  ->   SINGLE_LISTEN_UNSERIALIZED_ACCEPT
   HAVE_MMAP                 ->   USE_MMAP_SCOREBOARD
   HAVE_SHMGET               ->   USE_SHMGET_SCOREBOARD


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@79959 13f79535-47bb-0310-9956-ffa450edef68
parent d3716e21
Loading
Loading
Loading
Loading
+2 −2
Changes for docs/manual/misc/FAQ.html: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -15,7 +15,7 @@
  <!--#include virtual="header.html" -->
  <H1 ALIGN="CENTER">Apache Server Frequently Asked Questions</H1>
  <P>
  $Revision: 1.96 $ ($Date: 1997/12/16 16:52:19 $)
  $Revision: 1.97 $ ($Date: 1998/01/22 23:11:48 $)
  </P>
  <P>
  The latest version of this FAQ is always available from the main
@@ -1803,7 +1803,7 @@
  <A HREF="http://www.linuxhq.com/HOWTO/META-FAQ.html"
  >Linux newsgroup/mailing list</A>.
  As a last-resort workaround, you can
  comment out the <CODE>#define HAVE_SHMGET</CODE> definition in the
  comment out the <CODE>#define USE_SHMGET_SCOREBOARD</CODE> definition in the
  <SAMP>LINUX</SAMP> section of
  <SAMP>src/conf.h</SAMP> and rebuild the server.  This will produce
  a server which is slower and less reliable.
+5 −5
Changes for docs/manual/misc/perf-tuning.html: 5 added lines, 5 removed lines.
Original line number Diff line number Diff line
@@ -415,7 +415,7 @@ decrease in requests per second over unserialized single-socket.
But unserialized single-socket showed an extra 100ms latency on
each request.  This latency is probably a wash on long haul lines,
and only an issue on LANs.  If you want to override the single socket
serialization you can define <code>SAFE_UNSERIALIZED_ACCEPT</code>
serialization you can define <code>SINGLE_LISTEN_UNSERIALIZED_ACCEPT</code>
and then single-socket servers will not serialize at all.

<h4>Lingering Close</h4>
@@ -493,8 +493,8 @@ access to, or have been given detailed ports for, it typically is
implemented using shared memory.  The rest default to using an
on-disk file.  The on-disk file is not only slow, but it is unreliable
(and less featured).  Peruse the <code>src/main/conf.h</code> file
for your architecture and look for either <code>HAVE_MMAP</code> or
<code>HAVE_SHMGET</code>.  Defining one of those two enables the
for your architecture and look for either <code>USE_MMAP_SCOREBOARD</code> or
<code>USE_SHMGET_SCOREBOARD</code>.  Defining one of those two enables the
supplied shared memory code.  If your system has another type of
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
@@ -570,7 +570,7 @@ flock(18, LOCK_EX) = 0
</pre></blockquote>

These two calls can be removed by defining
<code>SAFE_UNSERIALIZED_ACCEPT</code> as described earlier.
<code>SINGLE_LISTEN_UNSERIALIZED_ACCEPT</code> as described earlier.

<p>Notice the <code>SIGUSR1</code> manipulation:

@@ -751,7 +751,7 @@ close(3) = 0
which were described earlier.

<p>Let's apply some of these optimizations:
<code>-DSAFE_UNSERIALIZED_ACCEPT -DBUFFERED_LOGS</code> and
<code>-DSINGLE_LISTEN_UNSERIALIZED_ACCEPT -DBUFFERED_LOGS</code> and
<code>Rule STATUS=no</code>.  Here's the final trace:

<blockquote><pre>
+2 −2
Changes for docs/manual/mod/core.html: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -1477,12 +1477,12 @@ about log file placement and

Apache 1.2 and above:<p>

Linux 1.x users might be able to add <code>-DHAVE_SHMGET</code> to
Linux 1.x users might be able to add <code>-DUSE_SHMGET_SCOREBOARD</code> to
the <code>EXTRA_CFLAGS</code> in your <code>Configuration</code>.  This
might work with some 1.x installations, but won't work with all of
them.<p>

SVR4 users should consider adding <code>-DHAVE_SHMGET</code> to the
SVR4 users should consider adding <code>-DUSE_SHMGET_SCOREBOARD</code> to the
<code>EXTRA_CFLAGS</code> in your <code>Configuration</code>.  This
is believed to work, but we were unable to test it in time for 1.2
release.<p>