Document the conflict between compression and sendfile,
authorkkolinko <kkolinko@13f79535-47bb-0310-9956-ffa450edef68>
Mon, 17 Jan 2011 11:55:58 +0000 (11:55 +0000)
committerkkolinko <kkolinko@13f79535-47bb-0310-9956-ffa450edef68>
Mon, 17 Jan 2011 11:55:58 +0000 (11:55 +0000)
as was discussed on users@
http://markmail.org/thread/bp46zusxjsqqxydr

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1059897 13f79535-47bb-0310-9956-ffa450edef68

webapps/docs/config/http.xml

index 4f819c5..55ea85a 100644 (file)
       the content-length is not known and compression is set to "on" or more
       aggressive, the output will also be compressed. If not specified, this
       attribute is set to "off".</p>
+      <p><em>Note</em>: There is a tradeoff between using compression (saving
+      your bandwidth) and using the sendfile feature (saving your CPU cycles).
+      If the connector supports the sendfile feature, e.g. the NIO connector,
+      using sendfile will take precedence over compression. The symptoms will
+      be that static files greater that 48 Kb will be sent uncompressed.
+      You can turn off sendfile by setting <code>useSendfile</code> attribute
+      of the connector, as documented below, or change the sendfile usage
+      threshold in the configuration of the
+      <a href="../default-servlet.html">DefaultServlet</a> in the default
+      <code>conf/web.xml</code> or in the <code>web.xml</code> of your web
+      application.
+      </p>
     </attribute>
 
     <attribute name="compressionMinSize" required="false">