Congestion Control
Acknowledgments: These slides were originally developed by Prof. Jean Walrand for EE122.
The past and current EE122 instructors including Profs. Kevin Fall, Abhay Parekh, Shyam Parekh,
and Adam Wolisz have contributed to their evolution.
Congestion Control
The Problem
Questions
Approaches
TCP: Algorithm
TCP Refinements
Summary
The Problem
Questions
Does it matter?
Discovering available bandwidth
What is fair?
Does it matter?
Congestion occurs
Access link
Access network
Example:
x
A
10
10
C
y
10
E z
= router
3
10
D
= host
x, y, z = throughput of flows
TOC Congestion Control - Questions 2
10
F
10
Example:
x
A
10
10
C
y
10
E z
10
D
10
F
10
10
10
C
y
10
E z
10
D
10
F
10
10
10
C
y
10
E z
1.
2.
3.
4.
10
D
10
F
10
10
10
C
y
10
E z
10
D
10
F
10
10
10
C
y
10
E z
10
D
10
F
10
10
10
C
y
10
E z
10
D
10
F
10
Example:
x
A
10
10
C
y
10
E z
10
D
10
F
10
Reservation
Pricing
Test
Note: Either by hosts or between domains
Principles
Example
Multiple Sources
A Bad Algorithm: AIAD
AIMD: Additive Increase Multiplicative Decrease
Questions:
A
C = 50 pkts/RTT
60
50
40
30
20
10
487
460
433
406
379
352
325
298
271
244
217
190
163
136
109
82
55
28
D
50
40
30
20
10
487
460
433
406
379
352
325
298
271
244
217
190
163
136
109
82
55
28
D
C = 50 pkts/RTT
487
460
433
406
379
352
325
298
271
244
217
190
163
136
109
82
55
28
Limit rates:
x=y
x
TOC Congestion Control - TCP Algorithm AIMD
y
C
Limit rates:
x and y depend
on initial
values
x
TOC Congestion Control - TCP Algorithm Why AIAD Fails
TCP Phases
Slow Start and Congestion Avoidance
Fast Retransmit
Fast Recovery: 1st Look
Fast Recovery: 2nd Look
Window Updates
Flow Control
Summary
TCP Phases
Slow Start
Congestion Avoidance
Refinements:
64KB
W
Threshold
n
Slow Start
Congestion
Avoidance
n/2
exp
Additive
Slope = 1/RTT
exp
1
Timeout
TOC Congestion Control - TCP Refinements Slow Start
timeout
n
n+1
n+2
n+3
n+4
n+1
n+1
n+1
n+1
n+1
Cumulative ACKs:
ACK # = next expected #
Window
Slope =
1 MSS/RTT
Timeout
n/2
1
Moderate congestion
Severe congestion
(subsequent pkts arrived)
TOC Congestion Control - TCP Refinements Fast Recovery 1
W
W == W
W first
first 22 DA
DA (Dup
(Dup Ack)
Ack)
rd
At
3
At 3rd DA:
DA:
ssthresh
ssthresh == W/2
W/2
W
W == ssthresh
ssthresh ++ 33
rd
W
W == W
W ++ 11 at
at each
each DA
DA after
after 33rd DA
DA
W/2 + 3
W
n+1
n+W
W/2 1 outstanding
packets:
n+W+1, , n+3W/21
W
W=
= ssthresh
ssthresh
n+W+1
W
W 44 acks
acks
(W/2
(W/2 ++ 3)
3) ++ (W
(W 4)
4)
== W
W ++ W/2
W/2 11
3rd DA
n+1
TOC Congestion Control - TCP Refinements Fast Recovery 2
W=2
W=4
W=8
W=8
W=8
+ 1/8
W = 8.125 + 1/8.125
8 + 2/8
W 8 + 8/8 = 9
W 9 + 9/9 = 10
Congestion Example
(Source: TCP/IP Illustrated - I, W.
Stevens)
Refinements: Summary
Actual window = min {RAW, W}
64KB
W
3DA
0.5
3DA
0.5
0.5
TO
TO
0.5
1
SS
CA
SS
CA
Timers:
Flow Control:
TCP Timers
To avoid SWS