Note · TCP

Window sizes and the illusion of a slow link

3 September 2026 · 5 min read

A transfer between two hosts with a gigabit link was moving at roughly twenty megabits per second. Neither machine was busy. There was no packet loss worth mentioning. The link was fast, the disks were fast, and the transfer was slow anyway.

The constraint was the receive window. TCP can only have a certain amount of data in flight before it needs an acknowledgment. That amount is bounded by the window and by the bandwidth-delay product: bandwidth multiplied by round-trip time. On a short path, a modest window is enough. On a long path, the same window becomes a hard ceiling, no matter how much capacity the link has.

The arithmetic is simple enough to be useful. A hundred milliseconds of RTT and a one-megabyte window allow roughly eighty megabits per second before acknowledgments become the bottleneck. Increase the RTT and the ceiling drops. Increase the window and it rises, assuming the sender and receiver both support the larger scale factor and nothing in the middle rewrites it.

ss -ti dst 203.0.113.10
# look at cwnd, rwnd, and the rtt sample

I like ss -ti because it shows the connection as the kernel sees it: congestion window, receiver window, RTT estimates, and retransmission counters. If the receiver window is small while the RTT is large, the transfer is doing exactly what the numbers say it should. If the window is large and the congestion window is small, the story is different and probably involves loss or a middlebox.

Window scaling is negotiated during the handshake. A middlebox that strips or rewrites the option can leave both ends believing they agreed to something else. That kind of failure is easy to miss because the connection still works; it just works at a fraction of the expected rate.

The useful lesson is not “make the window bigger.” It is that throughput is a property of the path, not just the pipe. Measure the RTT, look at the actual windows, and check what the middle is doing to the options. A slow transfer is often a correctly behaved connection hitting a limit nobody drew on the diagram.

← All notes