congestion control - supplementary slides are adapted on jean walrand’s slides
Post on 02-Jan-2016
218 Views
Preview:
TRANSCRIPT
2
TOC: Congestion Control Congestion control for bandwidth sharing Cheating TCP Buffer Size ECN RED TCP Unfairness TCP Vegas
3
Congestion Control: Questions
How to avoid network congestion?How to recover from congestion? Congestion occurs at access link and access
network
How to share the links bandwidth? If bandwidth is allocated and enforced
properly, no congestion should occur. Can improve treatment of flows
E.g., one flow should not get a much smaller fraction of bandwidth
Some flows might need some guaranteed bandwidth
Discovering available bandwidth What is fair?
4
Questions: Available bandwidth?
Example:
A B
C E D F
1010 10 10 10
103 36
x
zy
= router = host
3 = link with bandwidth of 3Mbps(same for 6 and 10)
x, y, z = throughput of flows
5
Questions: Available bandwidth?
Example:
A B
C E D F
1010 10 10 10
103 36
x
zy
• What is available bandwidth? (See later)• How does A “discover” the available bandwidth to B?• Some approaches:
1. Reservation: e.g., Telephone2. Adapt to congestion: TCP3. Pricing congestion: research topic
6
Available bandwidth: Reservation
A B
C E D F
1010 10 10 10
103 36
x
zy
1. Routers (or manager) keep track of reserved rates
2. A requests a rate R to B from the network3. The network figures out if R is available4. If R is available, routers (or manager) update
reservations and confirm to A5. Note: complex, slow, requires connection
setup and enforcement
7
Available bandwidth: Adapt
A B
C E D F
1010 10 10 10
103 36
x
zy
1. Transmit and slow down if congestion occur2. Example:
• Initially: x= 0, y = 3, z = 3• Then A increases its rate; C and E notice
congestion and slow down
• Later, C stops: A and E increase rates3. Notes:
• No guarantees: throughput may drop• Key question: how to adapt rates, e.g., TCP
8
Available bandwidth: Pricing
Example:
A B
C E D F
1010 10 10 10
103 36
x
zy
• When they get saturated, routers mark packets
• If a flow with rate R uses saturated links, it gets marks with rate R
• Each mark costs one unit• Source slows down if price becomes
excessive• x= 1+, y = 2+, z = 2+
pA = 1 + 1; pC = pE = 2• x = 2+, y = 1+, z = 1+
pA = 2 + 2; pC = pE = 1
9
Questions: What is Fair?
Example:
A B
C E D F
1010 10 10 10
103 36
x
zy
• x = y = z = 1.5: fair in max-min sense
• x = 0, y = z = 3: maximizes x + y + z
• 5x = 4y = 4z: equalizes resources flows use with x = 1.33, y = z = 1.67
• What if AB needs 2Mbps?(and is willing to pay for it)
10
Cheating: Increase Faster
A Bx
C
D Ey
Limit rates:x = 2y
C
x
yx increases by 2 MSS/RTT per RTTy increases by 1 MSS/RTT per RTT
11
Cheating: Increase Faster
A Bx
C = 50
D Ey
0
10
20
30
40
50
60
1 28 55 82 109
136
163
190
217
244
271
298
325
352
379
406
433
460
487
time
Rate
12
Cheating: Start SS with CongWin > 1
A Bx
C
D Ey
x starts SS with CongWin = 4y starts SS with CongWin = 1
13
Cheating: Open Many Connections
A Bx
C
D Ey
Assume • A starts 10 connections to B• D starts 1 connection to E• Each connection gets about the same throughput
Then A gets 10 times more throughput than D
14
ECN: Explicit Congestion Notification
Standard TCP: Losses needed to detect congestion Wasteful and unnecessary
ECN: When congested, routers mark (IP) packets instead
of dropping them Destination marks ACKs of marked packets Source set CongWin = CongWin/2 when it sees mark
Advantages: No time wasted to retransmit Link errors not confused with congestion
Example: without ECN, at wireless link, packets can get corrupted by noise and interference, and get dropped eventually. Sender will think congestion has occurred.
16
Explicit Congestion NotificationBackward Compatibility:
Unused bits from TCP and IP headers are used for ECN.
One bit in IP header indicates if hosts implement ECN
If it does, router marks packet
If it does not, router drops packet
17
RED
Random Early Detection:As queue builds up, drop or mark packets with increasing probability (before queue gets full)Advantages: Avoids penalizing streams with large bursts
This is done by keeping the queue size smaller than the buffer size
Earlier marking reduces dropped packets De-synchronizes the source behaviors
18
RED: IllustrationC Mbps
PACKETS
• Calculate recent average of queue length: Qav Qav(n+1) = (1 – b) Qav(n) + b Q(n)
0 < b < 1• Determine drop or mark probability p(Qav):
1
0k
L H
Qav
19
Router Buffers: Rule of Thumb
Imagine that all connections on input port with rate R “burst” for RTT seconds (until stopped by RED)
Router must store RxRTT for each port
Example: 40 Gbps throughput (sum of port rates) RTT = 200 ms (worst case?) Then storage = 8 Gbits = (about) 1 GByte
Question: Is this reasonable?
20
Unfairness
Fact: TCP favors connections with short RTT
Cause: Increase rate is 1 MSS/RTT, so that it is faster for
connections with small RTT Recall our discussion of “Cheating RTT”
It is quite possible for a connection to get only a few percent of its fair shareSolutions: Modify TCP to increase in proportion to RTT?
Problem: Estimate of RTT is noisy TCP Vegas (see next)
21
TCP Vegas
Consider one queue:
A Bx
C
D Ey
Assume both connections have the same backlogThen they have the same throughput …Vegas Algorithm: Estimate backlog by
Q = Outstanding – Rate Base_RTTRate = Bytes_Sent_Successfully / Current_RTT
If Q > 3 MSS, then slow down; otherwise, speed upProblem: Reno clobbers Vegas (unlike in real life)
top related