Discussion 7
1
CS 168, Summer 2025 @ UC Berkeley
Slides credit: Sylvia Ratnasamy, Rob Shakir, Peyrin Kao, Iuniana Oprescu
Congestion Control 📈
Logistics
TCP Circa 1986
Congestion Control
Goal of Congestion Control
A naïve solution
A host-based solution sketch
A host-based solution sketch
TCP: loss-based feedback
Idea: drop implies congestion
TCP’s response depends on the kind of loss.
Congestion Control: Windows
TCP Sawtooth
Time
CWND
Slow Start
3 Dup ACKs
3 Dup ACKs
Timeout
Congestion Avoidance/
Fast Recovery
Utilization
Three States
Time
CWND
Slow Start
3 Dup ACKs
3 Dup ACKs
Timeout
Congestion Avoidance/
Fast Recovery
The Big Picture
slow �start
congestion �avoidance
fast �recovery
cwnd > ssthresh
timeout
dupACK=3
timeout
dupACK=3
new ACK
dupACK
new ACK
timeout
new ACK
dupACK
dupACK
Implementation
Congestion Control Mechanics
Implementation
Three States
Time
CWND
Slow Start
3 Dup ACKs
3 Dup ACKs
Timeout
Congestion Avoidance/
Fast Recovery
Slow Start
Slow Start – Intuition
Slow Start – When does it end?
Slow Start
Slow Start
Timeout
DupACK
- DupAckCount++
New ACK
dupAckCount == 3
Move to Fast Recovery
cwnd > ssthresh
Move to Congestion Avoidance
Three States
Time
CWND
Slow Start
3 Dup ACKs
3 Dup ACKs
Timeout
Congestion Avoidance/
Fast Recovery
Congestion Avoidance – Intuition
Congestion Avoidance
Congestion Avoidance
Congestion Avoidance
DupACK
-DupAckCount++
New ACK
Timeout
Move to Slow Start
- dupAckCount = 0
dupACKCount == 3
Move to Fast Recovery
Three States
Time
CWND
Slow Start
3 Dup ACKs
3 Dup ACKs
Timeout
Congestion Avoidance/
Fast Recovery
Fast Recovery – Intuition
Fast Recovery
Fast Recovery
Fast Recovery
Timeout
Move to Slow Start
- ssthresh = cwnd / 2
- cwnd = 1
- dupAckCount = 0
New ACK
Move to Congestion Avoidance
DupACK
- cwnd = cwnd + 1
Big Ideas
Worksheet
Question 1: True/False
Worksheet
Question 2: Impact of Fast Recovery
Question 2: Impact of Fast Recovery
Worksheet
Question 3: AIMD Throughput
Question 3: AIMD Throughput
Question 3: AIMD Throughput
Questions?
Feedback Form: https://tinyurl.com/cs168-su25-disc-feedback