Lecture 14: Congestion Control" CSE 222A: Computer Communication Networks Alex C. Snoeren Thanks: Amin Vahdat, Dina Katabi
Lecture 14 Overview" TCP congestion control review XCP Overview 2
Congestion Control Overview" Challenge: how do we efficiently share network resources among billions of hosts? Today: TCP Hosts adjust rate based on packet losses Alternative solutions Fair queuing, RED (router support) Vegas, packet pair (add functionality to TCP) Rate control, credits 3
Queuing Disciplines" How to distribute buffers among users/flows When buffer overflows, which packet to drop? Simple solution: FIFO First in, first out If packet comes along with no available buffer space, drop it 4
Fair Queuing" Goals: Allocate resources equally among all users/flows Low delay for interactive users Protection against misbehaving users Approach: simulate general processor sharing (from OS world) Bitwise round robin Need to compute number of competing flows at each instant 5
TCP Congestion Problems" Original TCP sent full window of data When links become loaded, queues fill up, leading to: Congestion collapse: when round-trip time exceeds retransmit interval this can create a stable condition in which every packet is being retransmitted many times Synchronized behavior: network oscillates between loaded and unloaded» Feedback loop 6
Jacobson s Solution" Transport protocols should obey conservation of packets Use ACKs to clock injection of new packets Modify retransmission timer to adapt to variations in delay Infer network bandwidth from packet loss Drops è congestion è reduce rate No drops è no congestion è increase rate Limit send rate based on minimum of congestion window and advertised window 7
Tracking Bottleneck Bandwidth" Throughput = window size/rtt Multiplicative decrease Timeout è dropped packet è cut window size in half Additive increase ACK arrives è no drop è increase window size by one packet/window 8
TCP Sawtooth " Oscillates around bottleneck bandwidth Adjusts to changes in competing traffic Additive Increase/Multiplicative Decrease! window! (in segs)! 18! 16! 14! 12! 10! 8! 6! 4! 2! 0! round-trip times! 9
Slow Start" How do we find bottleneck bandwidth? Cannot use ACKs to clock without reaching equilibrium Start by sending a single packet Start slow to avoid overwhelming network Multiplicative increase until get packet loss Quickly find bottleneck Cut rate by half Shift into linear increase/multiplicative decrease 10
Slow Start" Quickly find the bottleneck bandwidth Slow Start! 300! 250! 200! window! (in segs)! 150! 100! 50! 0! 0! 1! 2! 3! 4! 5! 6! 7! 8! round-trip times! 11
Slow Start Problems" Slow start usually overshoots bottleneck Leading to many lost packets in window Can lose up to half of window size Bursty traffic source Will cause bursty losses for other flows Short flows Can spend entire time in slow start Especially for large bottleneck bandwidth Consider repeated connections to the same server E.g., for web connections 12
ACK Pacing in TCP" ACKs open up slots in the congestion/advertised window Bottleneck link determines rate to send ACK indicates one packet has left the network 13
Problems with ACK Pacing" ACK compression Variations in queuing delays on return path changes spacing between ACKs Example: ACK waits for single long packet Worse with bursty cross-traffic What happens after a timeout? Potentially, no ACKs to time packet transmissions Congestion avoidance Slow start back to last successful rate Back to linear increase/multiplicative increase at this point 14
Two TCP Connections" Reach equilibrium independent of initial bandwidth (assuming equal RTTs) 16 14 12 10 window (in segs) 8 6 4 2 0 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 round-trip times 15
TCP Friendliness " Problem: many different TCP implementations If cut back more slowly after drops è grab bigger share If add more quickly after ACKs è grab bigger share Incentive to cause congestion collapse Many TCP accelerators Easy to improve perf at expense of network Solutions? Per-flow fair queuing at router 16
Fairness vs. Efficiency" Coupled because a single mechanism controls both Example: In TCP, Additive-Increase Multiplicative- Decrease (AIMD) controls both XCP argues decoupling solves the problem: 1. To control congestion: use MIMD which shows fast response 2. To control fairness: use AIMD which converges to fairness 17
XCP Advantages" Tighter Congestion Control Small queues Almost no drops Scalable (no per-flow state) Flexible fairness definitions Max/min Proportional Differential bandwidth Etc. 18
XCP Overview" 1. Congestion Controller 2. Fairness Controller 19
XCP Example" Round Trip Round Time Trip Time Congestion Congestion Window Window Feedback Feedback = + 0.1 packet Congestion Header 20
XCP Example" Round Trip Time Congestion Window Feedback = = + 0.1-0.3 packet packet 21
XCP Example" Congestion Window = Congestion Window + Feedback Routers compute feedback without any per-flow state 22
Feedback Computation" Congestion Controller Goal: Matches input traffic to link capacity & drains the queue Looks at aggregate traffic & queue MIMD Algorithm: Aggregate traffic changes by Δ Δ ~ Spare Bandwidth Δ ~ - Queue Size So, Δ = α d avg Spare - β Queue Fairness Controller Goal: Divides Δ between flows to converge to fairness Looks at a flow s state in Congestion Header AIMD Algorithm: If Δ > 0 Divide Δ equally between flows If Δ < 0 Divide Δ between flows proportionally to their current rates 23
Dumbbell Topology" S 1 Bottleneck S 2 R 1, R 2,, R n S n 24
Efficiency "" Avg. Utilization Avg. Utilization Bottleneck Bandwidth (Mb/s) Round Trip Delay (sec) 25
Response to Dynamics" Start 40 Flows Stop the 40 Flows 26
Short Flows" Average Utilization Average Queue Drops 27
Fairness" Avg. Throughput Avg. Throughput Same RTT Different RTT 28
For Next Class " Read and review DC-TCP paper We ll be in touch regarding Checkpoint meetings Email 1-2 page summary to Siva if you haven t already 29