congestion control - purdue university · router congestion control −→ active queue management...

39
CS 536 Park Congestion Control Phenomenon: when too much traffic enters into system, performance degrades -→ excessive traffic can cause congestion Problem: regulate traffic influx such that congestion does not occur -→ congestion control Need to understand: What is congestion? How do we prevent or manage it?

Upload: others

Post on 18-Aug-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Congestion Control - Purdue University · Router congestion control −→ active queue management (AQM) •receiver is a router •Q∗is desired buffer occupancy/delay at router

CS 536 Park

Congestion Control

Phenomenon: when too much traffic enters into system,

performance degrades

−→ excessive traffic can cause congestion

Problem: regulate traffic influx such that congestion does

not occur

−→ congestion control

Need to understand:

•What is congestion?

• How do we prevent or manage it?

Page 2: Congestion Control - Purdue University · Router congestion control −→ active queue management (AQM) •receiver is a router •Q∗is desired buffer occupancy/delay at router

CS 536 Park

Traffic influx/outflux picture:

traffic in−flight

traffic influx traffic outfluxNetwork

• traffic influx: λ(t) “offered load”

→ rate: bps (or pps) at time t

• traffic outflux: γ(t) “throughput”

→ rate: bps (or pps) at time t

• traffic in-flight: Q(t)

→ volume: total packets in transit at time t

Page 3: Congestion Control - Purdue University · Router congestion control −→ active queue management (AQM) •receiver is a router •Q∗is desired buffer occupancy/delay at router

CS 536 Park

Examples:

Highway system:

• traffic influx: no. of cars entering highway per second

• traffic outflux: no. of cars exiting highway per second

• traffic in-flight: no. of cars traveling on highway

−→ at time instance t

California Dept. of Transportation (Caltrans)

Page 4: Congestion Control - Purdue University · Router congestion control −→ active queue management (AQM) •receiver is a router •Q∗is desired buffer occupancy/delay at router

CS 536 Park

Water faucet and sink:

• traffic influx: water influx per second

• traffic outflux: water outflux per second

• traffic in-flight: water level in sink

−→ “congestion?”

faucet.com

Thermostat . . .

Page 5: Congestion Control - Purdue University · Router congestion control −→ active queue management (AQM) •receiver is a router •Q∗is desired buffer occupancy/delay at router

CS 536 Park

802.11b WLAN:

• Throughput

3

3.5

4

4.5

5

5.5

3.5 4 4.5 5 5.5 6 6.5

MA

C S

yste

m T

houghput (M

b/s

)

Offered Load (Mb/s)

node 2node 5

node 10node 20node 30node 50

node 100

−→ unimodal or bell-shaped

−→ recall: less pronounced in real systems

Page 6: Congestion Control - Purdue University · Router congestion control −→ active queue management (AQM) •receiver is a router •Q∗is desired buffer occupancy/delay at router

CS 536 Park

802.11b WLAN:

• Collision

0

10

20

30

40

50

60

70

3.5 4 4.5 5 5.5 6 6.5

Colli

sion P

robabili

ty (

%)

Offered Load (Mb/s)

node 2node 5

node 10node 20node 30node 50

node 100

−→ underlying cause of unimodal throughput

Page 7: Congestion Control - Purdue University · Router congestion control −→ active queue management (AQM) •receiver is a router •Q∗is desired buffer occupancy/delay at router

CS 536 Park

What we can regulate or control:

−→ traffic influx rate λ(t)

Ex.:

• Faucet knob in water sink

• Temperature needle in thermostat

• Cars entering onto highway

• Traffic sent by UDP or TCP

What we cannot control: the rest

−→ except in the long run: bandwidth planning

−→ does scheduling help?

−→ Kleinrock’s conservation law: “zero-sum pie”

Page 8: Congestion Control - Purdue University · Router congestion control −→ active queue management (AQM) •receiver is a router •Q∗is desired buffer occupancy/delay at router

CS 536 Park

How does in-flight traffic or load Q(t) vary?

At time t + 1:

Q(t + 1) = Q(t) + λ(t)− γ(t)

• Q(t): what was there to begin with

• λ(t): what newly arrived

• γ(t): what newly exited (delivered to applications)

• λ(t)− γ(t): net influx

• Q(t) cannot be negative

→ Q(t + 1) = max{0, Q(t) + λ(t)− γ(t)}• missing item?

Page 9: Congestion Control - Purdue University · Router congestion control −→ active queue management (AQM) •receiver is a router •Q∗is desired buffer occupancy/delay at router

CS 536 Park

Goal: Want to keep system in “good/desirable” state

Ex.: If λ(t) > γ(t) for all time then

Q(t)→∞ as t→∞

−→ water level in sink grows and grows

−→ water sink has finite “buffer” capacity, overflows

−→ want to keep water level stable; how?

Control actions:

• If water level is too high, close faucet

• If water level is too low, open faucet

−→ feedback control

−→ “state of system”: water level

Page 10: Congestion Control - Purdue University · Router congestion control −→ active queue management (AQM) •receiver is a router •Q∗is desired buffer occupancy/delay at router

CS 536 Park

Pseudo Real-Time Multimedia Streaming

−→ e.g., RealPlayer, Rhapsody, Internet radio

−→ “pseudo” because of prefetching trick

−→ application is given headstart: few seconds

−→ why?

Goal: fill buffer & prevent from becoming empty

Method:

• prefetch X seconds worth of data (e.g., audio/video)

• initial delayed playback: penalty of pseudo real-time

• keep fetching audio/video data such that X seconds

worth of future data resides in receiver’s buffer

→ allows hiding of spurious congestion

→ user: continuous playback experience

→ can it work if bandwidth < app data rate?

Page 11: Congestion Control - Purdue University · Router congestion control −→ active queue management (AQM) •receiver is a router •Q∗is desired buffer occupancy/delay at router

CS 536 Park

Pseudo real-time traffic control architecture:

λ (t) γ

Sender Receiver

Buffer

Q Q(t)*

• Q(t): current buffer level

• Q∗: desired buffer level

• γ: throughput, i.e., playback rate

→ e.g., for video 24 frames-per-second (fps)

Goal: vary λ(t) such that Q(t) ≈ Q∗

−→ don’t buffer too much (memory cost)

−→ don’t buffer too little (bumpy road)

Page 12: Congestion Control - Purdue University · Router congestion control −→ active queue management (AQM) •receiver is a router •Q∗is desired buffer occupancy/delay at router

CS 536 Park

Basic idea:

• if Q(t) = Q∗ do nothing

• if Q(t) < Q∗ increase λ(t)

• if Q(t) > Q∗ decrease λ(t)

−→ “control law”

−→ thermostat control (same as water faucet)

Protocol implementation:

• control action undertaken at sender

→ smart sender/dump receiver

→ when might the opposite be better?

• receiver informs sender of Q∗ and Q(t)

→ feedback packet (“control signaling”)

→ or just Q∗ −Q(t)

→ or just up/down (binary)

Page 13: Congestion Control - Purdue University · Router congestion control −→ active queue management (AQM) •receiver is a router •Q∗is desired buffer occupancy/delay at router

CS 536 Park

Other applications:

Router congestion control

−→ active queue management (AQM)

• receiver is a router

• Q∗ is desired buffer occupancy/delay at router

• router throttles sender(s) to maintain Q∗

−→ similar to old source quench message (ICMP)

−→ considered too much messaging overhead

Page 14: Congestion Control - Purdue University · Router congestion control −→ active queue management (AQM) •receiver is a router •Q∗is desired buffer occupancy/delay at router

CS 536 Park

Slightly modified Internet standard:

−→ ECN (explicit congestion notification)

• two bits in IPv4 TOS field

→ ECT: ECN capable transport (bit 6)

→ CE: congestion experienced (bit 7)

• congested router marks ECT

• supported in most routers, default not turned on

• requires TCP sender/receiver changes

Also proposed to throttle denial-of-service attack traffic

−→ push-back

−→ good guy vs. bad guy problem

Page 15: Congestion Control - Purdue University · Router congestion control −→ active queue management (AQM) •receiver is a router •Q∗is desired buffer occupancy/delay at router

CS 536 Park

Key question in feedback congestion control: how much

to increase or decrease λ(t)

−→ “control problem”

−→ different specific manifestation

−→ TCP has its own specific rule

Desired state of the system:

−→ i.e., target operating point

want: Q(t) = Q∗ and λ(t) = γ

Start from:

−→ empty buffer and no sending rate at start

i.e., Q(t) = 0 and λ(t) = 0

Page 16: Congestion Control - Purdue University · Router congestion control −→ active queue management (AQM) •receiver is a router •Q∗is desired buffer occupancy/delay at router

CS 536 Park

Time evolution (or dynamics): track Q(t) and λ(t)

Q*

11 2 3 4 5 6 7 8 9 10 11 12 . . .

Q(t)

t

λ (t)

t

γ

11 2 3 4 5 6 7 8 9 10 11 12 . . .

Page 17: Congestion Control - Purdue University · Router congestion control −→ active queue management (AQM) •receiver is a router •Q∗is desired buffer occupancy/delay at router

CS 536 Park

Congestion control methods: A, B, C and D

Method A:

• if Q(t) = Q∗ then λ(t + 1)← λ(t)

• if Q(t) < Q∗ then λ(t + 1)← λ(t) + a

• if Q(t) > Q∗ then λ(t + 1)← λ(t)− a

where a > 0 is a fixed parameter

−→ linear increase and linear decrease

Question: does it work?

Example:

• Q∗ = 100

• γ = 10

• Q(0) = 0

• λ(0) = 0

• a = 1

Page 18: Congestion Control - Purdue University · Router congestion control −→ active queue management (AQM) •receiver is a router •Q∗is desired buffer occupancy/delay at router

CS 536 Park

0

50

100

150

200

250

0 100 200 300 400 500

Load

Time

Load EvolutionTarget

0

5

10

15

20

25

30

0 100 200 300 400 500

Lamb

da

Time

Lambda EvolutionGamma

Page 19: Congestion Control - Purdue University · Router congestion control −→ active queue management (AQM) •receiver is a router •Q∗is desired buffer occupancy/delay at router

CS 536 Park

With a = 0.5:

0

50

100

150

200

250

0 100 200 300 400 500

Load

Time

Load EvolutionTarget

0

5

10

15

20

25

30

0 100 200 300 400 500

Lamb

da

Time

Lambda EvolutionGamma

Page 20: Congestion Control - Purdue University · Router congestion control −→ active queue management (AQM) •receiver is a router •Q∗is desired buffer occupancy/delay at router

CS 536 Park

With a = 3:

0

50

100

150

200

250

0 100 200 300 400 500

Load

Time

Load EvolutionTarget

0

5

10

15

20

25

30

0 100 200 300 400 500

Lamb

da

Time

Lambda EvolutionGamma

Page 21: Congestion Control - Purdue University · Router congestion control −→ active queue management (AQM) •receiver is a router •Q∗is desired buffer occupancy/delay at router

CS 536 Park

With a = 6:

0

50

100

150

200

250

0 100 200 300 400 500

Load

Time

Load EvolutionTarget

0

5

10

15

20

25

30

0 100 200 300 400 500

Lamb

da

Time

Lambda EvolutionGamma

Page 22: Congestion Control - Purdue University · Router congestion control −→ active queue management (AQM) •receiver is a router •Q∗is desired buffer occupancy/delay at router

CS 536 Park

Remarks:

• Method A isn’t that great no matter what a value is

used

→ keeps oscillating

• Actually: would lead to unbounded oscillation if not

for physical restriction λ(t) ≥ 0 and Q(t) ≥ 0

−→ easily seen: start from non-zero buffer

−→ e.g., Q(0) = 110

Page 23: Congestion Control - Purdue University · Router congestion control −→ active queue management (AQM) •receiver is a router •Q∗is desired buffer occupancy/delay at router

CS 536 Park

With a = 1, Q(0) = 110, λ(0) = 11:

0

50

100

150

200

250

0 20 40 60 80 100

Load

Time

Load EvolutionTarget

0

5

10

15

20

25

30

0 20 40 60 80 100

Lamb

da

Time

Lambda EvolutionGamma

Page 24: Congestion Control - Purdue University · Router congestion control −→ active queue management (AQM) •receiver is a router •Q∗is desired buffer occupancy/delay at router

CS 536 Park

Method B:

• if Q(t) = Q∗ then λ(t + 1)← λ(t)

• if Q(t) < Q∗ then λ(t + 1)← λ(t) + a

• if Q(t) > Q∗ then λ(t + 1)← δ · λ(t)

where a > 0 and 0 < δ < 1 are fixed parameters

Note: only decrease part differs from Method A.

−→ linear increase with slope a

−→ exponential decrease with backoff factor δ

−→ e.g., binary backoff in case δ = 1/2

Similar to Ethernet and WLAN backoff

−→ question: does it work?

Page 25: Congestion Control - Purdue University · Router congestion control −→ active queue management (AQM) •receiver is a router •Q∗is desired buffer occupancy/delay at router

CS 536 Park

With a = 1, δ = 1/2:

0

50

100

150

200

250

0 40 80 120 160 200

Load

Time

Load EvolutionTarget

0

5

10

15

20

25

30

0 40 80 120 160 200

Lamb

da

Time

Lambda EvolutionGamma

Page 26: Congestion Control - Purdue University · Router congestion control −→ active queue management (AQM) •receiver is a router •Q∗is desired buffer occupancy/delay at router

CS 536 Park

With a = 3, δ = 1/2:

0

50

100

150

200

250

0 40 80 120 160 200

Load

Time

Load EvolutionTarget

0

5

10

15

20

25

30

0 40 80 120 160 200

Lamb

da

Time

Lambda EvolutionGamma

Page 27: Congestion Control - Purdue University · Router congestion control −→ active queue management (AQM) •receiver is a router •Q∗is desired buffer occupancy/delay at router

CS 536 Park

With a = 1, δ = 1/4:

0

50

100

150

200

250

0 40 80 120 160 200

Load

Time

Load EvolutionTarget

0

5

10

15

20

25

30

0 40 80 120 160 200

Lamb

da

Time

Lambda EvolutionGamma

Page 28: Congestion Control - Purdue University · Router congestion control −→ active queue management (AQM) •receiver is a router •Q∗is desired buffer occupancy/delay at router

CS 536 Park

With a = 1, δ = 3/4:

0

50

100

150

200

250

0 40 80 120 160 200

Load

Time

Load EvolutionTarget

0

5

10

15

20

25

30

0 40 80 120 160 200

Lamb

da

Time

Lambda EvolutionGamma

Page 29: Congestion Control - Purdue University · Router congestion control −→ active queue management (AQM) •receiver is a router •Q∗is desired buffer occupancy/delay at router

CS 536 Park

Note:

• Method B isn’t that great either

• One advantage over Method A: doesn’t lead to un-

bounded oscillation

→ note: doesn’t hit “rock bottom”

→ due to asymmetry in increase vs. decrease policy

→ typical “sawtooth” pattern

• Method B is used by TCP

→ linear increase/exponential decrease

→ additive increase/multiplicative decrease (AIMD)

Question: can we do better?

−→ what “freebie” have we not utilized yet?

Page 30: Congestion Control - Purdue University · Router congestion control −→ active queue management (AQM) •receiver is a router •Q∗is desired buffer occupancy/delay at router

CS 536 Park

Method C:

λ(t + 1)← λ(t) + ε(Q∗ −Q(t))

where ε > 0 is a fixed parameter

Tries to adjust magnitude of change as a function of the

gap Q∗ −Q(t)

−→ incorporate distance from target Q∗

−→ before: just the sign (above/below)

Thus:

• if Q∗ −Q(t) > 0, increase λ(t) proportional to gap

• if Q∗ −Q(t) < 0, decrease λ(t) proportional to gap

Trying to be more clever. . .

−→ bottom line: is it any good?

Page 31: Congestion Control - Purdue University · Router congestion control −→ active queue management (AQM) •receiver is a router •Q∗is desired buffer occupancy/delay at router

CS 536 Park

With ε = 0.1:

0

50

100

150

200

250

0 50 100 150 200

Load

Time

Load EvolutionTarget

0

5

10

15

20

25

30

0 50 100 150 200

Lamb

da

Time

Lambda EvolutionGamma

Page 32: Congestion Control - Purdue University · Router congestion control −→ active queue management (AQM) •receiver is a router •Q∗is desired buffer occupancy/delay at router

CS 536 Park

With ε = 0.5:

0

50

100

150

200

250

0 50 100 150 200

Load

Time

Load EvolutionTarget

0

5

10

15

20

25

30

0 50 100 150 200

Lamb

da

Time

Lambda EvolutionGamma

Page 33: Congestion Control - Purdue University · Router congestion control −→ active queue management (AQM) •receiver is a router •Q∗is desired buffer occupancy/delay at router

CS 536 Park

Answer: no

−→ looks good but looks can be deceiving

Time to try something strange

−→ any (crazy) ideas?

−→ good for course project (assuming it works)

Page 34: Congestion Control - Purdue University · Router congestion control −→ active queue management (AQM) •receiver is a router •Q∗is desired buffer occupancy/delay at router

CS 536 Park

Odd looking modification to Method C:

Method D:

λ(t + 1)← λ(t) + ε(Q∗ −Q(t))− β(λ(t)− γ)

where ε > 0 and β > 0 are fixed parameters

−→ additional term −β(λ(t)− γ)

−→ what’s going on?

Sanity check: at desired operating point Q(t) = Q∗ and

λ(t) = γ, nothing should move

−→ check with methods A, B and C

−→ fixed-point property

−→ what about Method D?

Now: does Method D get to the targe fixed point?

Page 35: Congestion Control - Purdue University · Router congestion control −→ active queue management (AQM) •receiver is a router •Q∗is desired buffer occupancy/delay at router

CS 536 Park

With ε = 0.2 and β = 0.5:

0

50

100

150

200

250

0 5 10 15 20 25 30 35 40 45 50

Load

Time

Load EvolutionTarget

0

5

10

15

20

25

30

0 5 10 15 20 25 30 35 40 45 50

Lamb

da

Time

Lambda EvolutionGamma

Page 36: Congestion Control - Purdue University · Router congestion control −→ active queue management (AQM) •receiver is a router •Q∗is desired buffer occupancy/delay at router

CS 536 Park

With ε = 0.5 and β = 1.1:

0

50

100

150

200

250

0 5 10 15 20 25 30 35 40 45 50

Load

Time

Load EvolutionTarget

0

5

10

15

20

25

30

0 5 10 15 20 25 30 35 40 45 50

Lamb

da

Time

Lambda EvolutionGamma

Page 37: Congestion Control - Purdue University · Router congestion control −→ active queue management (AQM) •receiver is a router •Q∗is desired buffer occupancy/delay at router

CS 536 Park

With ε = 0.1 and β = 1.0:

0

50

100

150

200

250

0 5 10 15 20 25 30 35 40 45 50

Load

Time

Load EvolutionTarget

0

5

10

15

20

25

30

0 5 10 15 20 25 30 35 40 45 50

Lamb

da

Time

Lambda EvolutionGamma

Page 38: Congestion Control - Purdue University · Router congestion control −→ active queue management (AQM) •receiver is a router •Q∗is desired buffer occupancy/delay at router

CS 536 Park

Remarks:

• Method D has desired behavior

• Is superior to Methods A, B, and C

• No unbounded oscillation

• In fact, dampening and convergence to desired oper-

ating point

→ converges to target operating point (Q∗, γ)

limt→∞(Q(t), λ(t)) = (Q∗, γ)

→ asymptotic stability

• Starting point (Q(0), λ(0)) issue:

→ if target is reached from anywhere: global stability

→ if target is reached when nearby: local stability

→ want global stability

Page 39: Congestion Control - Purdue University · Router congestion control −→ active queue management (AQM) •receiver is a router •Q∗is desired buffer occupancy/delay at router

CS 536 Park

Why does it work?

What is the role of the −β(λ(t)− γ) term in the control

law:

λ(t + 1)← λ(t) + ε(Q∗ −Q(t))− β(λ(t)− γ)

Need to look beneath the hood . . .

−→ do you care about the engine or just the exterior?

−→ are you “deep” or superficial?

−→ answer: let’s try to be both