[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Missing APR_BUFFERED flag on file open?

From: Greg Stein <gstein_at_lyra.org>
Date: 2005-11-07 01:33:24 CET

On Thu, Nov 03, 2005 at 02:20:12PM +0000, Julian Foad wrote:
>...
> Hmm. What exactly is the benefit of this flag? Looking at the code, I see
> it causes APR to do its own buffering on top of what the C run-time library
> and/or OS already do. This presumably allows greater read/write efficiency

As ghudson points out, APR isn't using stdio, but the raw calls.

>...
> Searching the web, I found an email discussion in 2000 questioning whether
> the buffering code is really wanted. Apache had httpd stopped using it,
> which casts doubt on its value.

Apache is writing into sockets where something like TCP_CORK will
effectively buffer at the OS level. Or it could simply be using
sendfile() to copy directly from a file to a socket, avoiding
individual reads anyways. I wouldn't read too much into the httpd
example.

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Nov 7 01:31:01 2005

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.