TCP Window Size Scaling

Hello Irfan

Let me try to clarify some of these concepts for you.

The window size is not really a buffer. Although it is sometimes called that, it can be misleading. A more appropriate description would be that the window size is the number of bytes the receiver expects to receive before sending an acknowledgment.

Not quite. The window size grows exponentially to improve the efficiency of TCP transmissions. The more bytes you send before each acknowledgment reduces the amount of overhead needed, thus improving efficiency.

Now when does slow start take place? Not when the “receive buffer” is saturated (because window size doesn’t really have a saturation point, and this is why it’s better not to think of it as a buffer). Slow start takes place whenever segments are lost. This is typically due to congestion on the network or due to the receiver not being able to handle the rate at which segments are arriving.

When the loss of a segment is detected (this is done using TCP’s SEQ and ACK numbers), slow start kicks in.

Now just a note on terminology here, when segments are lost, global synchronization does not take place. TCP slow start takes place for a that single TCP session where segment loss was detected not for all TCP sessions. The phenomenon of TCP global synchronization is something that happens when there are many TCP sessions experiencing similar packet losses due to congestion on interfaces used by multiple TCP sessions. When this occurs, they become synchronized in their slow start operations resulting in global synchronization of slow start. This is an undesirable phenomenon and that’s why Random Early Detection is used to avoid it.

Now the window scaling factor is actually found within the Options section of the TCP header. When present, it is multiplied by the number found in the 16-bit Window field to get the final window size. Details of this value can be found in RFC7323 where it is clearly defined. The result is a much larger possible window size, which results in an increase in efficiency.

I hope this has been helpful!