[BUGS] Sysctl knobs for 'naggling' timeout (TCP_NODELAY sockopts not set)
Jerahmy Pocott
quakenet1 at optusnet.com.au
Mon Jun 23 16:40:27 EST 2008
Hey gang.. Umm I guess the subject is a little confusing..
What I'm wondering is if/what sysctl knobs exist for changing the
timeout on 'naggling'...
For those that don't know what the heck I'm talking about, 'naggling'
is what happens to any INET socket you create without the TCP_NODELAY
flag set. Instead of sending data as it's ready the tcp stack tries to
'fill' a whole packet, this works in simple terms by appending the
data together while you already have packets 'in-flight'. So the
network layer either waits until a full packet is ready or until the
other host sends an 'ACK' for all the data you sent previously.
If neither a full packet is created or an 'ACK' is returned it will
time out and sent what ever data is ready. I'm looking for a way to
adjust the time it waits to break a dead-lock situation.
The deadlock happens when the target host is using 'Delayed
ACK' (sysctl net.inet.tcp.delayed_ack). Since the host will NOT 'ACK'
on every packet, but rather wait until it gets x packets then 'ACK'.
So on a socket that didn't set TCP_NODELAY you can end up with high
latency. Some stuff (like samba) let you choose if you want the socket
to use TCP_NODELAY in their config or command line options, but then
you get hit with stuff that won't let you tell it to use the flag and
a host on which you don't have access to disable delayed ACKing on and
it seems the only solution would be to reduce the timeout before it
sends the data, preferably to 0ms..
But looking at the net.inet.tcp knobs, none of them intuitively say to
me they control this =p
So I'm not sure if there is anything I can use to control it...?
More information about the BUGS
mailing list