Lecture 14: Congestion Control - cseweb.ucsd.edu · CSE 222A–Lecture 14: Congestion Control 14. S...
Transcript of Lecture 14: Congestion Control - cseweb.ucsd.edu · CSE 222A–Lecture 14: Congestion Control 14. S...
![Page 1: Lecture 14: Congestion Control - cseweb.ucsd.edu · CSE 222A–Lecture 14: Congestion Control 14. S 1 Bottleneck S 2 R 1, R 2, …, R n S n Dumbbell Topology CSE 222A–Lecture 14:](https://reader033.fdocuments.in/reader033/viewer/2022042310/5ed843570fa3e705ec0e2590/html5/thumbnails/1.jpg)
CSE 222A: Computer Communication NetworksAlex C. Snoeren
Lecture 14:Congestion Control
Thanks: Amin Vahdat, Dina Katabi
![Page 2: Lecture 14: Congestion Control - cseweb.ucsd.edu · CSE 222A–Lecture 14: Congestion Control 14. S 1 Bottleneck S 2 R 1, R 2, …, R n S n Dumbbell Topology CSE 222A–Lecture 14:](https://reader033.fdocuments.in/reader033/viewer/2022042310/5ed843570fa3e705ec0e2590/html5/thumbnails/2.jpg)
Lecture 14 Overview
● TCP congestion control review
● XCP Overview
2CSE 222A – Lecture 14: Congestion Control
![Page 3: Lecture 14: Congestion Control - cseweb.ucsd.edu · CSE 222A–Lecture 14: Congestion Control 14. S 1 Bottleneck S 2 R 1, R 2, …, R n S n Dumbbell Topology CSE 222A–Lecture 14:](https://reader033.fdocuments.in/reader033/viewer/2022042310/5ed843570fa3e705ec0e2590/html5/thumbnails/3.jpg)
Congestion Control Overview● Challenge: how do we efficiently share network
resources among billions of hosts?u Today: TCP
Hosts adjust rate based on packet lossesu Alternative solutions
Fair queuing, RED (router support) Vegas, packet pair (add functionality to TCP)Rate control, credits
3CSE 222A – Lecture 14: Congestion Control
![Page 4: Lecture 14: Congestion Control - cseweb.ucsd.edu · CSE 222A–Lecture 14: Congestion Control 14. S 1 Bottleneck S 2 R 1, R 2, …, R n S n Dumbbell Topology CSE 222A–Lecture 14:](https://reader033.fdocuments.in/reader033/viewer/2022042310/5ed843570fa3e705ec0e2590/html5/thumbnails/4.jpg)
ACK Pacing in TCP
● ACKs open up slots in the congestion/advertised windowu Bottleneck link determines rate to sendu ACK indicates one packet has left the network
4CSE 222A – Lecture 14: Congestion Control
![Page 5: Lecture 14: Congestion Control - cseweb.ucsd.edu · CSE 222A–Lecture 14: Congestion Control 14. S 1 Bottleneck S 2 R 1, R 2, …, R n S n Dumbbell Topology CSE 222A–Lecture 14:](https://reader033.fdocuments.in/reader033/viewer/2022042310/5ed843570fa3e705ec0e2590/html5/thumbnails/5.jpg)
Problems with ACK Pacing● ACK compression
u Variations in queuing delays on return path changes spacing between ACKs
u Example: ACK waits for single long packet u Worse with bursty cross-traffic
● What happens after a timeout?u Potentially, no ACKs to time packet transmissions
● Congestion avoidanceu Slow start back to last successful rateu Back to linear increase/multiplicative increase at this point
5CSE 222A – Lecture 14: Congestion Control
![Page 6: Lecture 14: Congestion Control - cseweb.ucsd.edu · CSE 222A–Lecture 14: Congestion Control 14. S 1 Bottleneck S 2 R 1, R 2, …, R n S n Dumbbell Topology CSE 222A–Lecture 14:](https://reader033.fdocuments.in/reader033/viewer/2022042310/5ed843570fa3e705ec0e2590/html5/thumbnails/6.jpg)
Two TCP Connections● Reach equilibrium independent of initial bandwidth
(assuming equal RTTs)
0
2
4
6
8
10
12
14
16
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
window (in segs)
round-trip times
6CSE 222A – Lecture 14: Congestion Control
![Page 7: Lecture 14: Congestion Control - cseweb.ucsd.edu · CSE 222A–Lecture 14: Congestion Control 14. S 1 Bottleneck S 2 R 1, R 2, …, R n S n Dumbbell Topology CSE 222A–Lecture 14:](https://reader033.fdocuments.in/reader033/viewer/2022042310/5ed843570fa3e705ec0e2590/html5/thumbnails/7.jpg)
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
u Many TCP “accelerators” u Easy to improve perf at expense of network
● Solutions?u Per-flow fair queuing at router
7CSE 222A – Lecture 14: Congestion Control
![Page 8: Lecture 14: Congestion Control - cseweb.ucsd.edu · CSE 222A–Lecture 14: Congestion Control 14. S 1 Bottleneck S 2 R 1, R 2, …, R n S n Dumbbell Topology CSE 222A–Lecture 14:](https://reader033.fdocuments.in/reader033/viewer/2022042310/5ed843570fa3e705ec0e2590/html5/thumbnails/8.jpg)
Example: In TCP, Additive-Increase Multiplicative-Decrease (AIMD) controls both
Coupled because a single mechanism 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
Fairness vs. Efficiency
8CSE 222A – Lecture 14: Congestion Control
![Page 9: Lecture 14: Congestion Control - cseweb.ucsd.edu · CSE 222A–Lecture 14: Congestion Control 14. S 1 Bottleneck S 2 R 1, R 2, …, R n S n Dumbbell Topology CSE 222A–Lecture 14:](https://reader033.fdocuments.in/reader033/viewer/2022042310/5ed843570fa3e705ec0e2590/html5/thumbnails/9.jpg)
XCP Advantages● Tighter Congestion Control
u Small queuesu Almost no drops
● Scalable (no per-flow state)
● Flexible fairness definitionsu Max/minu Proportionalu Differential bandwidthu Etc.
9CSE 222A – Lecture 14: Congestion Control
![Page 10: Lecture 14: Congestion Control - cseweb.ucsd.edu · CSE 222A–Lecture 14: Congestion Control 14. S 1 Bottleneck S 2 R 1, R 2, …, R n S n Dumbbell Topology CSE 222A–Lecture 14:](https://reader033.fdocuments.in/reader033/viewer/2022042310/5ed843570fa3e705ec0e2590/html5/thumbnails/10.jpg)
1. Congestion Controller2. Fairness Controller
XCP Overview
10CSE 222A – Lecture 14: Congestion Control
![Page 11: Lecture 14: Congestion Control - cseweb.ucsd.edu · CSE 222A–Lecture 14: Congestion Control 14. S 1 Bottleneck S 2 R 1, R 2, …, R n S n Dumbbell Topology CSE 222A–Lecture 14:](https://reader033.fdocuments.in/reader033/viewer/2022042310/5ed843570fa3e705ec0e2590/html5/thumbnails/11.jpg)
Feedback
Round Trip Time
Congestion Window
Congestion Header
Feedback
Round Trip Time
Congestion Window
Feedback = + 0.1 packet
XCP Example
11CSE 222A – Lecture 14: Congestion Control
![Page 12: Lecture 14: Congestion Control - cseweb.ucsd.edu · CSE 222A–Lecture 14: Congestion Control 14. S 1 Bottleneck S 2 R 1, R 2, …, R n S n Dumbbell Topology CSE 222A–Lecture 14:](https://reader033.fdocuments.in/reader033/viewer/2022042310/5ed843570fa3e705ec0e2590/html5/thumbnails/12.jpg)
Feedback = + 0.1 packet
Round Trip Time
Congestion Window
Feedback = - 0.3 packet
XCP Example
12CSE 222A – Lecture 14: Congestion Control
![Page 13: Lecture 14: Congestion Control - cseweb.ucsd.edu · CSE 222A–Lecture 14: Congestion Control 14. S 1 Bottleneck S 2 R 1, R 2, …, R n S n Dumbbell Topology CSE 222A–Lecture 14:](https://reader033.fdocuments.in/reader033/viewer/2022042310/5ed843570fa3e705ec0e2590/html5/thumbnails/13.jpg)
Congestion Window = Congestion Window + Feedback
Routers compute feedback without any per-flow state
XCP Example
13CSE 222A – Lecture 14: Congestion Control
![Page 14: Lecture 14: Congestion Control - cseweb.ucsd.edu · CSE 222A–Lecture 14: Congestion Control 14. S 1 Bottleneck S 2 R 1, R 2, …, R n S n Dumbbell Topology CSE 222A–Lecture 14:](https://reader033.fdocuments.in/reader033/viewer/2022042310/5ed843570fa3e705ec0e2590/html5/thumbnails/14.jpg)
Congestion Controller Fairness ControllerGoal: Divides D between flows to converge to fairness
Looks at a flow’s state in Congestion Header
Algorithm:
If D > 0 Þ Divide D equally between flows
If D < 0 Þ Divide D between flows proportionally to their current rates
MIMD AIMD
Goal: Matches input traffic to link capacity & drains the queue
Looks at aggregate traffic & queue
Algorithm:
Aggregate traffic changes by DD ~ Spare Bandwidth
D ~ - Queue Size
So, D = a davg Spare - b Queue
Feedback Computation
14CSE 222A – Lecture 14: Congestion Control
![Page 15: Lecture 14: Congestion Control - cseweb.ucsd.edu · CSE 222A–Lecture 14: Congestion Control 14. S 1 Bottleneck S 2 R 1, R 2, …, R n S n Dumbbell Topology CSE 222A–Lecture 14:](https://reader033.fdocuments.in/reader033/viewer/2022042310/5ed843570fa3e705ec0e2590/html5/thumbnails/15.jpg)
BottleneckS1
S2
R1, R2, …, Rn
Sn
Dumbbell Topology
15CSE 222A – Lecture 14: Congestion Control
![Page 16: Lecture 14: Congestion Control - cseweb.ucsd.edu · CSE 222A–Lecture 14: Congestion Control 14. S 1 Bottleneck S 2 R 1, R 2, …, R n S n Dumbbell Topology CSE 222A–Lecture 14:](https://reader033.fdocuments.in/reader033/viewer/2022042310/5ed843570fa3e705ec0e2590/html5/thumbnails/16.jpg)
Bottleneck Bandwidth (Mb/s)
Avg.
Util
izat
ion
Round Trip Delay (sec)
Avg.
Util
izat
ion
Efficiency
16CSE 222A – Lecture 14: Congestion Control
![Page 17: Lecture 14: Congestion Control - cseweb.ucsd.edu · CSE 222A–Lecture 14: Congestion Control 14. S 1 Bottleneck S 2 R 1, R 2, …, R n S n Dumbbell Topology CSE 222A–Lecture 14:](https://reader033.fdocuments.in/reader033/viewer/2022042310/5ed843570fa3e705ec0e2590/html5/thumbnails/17.jpg)
Start
40 FlowsStop the 40 Flows
Response to Dynamics
17CSE 222A – Lecture 14: Congestion Control
![Page 18: Lecture 14: Congestion Control - cseweb.ucsd.edu · CSE 222A–Lecture 14: Congestion Control 14. S 1 Bottleneck S 2 R 1, R 2, …, R n S n Dumbbell Topology CSE 222A–Lecture 14:](https://reader033.fdocuments.in/reader033/viewer/2022042310/5ed843570fa3e705ec0e2590/html5/thumbnails/18.jpg)
Average Utilization
Average Queue
Drops
Short Flows
18CSE 222A – Lecture 14: Congestion Control
![Page 19: Lecture 14: Congestion Control - cseweb.ucsd.edu · CSE 222A–Lecture 14: Congestion Control 14. S 1 Bottleneck S 2 R 1, R 2, …, R n S n Dumbbell Topology CSE 222A–Lecture 14:](https://reader033.fdocuments.in/reader033/viewer/2022042310/5ed843570fa3e705ec0e2590/html5/thumbnails/19.jpg)
Different RTTSame RTT
Avg.
Thr
ough
put
Avg.
Thr
ough
put
Fairness
19CSE 222A – Lecture 14: Congestion Control
![Page 20: Lecture 14: Congestion Control - cseweb.ucsd.edu · CSE 222A–Lecture 14: Congestion Control 14. S 1 Bottleneck S 2 R 1, R 2, …, R n S n Dumbbell Topology CSE 222A–Lecture 14:](https://reader033.fdocuments.in/reader033/viewer/2022042310/5ed843570fa3e705ec0e2590/html5/thumbnails/20.jpg)
● Large purpose-built DCsu Huge investment: R&D, business
● Transport inside the DCu TCP rules (99.9% of traffic)
● How’s TCP doing?
20
Datacenter Review
![Page 21: Lecture 14: Congestion Control - cseweb.ucsd.edu · CSE 222A–Lecture 14: Congestion Control 14. S 1 Bottleneck S 2 R 1, R 2, …, R n S n Dumbbell Topology CSE 222A–Lecture 14:](https://reader033.fdocuments.in/reader033/viewer/2022042310/5ed843570fa3e705ec0e2590/html5/thumbnails/21.jpg)
TCP in the Data Center● TCP is challenged to meet demands of apps.
u Suffers from bursty packet drops, Incast [SIGCOMM ‘09], ... u Builds up large queues:
Ø Adds significant latency.Ø Wastes precious buffers, esp. bad with shallow-buffered switches.
• Operators work around TCP problems.‒ Ad-hoc, inefficient, often expensive solutions‒ No solid understanding of consequences, tradeoffs
21CSE 222A – Lecture 14: Congestion Control
![Page 22: Lecture 14: Congestion Control - cseweb.ucsd.edu · CSE 222A–Lecture 14: Congestion Control 14. S 1 Bottleneck S 2 R 1, R 2, …, R n S n Dumbbell Topology CSE 222A–Lecture 14:](https://reader033.fdocuments.in/reader033/viewer/2022042310/5ed843570fa3e705ec0e2590/html5/thumbnails/22.jpg)
For Next Class…
● Read the DCTCP paper
2222CSE 222A – Lecture 14: Congestion Control