Last Class Resource Allocation This Class Chapter 6.3. ~ 6.4. TCP congestion control
2 How does TCP figure out the right sending rate? Situation: Bottleneck link is inside the network Network does not tell sender nor receiver TCP must figure it out on its own Be conservative in increase and aggressive in decrease Use Additive-Increase, Multiplicative Decrease
3 AIMD SenderReceiver
4 Ramp-Up Time How long does it take for a TCP sender to exploit the full bandwidth of 10 Mbps? when RTT = 10 ms when RTT = 1 sec
5 Be Aggressive At First SenderReceiver
6 What about doubling each time? TIME RTT Cwnd=1Cwnd=2Cwnd=4Cwnd=8 Multiplicative increase
7 More State Variables for TCP CongestionWindow (cwnd) determines the sending rate CongestionThreshold (ssthreshold) remembers last max CongestionWindow
8 Then Why Call it Slow Start? Compare it with what we had in Chap Dump as many bytes as AdvertisedWindow! Thus slow start
9 When to stop increasing? Finite world, finite beginning ssthresh = set to an arbitrary large number (65KB) Sender rate exceeds AdvWindow Only transmit min(cwnd, AdvWindow) Packets start to be dropped at the bottleneck Sending rate exceeds bottleneck b/w Another user shares the bottleneck Contention for shared resource
10 Evolution of TCP cwnd
11 TCP Thruput?
12 Congestion Control End-to-end approach in detecting congestion No ack for some time Duplicate acks Network-assisted approach Routers provide explicit feedback IBM SNA, DEC DECnet, ATM ABR, TCP ECN
13 No ack for some time? How to estimate RTT at the sender? Time between data and ACK It differs from one ack to another due to different levels of congestion on the fw/rv path R(t) : estimated RTT at time t R(t+1) = (1-α) R(t) + αR d(t): estimated variation in RTT at time t d(t+1) = (1-β) d(t) + βd Timer = R(t) + 4d(t)
14 When congestion happens … ssthresh = ½ of cwnd In case of TCP Tahoe, cwnd = 1 When timeout happened/triple ACKs arrived Start from minimum sending rate (slow start) In case of TCP Reno, cwnd = ssthresh When triple duplicate ACKs arrive Sending rate decreased only by half (fast recovery) When timeout happened, same as in Tahoe.
15 Slow Start and Congestion Avoidance If cwnd < ssthresh Do slow start Otherwise, increase cwnd by 1 per RTT (congestion avoidance) If triple ACKs arrive retransmit the next segment w/o waiting for the retransmission timer to expire (fast retransmit)
16 Next Class HW #7 due QoS (Chap 6.5.) End-to-End data (Chap. 7)