apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Reser <...@reser.org>
Subject Re: Question about httpd memory buffer alignment
Date Fri, 11 Jan 2013 18:45:43 GMT
On Fri, Jan 11, 2013 at 7:28 AM, Zhe Zhang <zhezhang@us.ibm.com> wrote:
> I would like httpd to use 4K-aligned buffers so that I can do direct I/O on
> the html files being served. Could anyone tell me which file I need to
> modify? I've already changed APR_BUCKET_BUFF_SIZE to 8192 so at least the
> buffer size is multiple of 4K.

If that isn't doing what you want then there are two possible places
that the read is happening.

1) Memory mapping is enabled and then the file is read by the kernel
via the mmap system call.  See file_make_mmap() in APR's
buckets/apr_buckets_file.c.

You can disable this with EnableMMAP off configuration directive to httpd.

2) Sendfile support is enabled and then the file is read by the kernel
via the sendfile system call.  See send_brigade_nonblocking() in
httpd's server/core_filters.c.

You can disable this with EnableSendfile off configuration directive to httpd.

Mime
View raw message