See also linux tcp receiver tuning for more details.
https://networklessons.com/cisco/ccnp-route/tcp-window-size-scaling/ has real life illustration using wireshark.
- 1) SWS (sliding window size) = amount of transmitted but unacknowledged bytes, a fluctuating control variable in the sender process, like a fluctuating “inventory level“.
- 2) AWS = amount of free space on receive buffer
- … I think these two things are related. The sender adjusts SWS based on the feedback of AWS. SWS should be smaller than AWS always.
- SWS is a concept; AWS is a TCP header field
- receive buffer size — is also sometimes referred as window size but perhaps incorrectly
- receiver/sender — only these players control the AWS, not the intermediate routers etc.
- Original of “Window” — sliding window
- too large — large AWS is always set based on large receive buffer
- heavy penalty in retransmission. See https://www.auvik.com/media/blog/tcp-window-size/
- memory hog if multiple large sockets
- lengthy tcp_collapse() can hurt performance. See horror story https://blog.cloudflare.com/the-story-of-one-latency-spike/
- too small — underutilized bandwidth. As explained in linux tcp buffer^AWS tuning, high bandwidth connections should use larger AWS.