lecture 14: congestion control - computer science · 2013-02-26 · congestion control...

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

Upload: others

Post on 30-May-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Lecture 14: Congestion Control - Computer Science · 2013-02-26 · Congestion Control Overview" Challenge: how do we efficiently share network resources among billions of hosts?

CSE 222A: Computer Communication Networks Alex C. Snoeren

Lecture 14:Congestion Control"

Thanks: Amin Vahdat, Dina Katabi

Page 2: Lecture 14: Congestion Control - Computer Science · 2013-02-26 · Congestion Control Overview" Challenge: how do we efficiently share network resources among billions of hosts?

Lecture 14 Overview"  TCP congestion control review

  XCP Overview

2 CSE 222A – Lecture 14: Congestion Control"

Page 3: Lecture 14: Congestion Control - Computer Science · 2013-02-26 · Congestion Control Overview" Challenge: how do we efficiently share network resources among billions of hosts?

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 CSE 222A – Lecture 14: Congestion Control"

Page 4: Lecture 14: Congestion Control - Computer Science · 2013-02-26 · Congestion Control Overview" Challenge: how do we efficiently share network resources among billions of hosts?

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 CSE 222A – Lecture 14: Congestion Control"

Page 5: Lecture 14: Congestion Control - Computer Science · 2013-02-26 · Congestion Control Overview" Challenge: how do we efficiently share network resources among billions of hosts?

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 CSE 222A – Lecture 14: Congestion Control"

Page 6: Lecture 14: Congestion Control - Computer Science · 2013-02-26 · Congestion Control Overview" Challenge: how do we efficiently share network resources among billions of hosts?

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 CSE 222A – Lecture 14: Congestion Control"

Page 7: Lecture 14: Congestion Control - Computer Science · 2013-02-26 · Congestion Control Overview" Challenge: how do we efficiently share network resources among billions of hosts?

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 CSE 222A – Lecture 14: Congestion Control"

Page 8: Lecture 14: Congestion Control - Computer Science · 2013-02-26 · Congestion Control Overview" Challenge: how do we efficiently share network resources among billions of hosts?

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 CSE 222A – Lecture 14: Congestion Control"

Page 9: Lecture 14: Congestion Control - Computer Science · 2013-02-26 · Congestion Control Overview" Challenge: how do we efficiently share network resources among billions of hosts?

TCP “Sawtooth”"  Oscillates around bottleneck bandwidth

◆  Adjusts to changes in competing traffic

0!

2!

4!

6!

8!

10!

12!

14!

16!

18!

window !(in segs)!

round-trip times!

Additive Increase/Multiplicative Decrease!

9 CSE 222A – Lecture 14: Congestion Control"

Page 10: Lecture 14: Congestion Control - Computer Science · 2013-02-26 · Congestion Control Overview" Challenge: how do we efficiently share network resources among billions of hosts?

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 CSE 222A – Lecture 14: Congestion Control"

Page 11: Lecture 14: Congestion Control - Computer Science · 2013-02-26 · Congestion Control Overview" Challenge: how do we efficiently share network resources among billions of hosts?

Slow Start"  Quickly find the bottleneck bandwidth

0!

50!

100!

150!

200!

250!

300!

0! 1! 2! 3! 4! 5! 6! 7! 8!

window !(in segs)!

round-trip times!

Slow Start!

11 CSE 222A – Lecture 14: Congestion Control"

Page 12: Lecture 14: Congestion Control - Computer Science · 2013-02-26 · Congestion Control Overview" Challenge: how do we efficiently share network resources among billions of hosts?

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 CSE 222A – Lecture 14: Congestion Control"

Page 13: Lecture 14: Congestion Control - Computer Science · 2013-02-26 · Congestion Control Overview" Challenge: how do we efficiently share network resources among billions of hosts?

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 CSE 222A – Lecture 14: Congestion Control"

Page 14: Lecture 14: Congestion Control - Computer Science · 2013-02-26 · Congestion Control Overview" Challenge: how do we efficiently share network resources among billions of hosts?

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 CSE 222A – Lecture 14: Congestion Control"

Page 15: Lecture 14: Congestion Control - Computer Science · 2013-02-26 · Congestion Control Overview" Challenge: how do we efficiently share network resources among billions of hosts?

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

15 CSE 222A – Lecture 14: Congestion Control"

Page 16: Lecture 14: Congestion Control - Computer Science · 2013-02-26 · Congestion Control Overview" Challenge: how do we efficiently share network resources among billions of hosts?

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 CSE 222A – Lecture 14: Congestion Control"

Page 17: Lecture 14: Congestion Control - Computer Science · 2013-02-26 · Congestion Control Overview" Challenge: how do we efficiently share network resources among billions of hosts?

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"

17 CSE 222A – Lecture 14: Congestion Control"

Page 18: Lecture 14: Congestion Control - Computer Science · 2013-02-26 · Congestion Control Overview" Challenge: how do we efficiently share network resources among billions of hosts?

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 CSE 222A – Lecture 14: Congestion Control"

Page 19: Lecture 14: Congestion Control - Computer Science · 2013-02-26 · Congestion Control Overview" Challenge: how do we efficiently share network resources among billions of hosts?

1.  Congestion Controller 2.  Fairness Controller

XCP Overview"

19 CSE 222A – Lecture 14: Congestion Control"

Page 20: Lecture 14: Congestion Control - Computer Science · 2013-02-26 · Congestion Control Overview" Challenge: how do we efficiently share network resources among billions of hosts?

Feedback

Round Trip Time

Congestion Window

Congestion Header

Feedback

Round Trip Time

Congestion Window

Feedback = + 0.1 packet

XCP Example"

20 CSE 222A – Lecture 14: Congestion Control"

Page 21: Lecture 14: Congestion Control - Computer Science · 2013-02-26 · Congestion Control Overview" Challenge: how do we efficiently share network resources among billions of hosts?

Feedback = + 0.1 packet

Round Trip Time

Congestion Window

Feedback = - 0.3 packet

XCP Example"

21 CSE 222A – Lecture 14: Congestion Control"

Page 22: Lecture 14: Congestion Control - Computer Science · 2013-02-26 · Congestion Control Overview" Challenge: how do we efficiently share network resources among billions of hosts?

Congestion Window = Congestion Window + Feedback

Routers compute feedback without any per-flow state

XCP Example"

22 CSE 222A – Lecture 14: Congestion Control"

Page 23: Lecture 14: Congestion Control - Computer Science · 2013-02-26 · Congestion Control Overview" Challenge: how do we efficiently share network resources among billions of hosts?

Congestion Controller Fairness Controller Goal: Divides Δ between flows to converge to fairness Looks at a flow’s state in Congestion Header

Algorithm:

If Δ > 0 ⇒ Divide Δ equally between flows If Δ < 0 ⇒ Divide Δ 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 Δ Δ ~ Spare Bandwidth Δ  ~ - Queue Size So, Δ = α davg Spare - β Queue

Feedback Computation"

23 CSE 222A – Lecture 14: Congestion Control"

Page 24: Lecture 14: Congestion Control - Computer Science · 2013-02-26 · Congestion Control Overview" Challenge: how do we efficiently share network resources among billions of hosts?

Bottleneck S1 S2

R1, R2, …, Rn

Sn

Dumbbell Topology"

24 CSE 222A – Lecture 14: Congestion Control"

Page 25: Lecture 14: Congestion Control - Computer Science · 2013-02-26 · Congestion Control Overview" Challenge: how do we efficiently share network resources among billions of hosts?

Bottleneck Bandwidth (Mb/s)

Avg.

Util

izat

ion

Round Trip Delay (sec)

Avg.

Util

izat

ion

Efficiency ""

25 CSE 222A – Lecture 14: Congestion Control"

Page 26: Lecture 14: Congestion Control - Computer Science · 2013-02-26 · Congestion Control Overview" Challenge: how do we efficiently share network resources among billions of hosts?

Start

40 Flows Stop the 40 Flows

Response to Dynamics"

26 CSE 222A – Lecture 14: Congestion Control"

Page 27: Lecture 14: Congestion Control - Computer Science · 2013-02-26 · Congestion Control Overview" Challenge: how do we efficiently share network resources among billions of hosts?

Average Utilization

Average Queue

Drops

Short Flows"

27 CSE 222A – Lecture 14: Congestion Control"

Page 28: Lecture 14: Congestion Control - Computer Science · 2013-02-26 · Congestion Control Overview" Challenge: how do we efficiently share network resources among billions of hosts?

Different RTT Same RTT

Avg.

Thr

ough

put

Avg.

Thr

ough

put

Fairness"

28 CSE 222A – Lecture 14: Congestion Control"

Page 29: Lecture 14: Congestion Control - Computer Science · 2013-02-26 · Congestion Control Overview" Challenge: how do we efficiently share network resources among billions of hosts?

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 29 CSE 222A – Lecture 14: Congestion Control"