[e2e] Clarification needed on delayed acks and sliding window protocol

Craig Partridge craig at aland.bbn.com
Fri Sep 24 14:38:05 PDT 2004


In message <200409242019.i8OKJZJ00987 at boreas.isi.edu>, "dissolved" writes:

>1. The nagle algorithm is mostly used on interactive sessions. Which means,
>we wont see it on stuff like FTP transfers.  What we WILL see, while using
>FTP transfers, is TCP's sliding window protocol. Am I right so far?
>
> 
>
>Now, sliding window protocol looks something like this on a sniffer
>
>Host A   -------> host B   (1k bytes of data)
>
>Host A   ------>  host B    (1k bytes of data)
>
>Host A   <-----   -Host B            (ack)
>
>Correct?

Yes (assuming 1KB is the MSS).  Note the Nagle algorithm could be on in
this case (indeed, is highly likely to be on, as the FTP application may
not be writing data in 1KB chunks, and Nagle ensures that maximum sized
segments get sent).

>2. Is the delayed acknowledgement algorithm used in conjunction with the TCP
>sliding window protocol?  I had heard that when the sliding window protocol
>is used, the delayed ACK timer never has a chance to go off.  

The answer is subtle.  The rule is you delay an ack unless you've received
2MSS's worth of data, in which case you ack immediately.

So, during those times in the TCP connection that less than two segments
are in flight, or in which you have an odd number of segments in flight
(so the last one arrives alone and has to wait for a delayed ack)

>3. Is the nagle algorithm used in conjunction with the delayed ack
>algorithm?

Yes, they are independent.

>4. What determines if the nagle algorithm, or sliding window protocol will
>be used in a session?  The application layer?  The amount of data being
>transferred?  

Sliding window is always in effect.  Nagle is on or off depending on
what you've set for your connection.

Craig


More information about the end2end-interest mailing list