Presentation is loading. Please wait.

Presentation is loading. Please wait.

Congestion Control: TCP & DC-TCP Swarun Kumar With Slides From: Prof. Katabi, Alizadeh et al.

Similar presentations


Presentation on theme: "Congestion Control: TCP & DC-TCP Swarun Kumar With Slides From: Prof. Katabi, Alizadeh et al."— Presentation transcript:

1 Congestion Control: TCP & DC-TCP Swarun Kumar With Slides From: Prof. Katabi, Alizadeh et al.

2 Congestion: A big problem Sources in the Internet are compete for bandwidth and buffer space S1S1 S2S2 R1 D 10Mb/s 2Mb/s 100Mb/s  Why is it a problem?  Sources are unaware of current state of resource  Sources are unaware of each other  Manifestations:  Lost packets (buffer overflow at routers)  Long delays (queuing in router buffers) S1S1 S2S2

3 Solution: Congestion Control Ask the senders to slow down But how much do you slow down? - Efficiency: Maximize Utilization S1S1 S2S2 R1 D 10Mb/s 2Mb/s 100Mb/s - Fairness: Each user gets a fair share S 1 + S 2 = 2Mb/s S 1 = S 2 = 1Mb/s

4 Max-Min Fairness Each user gets min(demand, fair share) S1S1 S2S2 R1 D 9Mb/s S3S3  1 = 1Mb/s  2 = 7Mb/s  3 =  Demands  1 = 1Mb/s  2 = 4Mb/s  3 = 4Mb/s Max-min Fair Rates

5 TCP Congestion Control Simple idea: Send a few packets. – If a packet is dropped => decrease rate. – If no drops => increase rate. Control rate via congestion window – cwnd = Number of packets a sender can send without an acknowledgment (i.e. in one RTT) – Increase cwnd to increase rate How does cwnd relate to actual rate? Throughput = cwnd/RTT

6 How much should TCP increase/decrease cwnd? Basic rule: Additive increase, Multiplicative decrease (AIMD) For every RTT: – No loss => cwnd = cwnd +1 – A loss => cwnd = cwnd/2

7 Additive Increase D A Src Dest cwnd = 1 cwnd += 1 cwnd = 2 DDAA cwnd = 3 DDAADA cwnd = 4 Multiplicative Decrease D cwnd = 10 D … X D D cwnd = 5 D …

8 AIMD Leads to Efficiency and Fairness User 1: x 1 User 2: x 2 fairness Line x 1 =x 2 Efficiency line (x 1 +x 2 = C) (x 1,x 2 ) (x 1 /2,x 2 /2) (x 1 /2+a,x 2 /2+a)

9 TCP Add-ons: Slow Start Time Congestion Window Slow Start

10 TCP Add-ons: Fast retransmit/recovery Time Congestion Window 3 dup acks

11 DC-TCP: TCP for Data Centers TCP suffers major problems: – Incast – Queue Buildup 11 Data Center traffic is two fold: – Short Flows (50 KB – 1 MB) – Large flows (1MB – 50 MB) Delay-sensitive Throughput-sensitive

12 Incast 12 TCP timeout Worker 1 Worker 2 Worker 3 Worker 4 Master Time out after 300 ms Synchronized mice collide. (e.g. in map/reduce)

13 Queue Buildup 13 Sender 1 Sender 2 Receiver Elephant flows buildup queues.  Increased latency for mice flows.

14 Solution: Leverage “ECN” 14 Sender 1 Sender 2 Receiver ECN Mark (1 bit) ECN = Explicit Congestion Notification

15 DC-TCP: Key Idea React in proportion to the extent of congestion, not its presence. 18 ECN MarksTCPDCTCP 1 0 1 1 1 Cut window by 50%Cut window by 40% 0 0 0 0 0 0 0 0 0 1Cut window by 50%Cut window by 5%

16 DC-TCP Algorithm At Router: – Mark packets when Q ueue Length > K. 19 At Sender: – Maintain running average of fraction of packets marked (α). In each RTT:  Adaptive window decreases: – Note: decrease factor between 1 and 2. B K Mark Don’t Mark

17 Sample Questions (Quiz 2, S’11) Question 1: What’s the max-throughput (in pkts/s) if the source uses cwnd = 5 pkts? (Assume ACKs are delivered instantly) S1S1 D Capacity: 100 pkt/s One-way Delay: 0.1s Router 100 pkt buffer Capacity: 10 pkt/s One-way Delay: 1s

18 Sample Questions (Quiz 2, S’11) Question 2: What’s the max-throughput (in pkts/s) if the source uses cwnd = 20 pkts? (Assume ACKs are delivered instantly) S1S1 D Capacity: 100 pkt/s One-way Delay: 0.1s Router 100 pkt buffer Capacity: 10 pkt/s One-way Delay: 1s

19 Sample Questions (Quiz 2, S’11) Question 3: What’s the maximum cwnd that TCP’s AIMD can have? S1S1 D Capacity: 100 pkt/s One-way Delay: 0.1s Router 100 pkt buffer Capacity: 10 pkt/s One-way Delay: 1s

20 Sample Questions (Quiz 2, S’11) Question 4: What’s the maximum cwnd that DC-TCP can have, assuming K=40 at the router? S1S1 D Capacity: 100 pkt/s One-way Delay: 0.1s Router 100 pkt buffer Capacity: 10 pkt/s One-way Delay: 1s


Download ppt "Congestion Control: TCP & DC-TCP Swarun Kumar With Slides From: Prof. Katabi, Alizadeh et al."

Similar presentations


Ads by Google