Sub topic 8
Congestion Control: Slow Start, Congestion Avoidance, Tahoe, and Reno
Prerequisites and the Main Idea
Assume that you know TCP sequence numbers, acknowledgements, round-trip time (RTT), and the difference between flow control and congestion control. Flow control protects the receiver from receiving more data than it can store. Congestion control protects the network from receiving more traffic than it can carry.
TCP uses a congestion window, written as cwnd, to limit the amount of unacknowledged data in the network. The sender can send at most:
sendable data = min(cwnd, receiver window)
The congestion window is usually measured in maximum segment sizes (MSS).
Slow Start and Congestion Avoidance
TCP begins with a small congestion window. During slow start, cwnd increases rapidly. In the simplified per-RTT model, it approximately doubles every RTT:
cwnd ← 2 × cwnd
When cwnd reaches the slow-start threshold, written as ssthresh, TCP enters congestion avoidance. It then increases more slowly, by about one MSS per RTT:
cwnd ← cwnd + 1 MSS
This is called additive increase. When TCP detects congestion, it reduces its sending rate. The usual rule is multiplicative decrease: reduce the threshold by half.
cwnd = 1
ssthresh = 16
for rtt in range(1, 15):
print(f"RTT {rtt}: cwnd = {cwnd} MSS")
if rtt == 10: # simplified triple duplicate ACK
ssthresh = cwnd // 2
cwnd = ssthresh # Reno-style simplified response
elif cwnd < ssthresh:
cwnd *= 2 # slow start
else:
cwnd += 1 # congestion avoidanceFor example, with an initial cwnd of 1 MSS and ssthresh of 16 MSS, the values during slow start are approximately 1, 2, 4, 8, and 16 MSS. After reaching the threshold, the values grow as 17, 18, and so on.
Tahoe and Reno
TCP Tahoe treats a timeout and triple duplicate ACK as serious congestion. It sets:
ssthresh = cwnd / 2cwnd = 1 MSS
It then starts slow start again.
TCP Reno distinguishes a triple duplicate ACK from a timeout. A triple duplicate ACK suggests that later segments reached the receiver, so Reno uses fast retransmit and fast recovery. It sets ssthresh to about half of the old cwnd, retransmits the missing segment, and continues near the new threshold. A timeout still causes cwnd to become 1 MSS.
>callout warning >For GATE-style questions, identify the loss signal first. Triple duplicate ACK and timeout do not produce the same Reno result. If the question gives no special convention, state the convention you use.
A GATE Calculation Pattern
Suppose cwnd = 20 MSS when three duplicate ACKs arrive. Then:
ssthresh = 20 / 2 = 10 MSS
Under the common simplified Reno model, the new congestion window becomes 10 MSS. Under Tahoe, it becomes 1 MSS. If the event is a timeout, both protocols return to 1 MSS.
Exercise
TCP has cwnd = 24 MSS and ssthresh = 16 MSS. A timeout occurs. What are the new cwnd and ssthresh under Tahoe?
Show answer
ssthresh becomes 24 / 2 = 12 MSS, and cwnd becomes 1 MSS. TCP then uses slow start until cwnd reaches 12 MSS.