lecture 14: congestion control - cseweb.ucsd.edu · cse 222a–lecture 14: congestion control 14. s...

22
CSE 222A: Computer Communication Networks Alex C. Snoeren Lecture 14: Congestion Control Thanks: Amin Vahdat, Dina Katabi

Upload: others

Post on 30-May-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

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:

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:

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:

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:

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:

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:

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:

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:

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:

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:

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:

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:

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:

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:

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:

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:

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:

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:

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:

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:

● 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:

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:

For Next Class…

● Read the DCTCP paper

2222CSE 222A – Lecture 14: Congestion Control