The Runtime Theory

TCP Congestion Window Evolution: Slow Start, AIMD, and the Sawtooth

Watch the TCP congestion window grow exponentially in slow start, shift to additive increase, and halve on loss — the sawtooth that keeps senders fair to the network.

The Runtime Theory Team08 stages

trace / request.md

SLOW START:DOUBLINGSSTHRESH REACHEDADDITIVE INCREASETHREEDUPLICATE ACKSFAST RECOVERY:HALVETIMEOUT:FULL RESETRE-GROW LINEARLYTHE SAWTOOTHREPEATS

readycwnd begins at 10 segments (IW10). Every ACK raises it by one segment, so it doubles every round trip — exponential growth from a cold start.

Congestion control is the sender self-limiting to what the network can actually carry. There is no signal from the path about its capacity — only loss and latency — so the machine probes. Slow start doubles cwnd every round trip until ssthresh, then switches to additive increase: one segment per RTT. The switch is deliberate: exponential growth is fast but reckless, linear growth is slow but safe.

Loss is the only measurement. Three duplicate ACKs mean a single drop — the sender halves and continues. A retransmission timeout means something worse — the sender resets to one segment and climbs again. The resulting sawtooth is the whole design: keep increasing until the network says no, then back off to half, and repeat. That ordering — probe, detect, halve, re-probe — is what makes TCP flows fair to each other and stable against the bottleneck, without a single byte of feedback from the routers in between.