Beruflich Dokumente
Kultur Dokumente
AIMD
Slow Start
Slow Start
Slow Start
Time
Fast Retransmits
cwnd = 1 cwnd = 2
cwnd = 4
Notes:
ACKs are for next expected packet Packet reordering can cause duplicate ACKs Window may be too small to get enough duplicate ACKs
3 duplicate ACKs
Instead of setting cwnd to 1, cut cwnd in half (multiplicative decrease) dupack++ Indicates packet left network, so we may be able to send more MaxWindow = min(cwnd + dupack, AdvWin) dupack = 0 Exit fast recovery
Reduce slow starts At steady state, cwnd oscillates around the optimal window size
Detecting congestion
TCP Flavors
TCP-Tahoe
cwnd =1 whenever drop is detected cwnd =1 on timeout cwnd = cwnd/2 on dupack TCP-Reno + improved fast recovery
TCP-Reno
TCP-newReno
TCP-SACK
10
TCP-SACK
SACK = Selective Acknowledgements ACK packets identify exactly which packets have arrived Makes recovery from multiple losses much easier
11
Standards?
How can all these algorithms coexist? Dont we need a single, uniform standard? What happens if Im using Reno and you are using Tahoe, and we try to communicate?
12
TCP Throughput
Assume a drop every kth RTT (for some large k) w, w+1, w+2, ...w+k-1 DROP (w+k-1)/2, (w+k-1)/2+1,...
w+k-1
window
RTT
Time
13
In steady state: w= (w+k-1)/2 w=k-1 Average window: (w + w + k -1)/2 = 3*w/2 Total packets between drops: n = w+(w+1)+ +2*w = 3*w*(w+1)/2 Drop probability: p = 1/n = 2/(3*w*(w+1)) ~= 2/(3*w2)
w+k-1
window
RTT
Time
14
window
RTT
Time
15
Equation-Based CC
Idea:
Forget complicated increase/decrease algorithms Use this equation T(p) directly! Measure drop rate (dont need ACKs for this) Send drop rate p to source Source sends at rate T(p)
Approach:
Good for streaming audio/video that cant tolerate the high variability of TCPs sending rate
16
5 Minute Break
Questions Before We Proceed?
17
Cheating
Increasing cwnd faster than 1 per RTT Using large initial cwnd
18
y
x increases by 2 per RTT y increases by 1 per RTT
B E
Limit rates: x = 2y
19
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
20
E
x starts SS with cwnd = 4 y starts SS with cwnd = 1
21
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
22
y
Increases by 5
B E
(x, y)
D Increases by 1
Increases by 1 Increases by 5
22, 22 35, 10
10, 35 15, 15
Too aggressive Losses Throughput falls Individual incentives: cheating pays Social incentives: better off without cheating
23
Lossy Links
TCP assumes that all losses are due to congestion What happens when the link is lossy? Recall that Tput ~ 1/sqrt(p) where p is loss prob. This applies even for non-congestion losses
24
Example
60
p=0
50 40 30 20 10 0 1 26 51 76 101 126 151 176 201 226 251 276 301 326 351 376 401 426 451 476
p = 1% p = 10%
25
Summary
AIMD: Additive Increase, Multiplicative Decrease Congestion detected via packet loss (fail-safe) Slow start to find initial sending rate & to restart after timeout