httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject cvs commit: httpd-2.0/docs/manual/misc perf-tuning.xml
Date Mon, 14 Oct 2002 18:25:07 GMT
wrowe       2002/10/14 11:25:07

  Modified:    docs/manual/mod core.xml
               docs/manual/misc perf-tuning.xml
  Log:
    Document EnableSendfile.  I'm presuming that directives.html* and
    quick_reference.html* are now autogenerated.  Could someone run the
    xml builder and commit the compiled results?
  
  Revision  Changes    Path
  1.36      +59 -0     httpd-2.0/docs/manual/mod/core.xml
  
  Index: core.xml
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/docs/manual/mod/core.xml,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- core.xml	9 Oct 2002 01:16:06 -0000	1.35
  +++ core.xml	14 Oct 2002 18:25:06 -0000	1.36
  @@ -642,6 +642,65 @@
       <example>
         EnableMMAP off
       </example>
  +
  +    <p>For NFS mounted files, this feature may be disabled explicitly for
  +    the offending files by specifying:</p>
  +
  +    <example>
  +      &lt;Directory "/path-to-nfs-files"&gt;
  +            EnableMMAP off
  +      &lt;/Directory&gt;
  +    </example>
  +</usage>
  +</directivesynopsis>
  +
  +<directivesynopsis>
  +<name>EnableSendfile</name>
  +<description>Use the kernel sendfile support to deliver files to the client</description>
  +<syntax>EnableSendfile on|off</syntax>
  +<default>EnableSendfile on</default>
  +<contextlist><context>server config</context><context>virtual host</context>
  +<context>directory</context><context>.htaccess</context>
  +</contextlist>
  +<override>FileInfo</override>
  +
  +<usage>
  +    <p>This directive controls whether the httpd may use the sendfile
  +    support from the kernel to transmit file contents to the client.
  +    By default, when the handling of a request requires no access
  +    to the data within a file -- for example, when delivering a
  +    static file -- Apache uses sendfile to deliver the file contents
  +    without ever reading the file if the OS supports it.</p>
  +
  +    <p>This sendfile mechanism avoids seperate read and send operations,
  +    and buffer allocations.  But on some platforms or within some
  +    filesystems, it is better to disable this feature to avoid 
  +    operational problems:</p>
  +
  +    <ul>
  +    <li>Some platforms may have broken sendfile support that the build
  +    system did not detect, especially if the binaries were built on
  +    another box and moved to such a machine with broken sendfile support.</li>
  +    <li>With an NFS-mounted <directive module="core">DocumentRoot</directive>,
  +    the kernel may be unable to serve the network file through 
  +    it's own cache.</li>
  +    </ul>
  +
  +    <p>For server configurations that are vulnerable to these problems,
  +    you should disable memory-mapping of delivered files by specifying:</p>
  +
  +    <example>
  +      EnableSendfile off
  +    </example>
  +
  +    <p>For NFS mounted files, this feature may be disabled explicitly for
  +    the offending files by specifying:</p>
  +
  +    <example>
  +      &lt;Directory "/path-to-nfs-files"&gt;
  +            EnableSendfile off
  +      &lt;/Directory&gt;
  +    </example>
   </usage>
   </directivesynopsis>
   
  
  
  
  1.2       +33 -0     httpd-2.0/docs/manual/misc/perf-tuning.xml
  
  Index: perf-tuning.xml
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/docs/manual/misc/perf-tuning.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- perf-tuning.xml	22 Sep 2002 20:04:12 -0000	1.1
  +++ perf-tuning.xml	14 Oct 2002 18:25:07 -0000	1.2
  @@ -94,6 +94,7 @@
           <directive module="mod_dir">DirectoryIndex</directive>
           <directive module="core">HostnameLookups</directive>
           <directive module="core">EnableMMAP</directive>
  +        <directive module="core">EnableSendfile</directive>
           <directive module="core">KeepAliveTimeout</directive>
           <directive module="prefork">MaxSpareServers</directive>
           <directive module="prefork">MinSpareServers</directive>
  @@ -282,6 +283,38 @@
         should use <code>EnableMMAP off</code> to disable the memory-mapping
         of delivered files. (Note: This directive can be overridden on
         a per-directory basis.)</p>
  +
  +    </section>
  +
  +    <section>
  +
  +      <title>Sendfile</title>
  +
  +      <p>In situations where Apache 2.0 can ignore the contents of the file
  +      to be delivered -- for example, when serving static file content -- 
  +      it normally uses the kernel sendfile support the file if the OS 
  +      supports the <code>sendfile(2)</code> operation.</p>
  +
  +      <p>On most platforms, using sendfile improves performance by eliminating
  +      separate read and send mechanics.  However, there are cases where using
  +      sendfile can harm the stability of the httpd:</p>
  +
  +      <ul>
  +        <li>
  +          <p>Some platforms may have broken sendfile support that the build
  +          system did not detect, especially if the binaries were built on
  +          another box and moved to such a machine with broken sendfile support.</p>
  +        </li>
  +        <li>
  +          <p>With an NFS-mounted files, the kernel may be unable 
  +          to reliably serve the network file through it's own cache.</p>
  +        </li>
  +      </ul>
  +
  +      <p>For installations where either of these factors applies, you
  +      should use <code>EnableSendfile off</code> to disable sendfile
  +      delivery of file contents. (Note: This directive can be overridden 
  +      on a per-directory basis.)</p>
   
       </section>
   
  
  
  

Mime
View raw message