7.3TCP congestion control
The idea
TCP controls how fast it sends with the congestion window cwnd. It starts small, doubles every RTT in slow start, then grows by one MSS per RTT, and cuts back when it sees loss.
Think of it like this: Merging into traffic: you start slowly, speed up fast, then creep up once you feel resistance, and brake hard when you hit a jam.
Why it exists
Computing the window after k RTTs is one of the most repeated transport numericals.
How it works
- Start cwnd = 1 MSS. Below ssthresh: double each RTT.
- At or above ssthresh: +1 MSS per RTT.
- Timeout: ssthresh = cwnd/2, cwnd = 1 MSS.
- Three duplicate ACKs: Tahoe as a timeout; Reno sets cwnd = ssthresh = cwnd/2.
Worked example: cwnd = 12 MSS when a timeout occurs. What is cwnd in the third RTT afterwards?
ssthresh = 6, cwnd 1 → 2 → 4 (slow start; GATE 2024).
Now play with it
- →Set the timeout at RTT 8 with ssthresh 8 and read the table.
- →Switch Tahoe to Reno for the triple duplicate ACK.
| RTT | cwnd | ssthresh | phase | event after this RTT |
|---|---|---|---|---|
| 1 | 1 | 8 | slow start | |
| 2 | 2 | 8 | slow start | |
| 3 | 4 | 8 | slow start | |
| 4 | 8 | 8 | congestion avoidance | |
| 5 | 9 | 8 | congestion avoidance | |
| 6 | 10 | 8 | congestion avoidance | |
| 7 | 11 | 8 | congestion avoidance | |
| 8 | 12 | 8 | congestion avoidance | timeout: ssthresh = 6, cwnd = 1 |
| 9 | 1 | 6 | slow start | |
| 10 | 2 | 6 | slow start | |
| 11 | 4 | 6 | slow start | |
| 12 | 6 | 6 | congestion avoidance | |
| 13 | 7 | 6 | congestion avoidance | |
| 14 | 8 | 6 | congestion avoidance | 3 dup ACKs (Reno): ssthresh = cwnd = 4 |
| 15 | 4 | 4 | congestion avoidance | |
| 16 | 5 | 4 | congestion avoidance | |
| 17 | 6 | 4 | congestion avoidance | |
| 18 | 7 | 4 | congestion avoidance | |
| 19 | 8 | 4 | congestion avoidance | |
| 20 | 9 | 4 | congestion avoidance |
Start at 1 MSS. Below ssthresh the window doubles every RTT (slow start); at or above it grows by 1 MSS per RTT (congestion avoidance). Timeout: ssthresh = cwnd/2 and cwnd = 1. Three duplicate ACKs: Tahoe restarts at 1, Reno halves and continues (fast recovery).
Check yourself
A TCP sender has cwnd = 20 MSS when a timeout occurs. The new ssthresh and cwnd are
Exam notes (the dense version)
The sender keeps cwnd and sends min(cwnd, rwnd). Slow start: cwnd starts at 1 MSS and doubles every RTT (+1 MSS per ack) until it reaches ssthresh. Congestion avoidance: +1 MSS per RTT (AIMD, additive increase). On a timeout: ssthresh = cwnd/2, cwnd = 1 MSS, back to slow start. On 3 duplicate ACKs: Tahoe acts as for a timeout; Reno halves (ssthresh = cwnd = cwnd/2) and uses fast recovery. Time to climb back: count RTTs, one per doubling or +1 step.
Previous year questions: Transport Layer: UDP & TCP (11)
PYQs are grouped by topic, so this is the full set for Transport Layer: UDP & TCP; try the ones that match this subtopic. Open all 11 on the topic page.