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
