Nagle's Algorithm

Started by
0 comments, last by hplus0603 19 years, 5 months ago
Hello, I was doing an experiment whereby I was sending acknowledgements from my PC to a remote host and varying the advertised window size with these acknowledgements. My intiital advertised window size was 1500. I increased it to 6000 and therby got 4 packets from the remote host for one acknowledgement. However when I brought the window size down to 1500 with next ack, I did not receive any packet from the remote host. This continued till I had sent four acknowledgements each with an advertised window size of 1500 each ; after which I started receiving the packets from the remote host. Why does this happen ? Is this due to an implementation of Nagle's algorithm or is this due to something else? I had studied that Nagle's algorithm is for small packets, isnt it so ? Thanks , Bikram
Advertisement
That seems correct. If you're saying the window size is 1500, then the remote end can't send until it knows that there are less than 1500 bytes un-acknowledged.

This has nothing to do with Nagle.

When the window size was 6000, the other end sent 6000 bytes, which are un-acknowledged. As you acknowledge 1500 bytes at a time, the un-acked count drops to 4500, then 3000, then 1500, then 0 -- at which point it can send another 1500 bytes.

Similarly, if you kept the window size at 6000, and acknowledged just 1500 bytes, the other end would probably send you another 1500 byte packet.
enum Bool { True, False, FileNotFound };

This topic is closed to new replies.

Advertisement