httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Orton <jor...@redhat.com>
Subject Re: PATCH: lazy initialization of TCP_NODELAY (workaround for 2.6 TCP_CORK problem)
Date Fri, 26 Aug 2005 07:55:24 GMT
On Fri, Aug 26, 2005 at 12:42:19AM -0700, Brian Pane wrote:
> The attached patch delays the setting of TCP_NODELAY on client 
> connections until the first time core_output_filter has to do a 
> writev_it_all() or emulate_sendfile(). My motivation for this is to 
> work around the TCP_NODELAY/TCP_CORK problem in Linux 2.6.  However, 
> it also will save a couple of syscalls for any request that is handled 
> with sendfile(2).

This will actually end up being *more* expensive on 2.6 systems in the 
long run, though, right?  I'm not convinced this is a good idea.  With 
APR changed to allow setting TCP_CORK and TCP_NODELAY at the same time 
with 2.6, it is cheaper to just set TCP_NODELAY once on the listening 
socket and never have to touch it again.

> Note that there was an APR bug that caused TCP_NODELAY to be set on 
> the listener socket at startup as a side-effect of TCP_DEFER_ACCEPT 
> being set.

good catch!

joe

Mime
View raw message