issue with the Nagle algorithm (TCP_NODELAY)

From: Kantor Zsolt
Date: Thu Nov 01 2007 - 13:01:19 EST


Hi,I'm working on some server/client application,and I have encountered some problems with
TCP_NODELAY (disabling the Nagle algorithm).if I disable the Nagle algorithm (TCP_NODELAY) and I
try to send 4 byte in TCP packets (in a loop) for instance, some packets still wait until reached
the MSS (my case 1440 bytes) and only after that are sent to the destination, why is this ? If the
Nagle algorithm is enabled (by default) all works fine, packets are sent after the MSS is reached,
but when Nagle algorithm is disabled the first 2 packets are sent with 4 bytes of data (in this
case) after that about 6 packets with maximum capacity (MMS) after that another 3 packets with 4
bytes . . . and so on the process repeats.Why is this ? Because If I disable the Neagle
algorithm (with TCP_NODELAY) in a normal situation all sent packets should go out with the
specified data size (I'm using a 2.6.22 kernel)

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html