Ben Reser <email@example.com> wrote on 01/11/2013 01:45:43 PM:
> From: Ben Reser <firstname.lastname@example.org>
> To: Zhe Zhang/Watson/IBM@IBMUS,
> Cc: email@example.com
> Date: 01/11/2013 01:46 PM
> Subject: Re: Question about httpd memory buffer alignment
> On Fri, Jan 11, 2013 at 7:28 AM, Zhe Zhang <firstname.lastname@example.org> 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.
Hi Ben, thank you for the reply. I have disabled mmap and sendfile options. I'm getting 8192 bytes buffers; so the size is fine, but I want the starting address of the buffer to be 4K-aligned too. Now it seems aligned at 8 bytes boundary (xxxxx8 instead of xxxx000).
> 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
> 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 directiveto httpd.