httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Pane <>
Subject Re: core_output_filter buffering for keepalives? Re: Apache 2.0 Numbers
Date Tue, 25 Jun 2002 01:05:40 GMT
Bill Stoddard wrote:

>Solve the problem to enable setting aside the open fd just long enough to check for a
>pipelined request will nearly completely solve the worst part (the mmap/munmap) of this
>problem.  On systems with expensive syscalls, we can do browser detection and dynamically
>determine whether we should attempt the pipelined optimization or not. Not many browsers
>today support pipelining requests, FWIW.

A really simple variant of this would be to handle the keepalive
case by just saving the entire brigade (minus the EOS), the same
way we save the brigade currently if it consists of a bunch of
small buckets from mod_include that total less than 8KB.  In the
non-pipelined scenario, the core_output_filter() would be invoked
again almost immediately (when read returned EAGAIN), and from
there its existing logic would handle the sendfile on the saved
file bucket.

(The only catch, of course, is that the file bucket turns into
an mmap bucket during the ap_save_brigade().  We'd have to change
the file bucket setaside implementation to hand off the fd from
the old pool to the new one, the same way we did with mmap buckets
last year.)


View raw message