180 likes | 334 Vues
Explore the intricacies of congestion control mechanisms in TCP and DC-TCP as discussed by Swarun Kumar, with insights from Prof. Katabi and Alizadeh. This conceptual overview highlights the challenges of congestion on the Internet, such as lost packets and long delays, and presents TCP's approach of additive increase and multiplicative decrease (AIMD) for managing network flow. The concept of Explicit Congestion Notification (ECN) in DC-TCP is also examined, focusing on its adaptive response to congestion in data centers.
E N D
Congestion Control: TCP & DC-TCP Swarun Kumar With Slides From: Prof. Katabi, Alizadeh et al.
10Mb/s S1 R1 2Mb/s D 100Mb/s S2 S1 S2 Congestion: A big problem • Sources in the Internet are compete for bandwidth and buffer space • 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)
10Mb/s S1 R1 2Mb/s D 100Mb/s S2 Solution: Congestion Control • Ask the senders to slow down • But how much do you slow down? - Efficiency: Maximize Utilization S1 + S2 = 2Mb/s S1 = S2 = 1Mb/s • - Fairness: Each user gets a fair share
S1 9Mb/s R1 D S2 S3 1= 1Mb/s 2= 7Mb/s 3= Demands 1= 1Mb/s 2= 4Mb/s 3= 4Mb/s Max-min Fair Rates Max-Min Fairness • Each user gets min(demand, fair share)
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
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
cwnd += 1 cwnd = 2 cwnd = 1 cwnd = 3 cwnd = 4 D A D D A A D D D A A A D D D D D AdditiveIncrease Src Dest MultiplicativeDecrease cwnd = 10 cwnd = 5 … … X
(x1/2+a,x2/2+a) (x1/2,x2/2) AIMD Leads to Efficiency and Fairness fairness Line x1=x2 (x1,x2) User 2: x2 Efficiency line (x1+x2 = C) User 1: x1
DC-TCP: TCP for Data Centers • TCP suffers major problems: • Incast • Queue Buildup • Data Center traffic is two fold: • Short Flows (50 KB – 1 MB) • Large flows (1MB – 50 MB) Delay-sensitive Throughput-sensitive
Incast Worker 1 • Synchronized mice collide. • (e.g. in map/reduce) Master Worker 2 Worker 3 Time out after 300 ms Worker 4 TCP timeout
Queue Buildup Sender 1 • Elephant flows buildup queues. • Increased latency for mice flows. Receiver Sender 2
Solution: Leverage “ECN” Sender 1 ECN = Explicit Congestion Notification ECN Mark (1 bit) Receiver Sender 2
DC-TCP: Key Idea React in proportion to the extent of congestion, not its presence.
DC-TCP Algorithm B K Don’t Mark Mark At Router: • Mark packets whenQueue Length > K. • At Sender: • Maintain running average of fractionof packets marked (α). • In each RTT: • Adaptive window decreases: • Note: decrease factor between 1 and 2.
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) Capacity: 100 pkt/s Router Capacity: 10 pkt/s D S1 One-way Delay: 0.1s One-way Delay: 1s 100 pkt buffer
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) Capacity: 100 pkt/s Router Capacity: 10 pkt/s D S1 One-way Delay: 0.1s One-way Delay: 1s 100 pkt buffer
Sample Questions (Quiz 2, S’11) Question 3: What’s the maximum cwnd that TCP’s AIMD can have? Capacity: 100 pkt/s Router Capacity: 10 pkt/s D S1 One-way Delay: 0.1s One-way Delay: 1s 100 pkt buffer
Sample Questions (Quiz 2, S’11) Question 4: What’s the maximum cwnd that DC-TCP can have, assuming K=40 at the router? Capacity: 100 pkt/s Router Capacity: 10 pkt/s D S1 One-way Delay: 0.1s One-way Delay: 1s 100 pkt buffer