61
Walrand - 9/2011 Scheduling in Networks Jean Walrand EECS University of California, Berkeley ITC, San Francisco, 9/2011 Ref: Jiang-Walrand: Scheduling and Congestion Control for Wireless and Processing Networks. Morgan-Claypool 2010

Scheduling in Networks - International Teletraffic Congress · The implementable algorithm is a stochastic approximation version of the dual gradient algorithm ... Stochastic Network

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Scheduling in Networks - International Teletraffic Congress · The implementable algorithm is a stochastic approximation version of the dual gradient algorithm ... Stochastic Network

Walrand - 9/2011

Scheduling in Networks

Jean Walrand

EECS

University of California, Berkeley

ITC, San Francisco, 9/2011Ref: Jiang-Walrand: Scheduling and Congestion Control for

Wireless and Processing Networks. Morgan-Claypool 2010

Page 2: Scheduling in Networks - International Teletraffic Congress · The implementable algorithm is a stochastic approximation version of the dual gradient algorithm ... Stochastic Network

Walrand - 9/2011

Outline

Example 1: SwitchExample 2: Ad Hoc NetworkStabilityDelaysStatusConclusions

Page 3: Scheduling in Networks - International Teletraffic Congress · The implementable algorithm is a stochastic approximation version of the dual gradient algorithm ... Stochastic Network

Walrand - 9/2011

Switch

Page 4: Scheduling in Networks - International Teletraffic Congress · The implementable algorithm is a stochastic approximation version of the dual gradient algorithm ... Stochastic Network

Walrand - 9/2011

Switch

Page 5: Scheduling in Networks - International Teletraffic Congress · The implementable algorithm is a stochastic approximation version of the dual gradient algorithm ... Stochastic Network

Walrand - 9/2011

Switch

Page 6: Scheduling in Networks - International Teletraffic Congress · The implementable algorithm is a stochastic approximation version of the dual gradient algorithm ... Stochastic Network

Walrand - 9/2011

Switch

Page 7: Scheduling in Networks - International Teletraffic Congress · The implementable algorithm is a stochastic approximation version of the dual gradient algorithm ... Stochastic Network

Walrand - 9/2011

Switch

Page 8: Scheduling in Networks - International Teletraffic Congress · The implementable algorithm is a stochastic approximation version of the dual gradient algorithm ... Stochastic Network

Walrand - 9/2011

Switch

Page 9: Scheduling in Networks - International Teletraffic Congress · The implementable algorithm is a stochastic approximation version of the dual gradient algorithm ... Stochastic Network

Walrand - 9/2011

Switch

Page 10: Scheduling in Networks - International Teletraffic Congress · The implementable algorithm is a stochastic approximation version of the dual gradient algorithm ... Stochastic Network

Walrand - 9/2011

Switch

Page 11: Scheduling in Networks - International Teletraffic Congress · The implementable algorithm is a stochastic approximation version of the dual gradient algorithm ... Stochastic Network

Walrand - 9/2011

Switch

Page 12: Scheduling in Networks - International Teletraffic Congress · The implementable algorithm is a stochastic approximation version of the dual gradient algorithm ... Stochastic Network

Walrand - 9/2011

Switcho Which packet should be sent next to output N?

o Goals?- High Throughput- Fairness- Low Delays

o Classical Answer: - Maximum Weighted Matching

Much Too Complex!o Simpler Answer:

- Adaptive Random Requests

Page 13: Scheduling in Networks - International Teletraffic Congress · The implementable algorithm is a stochastic approximation version of the dual gradient algorithm ... Stochastic Network

Walrand - 9/2011

Switch

o Input 1 : Select random delay withmean exp{- X1j} for every j

o If minimum delay is for j, input 1 checks if output j is busy

- If not, it sends a packet to j- If yes, it repeats

o Same for the other inputs

Adaptive Random Requests:

o Basic Idea: Favor larger backlogs

Page 14: Scheduling in Networks - International Teletraffic Congress · The implementable algorithm is a stochastic approximation version of the dual gradient algorithm ... Stochastic Network

Walrand - 9/2011

Switch

o Results:

Adaptive Random Requests:

Essentially 100% throughput

Delays can be controlled if we accepta small throughput reduction

Works with variable packet lengths

Fairness? Next slide.

Page 15: Scheduling in Networks - International Teletraffic Congress · The implementable algorithm is a stochastic approximation version of the dual gradient algorithm ... Stochastic Network

Walrand - 9/2011

Switch

o Fairness: Adaptive Random Requests:

• Requires congestion control

• Input ij reduces ij if xij increases

• Choose ij to maximize

uij(ij) – xijij

o Result: • Essentially maximizes uij(ij)

Page 16: Scheduling in Networks - International Teletraffic Congress · The implementable algorithm is a stochastic approximation version of the dual gradient algorithm ... Stochastic Network

Walrand - 9/2011

Ad Hoc Network

Page 17: Scheduling in Networks - International Teletraffic Congress · The implementable algorithm is a stochastic approximation version of the dual gradient algorithm ... Stochastic Network

Walrand - 9/2011

Ad Hoc Network

8

5

2

1

9 7 5

4

Page 18: Scheduling in Networks - International Teletraffic Congress · The implementable algorithm is a stochastic approximation version of the dual gradient algorithm ... Stochastic Network

Walrand - 9/2011

Ad Hoc Network

8

5

2

1

9 7 5

4

12.(9 – 7)< 5.(9 – 4) = 25

Random T,Mean e-α25

10.(7 – 5)< 8.(5 – 2) = 24

Random S,Mean e-α24

9T

T S

Page 19: Scheduling in Networks - International Teletraffic Congress · The implementable algorithm is a stochastic approximation version of the dual gradient algorithm ... Stochastic Network

Walrand - 9/2011

Ad Hoc Network

8

5

2

1

9 7 5

4

12.(9 – 7)< 5.(9 – 4) = 25

Random T,Mean e-α25

10.(7 – 5)< 8.(5 – 2) = 24

Random S,Mean e-α24

9T

T S

Page 20: Scheduling in Networks - International Teletraffic Congress · The implementable algorithm is a stochastic approximation version of the dual gradient algorithm ... Stochastic Network

Walrand - 9/2011

Ad Hoc Network

8

5

2

1

9 7 5

4

Say that S < T

T S

4

3

Page 21: Scheduling in Networks - International Teletraffic Congress · The implementable algorithm is a stochastic approximation version of the dual gradient algorithm ... Stochastic Network

Walrand - 9/2011

Ad Hoc Network

8

1

9 7 5

4

4

3

Admission Control:

maximizes uA() – 8

maximizes uB() – 9

Page 22: Scheduling in Networks - International Teletraffic Congress · The implementable algorithm is a stochastic approximation version of the dual gradient algorithm ... Stochastic Network

Walrand - 9/2011

Ad Hoc Network

8

1

9 7 5

4

4

3

Result:Essentially maximizes the

sum of flow utilities

Note: Integrates- congestion control- routing- MAC scheduling

Page 23: Scheduling in Networks - International Teletraffic Congress · The implementable algorithm is a stochastic approximation version of the dual gradient algorithm ... Stochastic Network

Walrand - 9/2011

Ad Hoc Network

Network

Queue Lengths

Time

λ = 0.98*(convex combination of maximal independent sets)

0.2*{1, 3} + 0.3*{1, 4, 6} + 0.3*{3, 5} + 0*{2, 4} + 0.2*{2, 5}

Page 24: Scheduling in Networks - International Teletraffic Congress · The implementable algorithm is a stochastic approximation version of the dual gradient algorithm ... Stochastic Network

Walrand - 9/2011

Ad Hoc Network

Multipath routing allowed

Unicast S2 -> D2Anycast S1 to any D1

Page 25: Scheduling in Networks - International Teletraffic Congress · The implementable algorithm is a stochastic approximation version of the dual gradient algorithm ... Stochastic Network

Walrand - 9/2011

Resource Allocation• Many users compete for resources

•CPU, Memory in Cloud•Energy•Wireless Channels

• For scalability, the protocols must be distributed

• The protocols should be efficient and strategy-proof

• Optimal allocation is NP-hard and requires full knowledge

Page 26: Scheduling in Networks - International Teletraffic Congress · The implementable algorithm is a stochastic approximation version of the dual gradient algorithm ... Stochastic Network

Walrand - 9/2011

Resource Allocation• Replace

MAX iui(xi)by

MAX iui(xi) + H(p)H = entropy of allocation

• Magic:From NP-hard, the problembecomes

• Distributed• Easy

The solution is O(T/)-optimal

T = mixing time ….Bounds on T based on topology of resource conflicts.

Page 27: Scheduling in Networks - International Teletraffic Congress · The implementable algorithm is a stochastic approximation version of the dual gradient algorithm ... Stochastic Network

Walrand - 9/2011

Resource Allocation

USER i:o x maximizes

ui(x) – xqo R = request rate

≈ exp{ q }

RESOURCE ALLOCATION:o Grant requested resources if they are all available

Page 28: Scheduling in Networks - International Teletraffic Congress · The implementable algorithm is a stochastic approximation version of the dual gradient algorithm ... Stochastic Network

Walrand - 9/2011

Resource Allocation

USER i:o Charge xqIntuition:o Greed is expensiveRESULT:o Under reasonable assumptions ….

Scheme is (1/n3)-NASH equilibrium; n = # users.

(Price is almost VCG.)

What about strategic users?

Page 29: Scheduling in Networks - International Teletraffic Congress · The implementable algorithm is a stochastic approximation version of the dual gradient algorithm ... Stochastic Network

Walrand - 9/2011

Processing NetworksTask: 1 from queue 1; Task B: 1 from all queues; Task C: 1 from queue 3

Page 30: Scheduling in Networks - International Teletraffic Congress · The implementable algorithm is a stochastic approximation version of the dual gradient algorithm ... Stochastic Network

Walrand - 9/2011

Processing NetworksTask: 1 from queue 1; Task B: 1 from all queues; Task C: 1 from queue 3

MWM

T = 0

Page 31: Scheduling in Networks - International Teletraffic Congress · The implementable algorithm is a stochastic approximation version of the dual gradient algorithm ... Stochastic Network

Walrand - 9/2011

Processing NetworksTask: 1 from queue 1; Task B: 1 from all queues; Task C: 1 from queue 3

MWM

T = 1-

Page 32: Scheduling in Networks - International Teletraffic Congress · The implementable algorithm is a stochastic approximation version of the dual gradient algorithm ... Stochastic Network

Walrand - 9/2011

Processing NetworksTask: 1 from queue 1; Task B: 1 from all queues; Task C: 1 from queue 3

MWM

T = 1

Page 33: Scheduling in Networks - International Teletraffic Congress · The implementable algorithm is a stochastic approximation version of the dual gradient algorithm ... Stochastic Network

Walrand - 9/2011

Processing NetworksTask: 1 from queue 1; Task B: 1 from all queues; Task C: 1 from queue 3

MWM

T = 2-

Page 34: Scheduling in Networks - International Teletraffic Congress · The implementable algorithm is a stochastic approximation version of the dual gradient algorithm ... Stochastic Network

Walrand - 9/2011

Processing NetworksTask: 1 from queue 1; Task B: 1 from all queues; Task C: 1 from queue 3

MWM

T = 2

Page 35: Scheduling in Networks - International Teletraffic Congress · The implementable algorithm is a stochastic approximation version of the dual gradient algorithm ... Stochastic Network

Walrand - 9/2011

Processing NetworksTask: 1 from queue 1; Task B: 1 from all queues; Task C: 1 from queue 3

MWM

T = 3-

Maximum Weighted Matching is not stable.

Page 36: Scheduling in Networks - International Teletraffic Congress · The implementable algorithm is a stochastic approximation version of the dual gradient algorithm ... Stochastic Network

Walrand - 9/2011

Processing NetworksTask: 1 from queue 1; Task B: 1 from all queues; Task C: 1 from queue 3

DWM: Use MWM based on Virtual Queues

Page 37: Scheduling in Networks - International Teletraffic Congress · The implementable algorithm is a stochastic approximation version of the dual gradient algorithm ... Stochastic Network

Walrand - 9/2011

Processing NetworksTask: 1 from queue 1; Task B: 1 from all queues; Task C: 1 from queue 3

T = 0-

DWM: Use MWM based on Virtual Queues

Page 38: Scheduling in Networks - International Teletraffic Congress · The implementable algorithm is a stochastic approximation version of the dual gradient algorithm ... Stochastic Network

Walrand - 9/2011

Processing NetworksTask: 1 from queue 1; Task B: 1 from all queues; Task C: 1 from queue 3

T = 0

DWM: Use MWM based on Virtual Queues

Page 39: Scheduling in Networks - International Teletraffic Congress · The implementable algorithm is a stochastic approximation version of the dual gradient algorithm ... Stochastic Network

Walrand - 9/2011

Processing NetworksTask: 1 from queue 1; Task B: 1 from all queues; Task C: 1 from queue 3

T = 1-

DWM: Use MWM based on Virtual Queues

Page 40: Scheduling in Networks - International Teletraffic Congress · The implementable algorithm is a stochastic approximation version of the dual gradient algorithm ... Stochastic Network

Walrand - 9/2011

Processing NetworksTask: 1 from queue 1; Task B: 1 from all queues; Task C: 1 from queue 3

T = 1

DWM: Use MWM based on Virtual Queues

Page 41: Scheduling in Networks - International Teletraffic Congress · The implementable algorithm is a stochastic approximation version of the dual gradient algorithm ... Stochastic Network

Walrand - 9/2011

Processing NetworksTask: 1 from queue 1; Task B: 1 from all queues; Task C: 1 from queue 3

T = 2-

DWM: Use MWM based on Virtual Queues

Page 42: Scheduling in Networks - International Teletraffic Congress · The implementable algorithm is a stochastic approximation version of the dual gradient algorithm ... Stochastic Network

Walrand - 9/2011

Processing NetworksTask: 1 from queue 1; Task B: 1 from all queues; Task C: 1 from queue 3

T = 2

DWM: Use MWM based on Virtual Queues

Page 43: Scheduling in Networks - International Teletraffic Congress · The implementable algorithm is a stochastic approximation version of the dual gradient algorithm ... Stochastic Network

Walrand - 9/2011

Processing NetworksTask: 1 from queue 1; Task B: 1 from all queues; Task C: 1 from queue 3

T = 3-

DWM: Use MWM based on Virtual Queues

Deficit Maximum Weighted Matching is stable.[Proof: Lyapunov argument.]

Page 44: Scheduling in Networks - International Teletraffic Congress · The implementable algorithm is a stochastic approximation version of the dual gradient algorithm ... Stochastic Network

Walrand - 9/2011

Processing Networks

Parts arrive at 1 & 2 with rate λ1and at 5 with rate λ2

Task 2 consumes one part from 2 and one from 3; ...

Tasks 1-2, 1-3, 3-4 conflict

Algorithm stabilizes the queues and achieves the max. utility

Page 45: Scheduling in Networks - International Teletraffic Congress · The implementable algorithm is a stochastic approximation version of the dual gradient algorithm ... Stochastic Network

Walrand - 9/2011

Mathematical Ideas

For distributed allocations there are three ideas:

Random access protocols maximize the entropy subject to average allocation rates

The dual gradient algorithm to solve this problem calculates the optimal access rates

The implementable algorithm is a stochastic approximationversion of the dual gradient algorithm

For processing networks, there is one idea:

The virtual queues are stable, by Lyapunov.

These four ideas are in Libin Jiang’s thesis. See monograph.

Page 46: Scheduling in Networks - International Teletraffic Congress · The implementable algorithm is a stochastic approximation version of the dual gradient algorithm ... Stochastic Network

Walrand - 9/2011

Maximum EntropyConsider:

Page 47: Scheduling in Networks - International Teletraffic Congress · The implementable algorithm is a stochastic approximation version of the dual gradient algorithm ... Stochastic Network

Walrand - 9/2011

Maximum EntropyConsider:

Lagrangian:

Page 48: Scheduling in Networks - International Teletraffic Congress · The implementable algorithm is a stochastic approximation version of the dual gradient algorithm ... Stochastic Network

Walrand - 9/2011

Maximum EntropyConsider:

Lagrangian:

Page 49: Scheduling in Networks - International Teletraffic Congress · The implementable algorithm is a stochastic approximation version of the dual gradient algorithm ... Stochastic Network

Walrand - 9/2011

Maximum EntropyConsider:

Lagrangian:

Page 50: Scheduling in Networks - International Teletraffic Congress · The implementable algorithm is a stochastic approximation version of the dual gradient algorithm ... Stochastic Network

Walrand - 9/2011

Maximum EntropyConsider:

Lagrangian:

Question: What are the rj? Answer: rj ≈ αXj (if λ ∈ Λ)

Page 51: Scheduling in Networks - International Teletraffic Congress · The implementable algorithm is a stochastic approximation version of the dual gradient algorithm ... Stochastic Network

Walrand - 9/2011

Maximum EntropyConsider:

Gradient to find Lagrange multipliers

Page 52: Scheduling in Networks - International Teletraffic Congress · The implementable algorithm is a stochastic approximation version of the dual gradient algorithm ... Stochastic Network

Walrand - 9/2011

Maximum EntropyConsider:

Gradient to find Lagrange multipliers

Page 53: Scheduling in Networks - International Teletraffic Congress · The implementable algorithm is a stochastic approximation version of the dual gradient algorithm ... Stochastic Network

Walrand - 9/2011

Maximum EntropyConsider:

Gradient to find Lagrange multipliers

Page 54: Scheduling in Networks - International Teletraffic Congress · The implementable algorithm is a stochastic approximation version of the dual gradient algorithm ... Stochastic Network

Walrand - 9/2011

Maximum EntropyConsider:

Page 55: Scheduling in Networks - International Teletraffic Congress · The implementable algorithm is a stochastic approximation version of the dual gradient algorithm ... Stochastic Network

Walrand - 9/2011

Maximum EntropyConsider:

If α(n) = α:

Page 56: Scheduling in Networks - International Teletraffic Congress · The implementable algorithm is a stochastic approximation version of the dual gradient algorithm ... Stochastic Network

Walrand - 9/2011

Maximum EntropyConsider:

If α(n) = α:

Page 57: Scheduling in Networks - International Teletraffic Congress · The implementable algorithm is a stochastic approximation version of the dual gradient algorithm ... Stochastic Network

Walrand - 9/2011

• Solution exists if λ ∈ Λ

• Moreover,

• Also,

Consider:

Theorem

Maximum Entropy

Page 58: Scheduling in Networks - International Teletraffic Congress · The implementable algorithm is a stochastic approximation version of the dual gradient algorithm ... Stochastic Network

Walrand - 9/2011

Conclusions

Random allocations with adaptive requests rates are -optimalin utility

The request rates increase with the backlog

Congestion control imposes a price based on backlog in the ingress node

This price make the scheme almost strategy-proof in a large system

Processing networks are scheduled based on virtual queues

These queues can become negative

Page 59: Scheduling in Networks - International Teletraffic Congress · The implementable algorithm is a stochastic approximation version of the dual gradient algorithm ... Stochastic Network

Walrand - 9/2011

ReferencesCSMA & Product-Form

R.R. Boorstyn et al, 1987X. Wang & K. Kar, 2005S. Liew et al., 2007

MWMTassiulas & Ephremides, 1992

Primal-Dual Decomposition of NUMKelly et al., 1998Chiang-Low-Calderbank-Doyle, 2007

Backpressure Protocols + NUMLin & Shroff, 2004 Neely-Modiano-Li; Eryilmaz-Srikant; Stolyar 2005

Page 60: Scheduling in Networks - International Teletraffic Congress · The implementable algorithm is a stochastic approximation version of the dual gradient algorithm ... Stochastic Network

Walrand - 9/2011

ReferencesAdaptive-CSMA

Jiang, Walrand 2008

Improvements of Adaptive-CSMA

Ni-Tan-Srikant 2009 (Combined with LQF)

Jiang-Shah-Shin-Walrand 2010 (Positive Recurrence)

Adaptive-CSMA with collisions

Ni-Srikant; Jiang-Walrand; Liu et al. 2009

Implementations

Warrier-Ha-Wason-Rhee, 2008*

Lee-Lee-Yi-Chong-Proutiere-Chiang, 2009

Page 61: Scheduling in Networks - International Teletraffic Congress · The implementable algorithm is a stochastic approximation version of the dual gradient algorithm ... Stochastic Network

Walrand - 9/2011

ReferencesMonographs

Jiang-Walrand. Scheduling and Congestion Control for Wireless and Processing Networks. Morgan-Claypool 2010.

Neely. Stochastic Network Optimization with Application to Communication and Queueing Systems. Morgan Claypool 2010.

Pantelidou-Ephremides. Scheduling in Wireless Networks.NOW, 2011