EE 122: Congestion Control The Sequel

17
EE 122: Congestion Control The Sequel October 1, 2003

description

EE 122: Congestion Control The Sequel. October 1, 2003. Quick Review. Slow-Start: cwnd++ upon every new ACK Congestion avoidance: AIMD if cwnd > ssthresh ACK: cwnd = cwnd + 1/cwnd Drop: ssthresh =cwnd/2 and cwnd=1 Fast Recovery: duplicate ACKS: cwnd=cwnd/2 Timeout: cwnd=1. TCP Flavors. - PowerPoint PPT Presentation

Transcript of EE 122: Congestion Control The Sequel

Page 1: EE 122: Congestion Control The Sequel

EE 122: Congestion Control

The Sequel

October 1, 2003

Page 2: EE 122: Congestion Control The Sequel

2

Quick Review

Slow-Start: cwnd++ upon every new ACK

Congestion avoidance: AIMD if cwnd > ssthresh- ACK: cwnd = cwnd + 1/cwnd

- Drop: ssthresh =cwnd/2 and cwnd=1

Fast Recovery:- duplicate ACKS: cwnd=cwnd/2

- Timeout: cwnd=1

Page 3: EE 122: Congestion Control The Sequel

3

TCP Flavors

TCP-Tahoe- cwnd =1 whenever drop is detected

TCP-Reno- cwnd =1 on timeout

- cwnd = cwnd/2 on dupack

TCP-newReno- TCP-Reno + improved fast recovery

TCP-Vegas, TCP-SACK

Page 4: EE 122: Congestion Control The Sequel

4

TCP Vegas

Improved timeout mechanism

Decrease cwnd only for losses sent at current rate- avoids reducing rate twice

Congestion avoidance phase:- compare Actual rate (A) to Expected rate (E)

- if E-A > , decrease cwnd linearly

- if E-A < , increase cwnd linearly

- rate measurements ~ delay measurements

- see textbook for details!

Page 5: EE 122: Congestion Control The Sequel

5

TCP-SACK

SACK = Selective Acknowledgements

ACK packets identify exactly which packets have arrived

Makes recovery from multiple losses much easier

Page 6: EE 122: Congestion Control The Sequel

6

Standards?

How can all these algorithms coexist?

Don’t we need a single, uniform standard?

What happens if I’m using Reno and you are using Tahoe, and we try to communicate?

Page 7: EE 122: Congestion Control The Sequel

7

Equation-Based CC

Simple scenario- assume a drop every k’th RTT (for some large k)

- w, w+1, w+2, ...w+k-1 DROP (w+k-1)/2, (w+k-1)/2+1,...

Observations:- In steady state: w= (w+k-1)/2 so w=k-1

- Average window: 1.5(k-1)

- Total packets between drops: 1.5k(k-1)

- Drop probability: p = 1/[1.5k(k-1)]

Throughput: T ~ (1/RTT)*sqrt(3/2p)

Page 8: EE 122: Congestion Control The Sequel

8

Equation-Based CC

Idea:- Forget complicated increase/decrease algorithms

- Use this equation T(p) directly!

Approach:- measure drop rate (don’t need ACKs for this)

- send drop rate p to source

- source sends at rate T(p)

Good for streaming audio/video that can’t tolerate the high variability of TCP’s sending rate

Page 9: EE 122: Congestion Control The Sequel

9

Question!

Why use the TCP equation?

Why not use any equation for T(p)?

Page 10: EE 122: Congestion Control The Sequel

10

Cheating

Three main ways to cheat:- increasing cwnd faster than 1 per RTT

- using large initial cwnd

- Opening many connections

Page 11: EE 122: Congestion Control The Sequel

11

Increasing cwnd Faster

A Bx

D Ey

Limit rates:x = 2y

C

x

y

x increases by 2 per RTTy increases by 1 per RTT

Page 12: EE 122: Congestion Control The Sequel

12

Increasing cwnd Faster

A Bx

D Ey

0

10

20

30

40

50

60

1 28 55 82 109

136

163

190

217

244

271

298

325

352

379

406

433

460

487

Page 13: EE 122: Congestion Control The Sequel

13

Larger Initial cwnd

A Bx

D Ey

x starts SS with cwnd = 4y starts SS with cwnd = 1

Page 14: EE 122: Congestion Control The Sequel

14

Open Many Connections

A Bx

D Ey

Assume • A starts 10 connections to B• D starts 1 connection to E• Each connection gets about the same throughput

Then A gets 10 times more throughput than D

Page 15: EE 122: Congestion Control The Sequel

15

Cheating and Game Theory

A Bx

D Ey

22, 22 10, 35

35, 10 15, 15

(x, y)A

Increases by 1

Increases by 5

D Increases by 1 Increases by 5

Individual incentives: cheating paysSocial incentives: better off without cheating

Classic PD: resolution depends on accountability

Too aggressiveLossesThroughput falls

Page 16: EE 122: Congestion Control The Sequel

16

Lossy Links

TCP assumes that all losses are due to congestion

What happens when the link is lossy?

Recall that Tput ~ 1/sqrt(p) where p is loss prob.

This applies even for non-congestion losses

Page 17: EE 122: Congestion Control The Sequel

17

Example

0

10

20

30

40

50

60

1 26 51 76 101 126 151 176 201 226 251 276 301 326 351 376 401 426 451 476

p = 0

p = 1%

p = 10%