httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tony Finch <>
Subject Re: Working on file bucket
Date Thu, 14 Sep 2000 23:48:55 GMT
Bill Stoddard <> wrote:
>FYI... I have some time to spend on development and I've started working on
>the file bucket.


>The primary challenge here will be to get sendfile working correctly.
>We cannot use sendfile if there are other filters (such as SSL)
>installed in the filter chain.

That should just fall out in the wash. If a file bucket gets all the
way down to the core filter then by definition (the bucket represents
the unmodified contents of a region of the file) it is safe to use

>Need to handle the tradeoff between using mmap, sendfile or send from
>buffers read from a file, etc.

I think it's true that if sendfile is available the core filter should
use it, otherwise it should do the usual bucket read loop like the
chunk filter does with CGIs. I think it is also true that if mmap is
available then b->read() from a file bucket should make it turn into
an mmap bucket, otherwise old-stye read(2) should be used as in pipe
buckets (if necessary leaving the remainder of the file in a second
bucket in a similar way to pipe_read). These rules change slightly
according to the various heuristics that 1.3 uses -- don't use mmap
(sendfile as well?) if the file is smaller than 8KB, and don't mmap
more than 4MB at a time.

en oeccget g mtcaa    f.a.n.finch
v spdlkishrhtewe y
eatp o v eiti i d.

View raw message