Fighting with Nagle

Florian Weimer fw at deneb.enyo.de
Fri May 12 20:13:59 UTC 2006


* Aaron Hopkins:

> The easiest fix for the extra latency is to disable Nagle (setsockopt
> TCP_NODELAY) on every TCP connection, but that would still send an extra TCP
> packet unnecessarily.  There are OS-specific hacks to delay sending of
> packets between multiple write()s (like Linux's TCP_CORK), but the cleanest
> and most portable approach would probably be to get NSD to only write() once
> per answer.

There's also writev and sendmsg.  Both support gathering.



More information about the nsd-users mailing list