Lecture 14: Congestion Control - cseweb.ucsd.edu · CSE 222A–Lecture 14: Congestion Control 14. S...

Preview:

Citation preview

CSE 222A: Computer Communication NetworksAlex C. Snoeren

Lecture 14:Congestion Control

Thanks: Amin Vahdat, Dina Katabi

Lecture 14 Overview

● TCP congestion control review

● XCP Overview

2CSE 222A – Lecture 14: Congestion Control

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

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

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

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

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

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

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

1. Congestion Controller2. Fairness Controller

XCP Overview

10CSE 222A – Lecture 14: Congestion Control

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

Feedback = + 0.1 packet

Round Trip Time

Congestion Window

Feedback = - 0.3 packet

XCP Example

12CSE 222A – Lecture 14: Congestion Control

Congestion Window = Congestion Window + Feedback

Routers compute feedback without any per-flow state

XCP Example

13CSE 222A – Lecture 14: Congestion Control

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

BottleneckS1

S2

R1, R2, …, Rn

Sn

Dumbbell Topology

15CSE 222A – Lecture 14: Congestion Control

Bottleneck Bandwidth (Mb/s)

Avg.

Util

izat

ion

Round Trip Delay (sec)

Avg.

Util

izat

ion

Efficiency

16CSE 222A – Lecture 14: Congestion Control

Start

40 FlowsStop the 40 Flows

Response to Dynamics

17CSE 222A – Lecture 14: Congestion Control

Average Utilization

Average Queue

Drops

Short Flows

18CSE 222A – Lecture 14: Congestion Control

Different RTTSame RTT

Avg.

Thr

ough

put

Avg.

Thr

ough

put

Fairness

19CSE 222A – Lecture 14: Congestion Control

● 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

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

For Next Class…

● Read the DCTCP paper

2222CSE 222A – Lecture 14: Congestion Control

Recommended