Optimality, Fairness and Robustness in Speed Scaling Designs
description
Transcript of Optimality, Fairness and Robustness in Speed Scaling Designs
![Page 1: Optimality, Fairness and Robustness in Speed Scaling Designs](https://reader035.fdocuments.us/reader035/viewer/2022081520/56815d46550346895dcb4dc9/html5/thumbnails/1.jpg)
Optimality, Fairness and Robustness in Speed Scaling Designs
Lachlan Andrew
Joint work with
Minghong Lin, Caltech
Adam Wierman, Caltech
Supported by ARC, NSF
![Page 2: Optimality, Fairness and Robustness in Speed Scaling Designs](https://reader035.fdocuments.us/reader035/viewer/2022081520/56815d46550346895dcb4dc9/html5/thumbnails/2.jpg)
speedpo
wergreener
faster
Systems must balance delay and energy use
Speed scaling
![Page 3: Optimality, Fairness and Robustness in Speed Scaling Designs](https://reader035.fdocuments.us/reader035/viewer/2022081520/56815d46550346895dcb4dc9/html5/thumbnails/3.jpg)
state-dependent controllable service rates
Goal: min [ ] [ ] E Delay E Energy
( )P s power to run at speed s
A simple model
( )P s s (often α ≈ 2)CPUs, disks:
![Page 4: Optimality, Fairness and Robustness in Speed Scaling Designs](https://reader035.fdocuments.us/reader035/viewer/2022081520/56815d46550346895dcb4dc9/html5/thumbnails/4.jpg)
A simple model
The speed of the server
What order to serve jobs
??
![Page 5: Optimality, Fairness and Robustness in Speed Scaling Designs](https://reader035.fdocuments.us/reader035/viewer/2022081520/56815d46550346895dcb4dc9/html5/thumbnails/5.jpg)
Fundamental questions about speed scaling
Can on-line speed scaling be optimal?What structure do optimal algorithms have?
How does speed scaling interact with scheduling?
Are sophisticated speed scalers better?
Are there drawbacks of speed scaling?
![Page 6: Optimality, Fairness and Robustness in Speed Scaling Designs](https://reader035.fdocuments.us/reader035/viewer/2022081520/56815d46550346895dcb4dc9/html5/thumbnails/6.jpg)
A simple model
The speed of the server
What order to serve jobs
?
What can we say about the optimal design?
?
![Page 7: Optimality, Fairness and Robustness in Speed Scaling Designs](https://reader035.fdocuments.us/reader035/viewer/2022081520/56815d46550346895dcb4dc9/html5/thumbnails/7.jpg)
A simple model
The speed of the server
What order to serve jobs
?SRPTShortest Remaining
Processing Time
![Page 8: Optimality, Fairness and Robustness in Speed Scaling Designs](https://reader035.fdocuments.us/reader035/viewer/2022081520/56815d46550346895dcb4dc9/html5/thumbnails/8.jpg)
A simple model
The speed of the server
What order to serve jobs
?SRPT…but in practice often…
PSProcessor Sharing
![Page 9: Optimality, Fairness and Robustness in Speed Scaling Designs](https://reader035.fdocuments.us/reader035/viewer/2022081520/56815d46550346895dcb4dc9/html5/thumbnails/9.jpg)
An example – batch arrivals under SRPTn jobs of size xi arrive at time 0 (no other arrivals)
Cost
1 11 1
1 1 1( ) ( )n n n nn n n n
n nx P s x P ss s s s
SRPT
1( )1n n
nP s s s P
“Energy-proportional”
1 11
1 1
( ) ( )n n n n nn n
n n n n n
x x x x xP s P ss s s s s
Observation: Speeds only depend on number of jobs in system (not on sizes)
![Page 10: Optimality, Fairness and Robustness in Speed Scaling Designs](https://reader035.fdocuments.us/reader035/viewer/2022081520/56815d46550346895dcb4dc9/html5/thumbnails/10.jpg)
2 design choices
The speed of the server
What order to serve jobs
SRPTorPS
sn =?
![Page 11: Optimality, Fairness and Robustness in Speed Scaling Designs](https://reader035.fdocuments.us/reader035/viewer/2022081520/56815d46550346895dcb4dc9/html5/thumbnails/11.jpg)
SRPT
PS
Stochastic analysis(M/GI/1)
Worst-case analysis(no assumptions)
Two styles of analysis
![Page 12: Optimality, Fairness and Robustness in Speed Scaling Designs](https://reader035.fdocuments.us/reader035/viewer/2022081520/56815d46550346895dcb4dc9/html5/thumbnails/12.jpg)
Worst case analysis
Undertest
optimum cost
cost
At most factor k worse= “k-competitive”
How can we find kwithout knowing OPT?
![Page 13: Optimality, Fairness and Robustness in Speed Scaling Designs](https://reader035.fdocuments.us/reader035/viewer/2022081520/56815d46550346895dcb4dc9/html5/thumbnails/13.jpg)
Amortized Local competitiveness
• (0)=0• () 0• has no upward jumps
𝑑𝑐𝑜𝑠𝑡 (𝐴)𝑑𝑡 ≤𝑘 𝑑𝑐𝑜𝑠𝑡 (𝑂𝑃𝑇 )
𝑑𝑡 − 𝑑𝜑𝑑𝑡
Potential function
![Page 14: Optimality, Fairness and Robustness in Speed Scaling Designs](https://reader035.fdocuments.us/reader035/viewer/2022081520/56815d46550346895dcb4dc9/html5/thumbnails/14.jpg)
SRPT
PS
Stochastic analysis(M/GI/1)
Worst-case analysis(no assumptions)
(SRPT, P-1(n))Exactly 2-competitive
(PS, P-1(n))(4-2)-competitive?
![Page 15: Optimality, Fairness and Robustness in Speed Scaling Designs](https://reader035.fdocuments.us/reader035/viewer/2022081520/56815d46550346895dcb4dc9/html5/thumbnails/15.jpg)
PS
M/GI/1
PS
M/M/1
FCFS
M/M/1
0 1 2 3λ λ λ λ
s1 s2 s3 s4
“Textbook” stochastic control problem:
Can “solve” numerically with dynamic programming[Bertsekas] [Ross] [George & Harrison 01] …
The analysis
![Page 16: Optimality, Fairness and Robustness in Speed Scaling Designs](https://reader035.fdocuments.us/reader035/viewer/2022081520/56815d46550346895dcb4dc9/html5/thumbnails/16.jpg)
1/32 min ,2nn s n
n
~ns n
Theorem:In an M/GI/1 queue with α=2, the optimal speeds satisfy
For large n,
arriving load
Our Results
Wierman, A., Tang: Allerton 2008, INFOCOM’09
![Page 17: Optimality, Fairness and Robustness in Speed Scaling Designs](https://reader035.fdocuments.us/reader035/viewer/2022081520/56815d46550346895dcb4dc9/html5/thumbnails/17.jpg)
SRPT
PS
Stochastic analysis(M/GI/1)
Worst-case analysis(no assumptions)
(SRPT, P-1(n))Exactly 2-competitive
(PS, P-1(n))(4-2)-competitive
ns n
ns n ( 2)
( 2)
![Page 18: Optimality, Fairness and Robustness in Speed Scaling Designs](https://reader035.fdocuments.us/reader035/viewer/2022081520/56815d46550346895dcb4dc9/html5/thumbnails/18.jpg)
SRPTlower bound
100
10
11 1000.01
Cos
t per
job
low load and/orlow energy cost
high load and/orhigh energy cost
PS
Switching to SRPT can’t improve
performance much!
How well does it work?
![Page 19: Optimality, Fairness and Robustness in Speed Scaling Designs](https://reader035.fdocuments.us/reader035/viewer/2022081520/56815d46550346895dcb4dc9/html5/thumbnails/19.jpg)
Fundamental questions about speed scaling
Can on-line speed scaling be optimal?What structure do optimal algorithms have?
^and answers
2-competitive by using SRPT and 1( )ns P n
![Page 20: Optimality, Fairness and Robustness in Speed Scaling Designs](https://reader035.fdocuments.us/reader035/viewer/2022081520/56815d46550346895dcb4dc9/html5/thumbnails/20.jpg)
Fundamental questions about speed scaling
Can on-line speed scaling be optimal?What structure do optimal algorithms have?
How does speed scaling interact with scheduling?
Are sophisticated speed scalers better?
Are there drawbacks to speed scaling?
^and answers
They can be decoupled with littleperformance loss
Energy proportionalityworks well under SRPT & PS
Can on-line speed scaling be optimal?What structure do optimal algorithms have?
![Page 21: Optimality, Fairness and Robustness in Speed Scaling Designs](https://reader035.fdocuments.us/reader035/viewer/2022081520/56815d46550346895dcb4dc9/html5/thumbnails/21.jpg)
2 design choices
The speed of the server
What order to serve jobs
SRPTorPS Time
Gated static
Time
Dynamic
spee
d
![Page 22: Optimality, Fairness and Robustness in Speed Scaling Designs](https://reader035.fdocuments.us/reader035/viewer/2022081520/56815d46550346895dcb4dc9/html5/thumbnails/22.jpg)
SRPT
PS
Stochastic analysis(M/GI/1)
Worst-case analysis(no assumptions)
[ ] ( )(1 / ) log(1/ (1 / ))
E N P ss s
1s
(heavy traffic)
Gated static speed scaling
( 2)
![Page 23: Optimality, Fairness and Robustness in Speed Scaling Designs](https://reader035.fdocuments.us/reader035/viewer/2022081520/56815d46550346895dcb4dc9/html5/thumbnails/23.jpg)
Gated Static vs. Dynamic (under SRPT)
dynamicgated static
100
10
11 1000.01
Cos
t per
job
low load and/orlow energy cost
high load and/orhigh energy cost
Why is dynamicspeed scaling used?
…same holds under PS
![Page 24: Optimality, Fairness and Robustness in Speed Scaling Designs](https://reader035.fdocuments.us/reader035/viewer/2022081520/56815d46550346895dcb4dc9/html5/thumbnails/24.jpg)
Robustness
Why is dynamicspeed scaling used?
![Page 25: Optimality, Fairness and Robustness in Speed Scaling Designs](https://reader035.fdocuments.us/reader035/viewer/2022081520/56815d46550346895dcb4dc9/html5/thumbnails/25.jpg)
real ρ
design ρ
Cos
t per
job
gated static
Dynamic(stochastic control)
Dynamic (worst-case control)
Robustness/Optimality Tradeoff
![Page 26: Optimality, Fairness and Robustness in Speed Scaling Designs](https://reader035.fdocuments.us/reader035/viewer/2022081520/56815d46550346895dcb4dc9/html5/thumbnails/26.jpg)
Theorem:For P(s)=s2, speeds optimal for PS with ρ are
2(2ρ2 +2ρ + 1)-competitive under SRPT 6(2ρ2 +2ρ + 1)-competitive under PS
Tradeoff betweenoptimality and robustnessthrough tuning estimated load
worst-case result for optimal stochastic control
![Page 27: Optimality, Fairness and Robustness in Speed Scaling Designs](https://reader035.fdocuments.us/reader035/viewer/2022081520/56815d46550346895dcb4dc9/html5/thumbnails/27.jpg)
Can we improverobustness further?
real ρ
design ρ
Cos
t per
job
gated static
dynamic
linear: ns n
For α=22 2( ) 2 ( )linear dynamiccost cost
Robust against arrival rateif arrivals are Poisson
![Page 28: Optimality, Fairness and Robustness in Speed Scaling Designs](https://reader035.fdocuments.us/reader035/viewer/2022081520/56815d46550346895dcb4dc9/html5/thumbnails/28.jpg)
Fundamental questions about speed scaling
Can on-line speed scaling be optimal?What structure do optimal algorithms have?
How does speed scaling interact with scheduling?
Are sophisticated speed scalers better?
^and answers
Benefit of dynamic is robustness,not mean performance
![Page 29: Optimality, Fairness and Robustness in Speed Scaling Designs](https://reader035.fdocuments.us/reader035/viewer/2022081520/56815d46550346895dcb4dc9/html5/thumbnails/29.jpg)
Fundamental questions about speed scaling^
and answers
Can on-line speed scaling be optimal?What structure do optimal algorithms have?
How does speed scaling interact with scheduling?
Are sophisticated speed scalers better?
Are there drawbacks to speed scaling?Speed scaling can “magnify/create” unfairness
Job types that are often served when the queue is large get faster service
![Page 30: Optimality, Fairness and Robustness in Speed Scaling Designs](https://reader035.fdocuments.us/reader035/viewer/2022081520/56815d46550346895dcb4dc9/html5/thumbnails/30.jpg)
Which jobs are run fast?
Magnifies the bias towards small jobs
Creates a bias towards big jobs
Remains fair
SRPT
FCFS
PS
…the ones run when the queue is big
![Page 31: Optimality, Fairness and Robustness in Speed Scaling Designs](https://reader035.fdocuments.us/reader035/viewer/2022081520/56815d46550346895dcb4dc9/html5/thumbnails/31.jpg)
Theorem:With dynamic speed scaling:
[ ( )] [ ( )]lim limSRPT PS
x x
E T x E T xx x
[ ( )] [ ( )]lim limSRPT PS
x x
E T x E T xx x
Bias against large jobs is magnified
SRPT is “fair” to large job sizes
With constant speeds:
[Sigman, Harchol-Balter, Wierman 02]
![Page 32: Optimality, Fairness and Robustness in Speed Scaling Designs](https://reader035.fdocuments.us/reader035/viewer/2022081520/56815d46550346895dcb4dc9/html5/thumbnails/32.jpg)
Fundamental questions about speed scaling
Can on-line speed scaling be optimal?What structure do optimal algorithms have?
How does speed scaling interact with scheduling?
Are sophisticated speed scalers better?
Are there drawbacks of speed scaling?
^and answers
Speed scaling can “magnify/create” unfairness
![Page 33: Optimality, Fairness and Robustness in Speed Scaling Designs](https://reader035.fdocuments.us/reader035/viewer/2022081520/56815d46550346895dcb4dc9/html5/thumbnails/33.jpg)
Optimality, Fairness and Robustnessin Speed Scaling design
![Page 34: Optimality, Fairness and Robustness in Speed Scaling Designs](https://reader035.fdocuments.us/reader035/viewer/2022081520/56815d46550346895dcb4dc9/html5/thumbnails/34.jpg)
Optimality, Fairness and Robustness
(SRPT, P-1(n))
![Page 35: Optimality, Fairness and Robustness in Speed Scaling Designs](https://reader035.fdocuments.us/reader035/viewer/2022081520/56815d46550346895dcb4dc9/html5/thumbnails/35.jpg)
Optimality, Fairness and Robustness
(SRPT, P-1(n)) (PS, P-1(n))
![Page 36: Optimality, Fairness and Robustness in Speed Scaling Designs](https://reader035.fdocuments.us/reader035/viewer/2022081520/56815d46550346895dcb4dc9/html5/thumbnails/36.jpg)
Optimality, Fairness and Robustness
(SRPT, P-1(n)) (PS, P-1(n))
(SRPT, gated-static)