httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Ames <grega...@apache.org>
Subject [PATCH] Sendfile API compatibility breakage
Date Thu, 06 Feb 2003 21:29:38 GMT
Between 2.0.43 and 2.0.44, the performance of SPECweb99 standard dynamic GETs 
has degraded about 7%.  Static files are fine, and ab benchmarks of small 
dynamic requests are also fine.  oprofile + strace shows that the difference 
with the SPEC dynamic requests is that sendfile is no longer used in .44.

The problem is caused by the APR_SENDFILE_ENABLED flag.  If your 
generator/handler does not explicitly set that flag at apr_file_open() time, the 
core_output_filter won't use sendfile in .44 or beyond, violating the principle 
of least astonishment.

The following patch restores API compatibility for non-core modules.  It 
reverses the polarity of the flag so that you get the old behavior unless your 
module takes explicit action to invoke the new behavior.  The EnableSendfile 
On/Off directive still works as documented, and SPECweb99 performance is back to 
where it should be.

Greg

Mime
View raw message