l t+1,j - UCSD CSE

Online Algorithms to Minimize
Resource Reallocation and
Network Communication
Sashka Davis, UCSD
Jeff Edmonds, York University, Canada
Russell Impagliazzo, UCSD
APPROX and RANDOM 2006
Resource Allocation Problems
[KKD02, PL95, IRSD99, Edm00]
• Given: Multi-processor machine with T
identical processors.
• Problem: assign processors to parallel jobs
whose requirements are evolving and
malleable.
• Goal: schedule jobs, satisfy processor
requirements of each job, minimize
preemption.
APPROX and RANDOM 2006
The Weak Department Chair
Problem
I want
12!
12
10
5
19
17
APPROX and15
RANDOM 2006
4
3
4
RAP: Resource Allocation Problem
RAP Instance
•
T identical processors.
•
n users.
Input: (i,rt,i ) - at time t user i requests ri,t processors.
Output: (lt,i ) - the algorithm must allocate lt,i processors to i, lt,i ≥ rt,i .
Constraints: ∑ rt,i ≤ T and ∑ lt,i ≤ T, for all t.
Objective: Minimize changes to the global state.
Cost = |{(lt,i ,lt+1,i), where lt,i ≠ lt+1,i}|.
The algorithm is not notified when users current demands fall
bellow their current allocations.
APPROX and RANDOM 2006
The Strong Department Chair
Problem
You can’t have 30! I take the
penalty!
I want 30,
If not – penalty!
10
5
15
19
APPROX and RANDOM 2006
4
3
4
RAPP: Resource Allocation Problem
with Penalties
RAPP Instance
•
T identical processors.
•
n users.
Input: (i,rt,i, pt,i) - at time t user i requests rt,i processors and penalty pt,i.
Output: (lt,i) - allocation of lt,i, processors to i s.t., lt,i ≥ rt,i or do nothing.
Constraints: ∑ rt,i ≤ T and ∑ lt,i ≤ T, for all t.
Objective: Minimize changes to the global state, i.e., reallocations.
Cost: |{(lt,i ,lt+1,i), where lt,i ≠ lt+1,i}| + ∑ pt,i, when the scheduler fails to
satisfy the t’th request.
The algorithm is not notified when its current demand falls bellow
its current allocation.
APPROX and RANDOM 2006
The Humble Chair Problem
?
I want
MORE
!
13
10
5
19
16
APPROX and15
RANDOM 2006
4
3
4
?
RRAP: Restricted Resource
Allocation Problem
RRAP Instance
•
T identical processors
•
n users
Input: (i) - at time t user i complains.
Output: (lt,i), such that lt,i ≥ lt-1,i.
Constraints: ∑ lj,t ≤ T, for all t.
Objective: Minimize changes to the global state, i.e., reallocations.
Cost: |{(lt,i ,lt+1,i)}|, such that lt,i ≠ lt+1,i.
The algorithm never learns the precise demands exactly, only an
upper bound for each.
APPROX and RANDOM 2006
Network Communication Problem
[OLW01, CKA02, CYV06 ]
• Central cache and a network of low-power
sensors.
• Sensors read values.
1. Cache must know the values read exactly –
#sensor reads = #network transmissions.
2. Sensors are low-power devices and we want to
minimize network communication.
–
Solution: Settle for approximation.
APPROX and RANDOM 2006
TMAV: Transmission Minimizing
Approximate Value Problem
n sensors reading values
v1 [ L1 , H1 ]
Sensor 1
[L1,,H1]
v1
v1[L′1, H′1,]
vn[Ln,Hn]
Sensor n
[Ln,Hn]
Central
Cache
Precision T ≥ ∑(Hi-Li)
Constraints: T ≥ ∑(Hi-Li); vi[Li,Hi], for all t, i
Objective: Minimize network communication.
APPROX and RANDOM 2006
Cost: The number of transmissions between sensors and cache.
Two Online Problems
?
RAP
RAPP
TMAV
RRAP
Minimize Resource Reallocation
Minimize Network
Communication
Central Control Maintains State.
Must satisfy the demands of many users.
Objective: Minimize changes to the state.
A property: online algorithms do NOT know the precise requirements of users.
APPROX and RANDOM 2006
Bi-criteria Online Algorithms
• Adversary uses T resources/precision.
• Algorithm:
– use sT resources/precision.
– the precise requirements of users are unknown to the algorithm.
Goal: Find randomized, competitive online algorithms for
RAP, RRAP, RAPP, and TMAV problems using the
smallest possible s.
When s=1 then the competitive ratio is infinity.
APPROX and RANDOM 2006
Results: Upper Bounds
?
1. O(logsn)-competitive algorithm for RRAP,
where s is a constant, s≥3.
2. Modified the solution for RRAP and
obtained algorithms with similar
competitive ratios O(logsn) for RAP,
RAPP, and TMAV.
APPROX and RANDOM 2006
Results: Lower Bounds
1. For s = 1 no competitive algorithm for
RAP and TMAV exists.
2. Defined the notion of competitive ratio
preserving online reduction with respect to
adaptive online adversary “≤ AD_ON’’.
1. RAP ≤AD_ONTMAV
1. RAP ≤AD_ONRAPP
APPROX and RANDOM 2006
Results: Lower Bounds Using
Reductions
(h,k)-paging ≤ AD_ON RAP
1.
No online algorithm, using (1+ε) resources can achieve
competitive ratio better than Ω(1/ ε) against an adaptive
online adversary, using resource of size 1.
2.
No online algorithm using (1+ ε) resources can achieve
competitive ratio better than Ω(log(1/ ε)) against an
oblivious adversary using resource of size 1.
APPROX and RANDOM 2006
The Remainder of the Talk
1. Steal From the Rich – a randomized
O(logsn)-competitive algorithm for RRAP.
2. For s=1 no competitive algorithm for RAP
and TMAV exists.
APPROX and RANDOM 2006
?
RRAP: Restricted Resource
Allocation Problem
RRAP Instance :
•
T identical processors,
•
n users.
Input: (i) - at time t user i complains.
Output: (li,t) , such that lt,i≥ lt-1,i.
Constraints: ∑ lt,i ≤ T, for all t.
Cost: Number of pairs (lt,i ,lt+1,i), such that lt,i ≠ lt+1,i.
The algorithm never learns the precise demands exactly,
only an upper bound for each.
APPROX and RANDOM 2006
Steal From the Rich Algorithm
Let s be a constant, and r=Θ(√s), μ be a constants, which depend
on s, but not the instance.
Initially partition sT resources evenly among the n users.
user 1
user 2
user n
sT/n
sT/n
sT/n
APPROX and RANDOM 2006
Steal From the Rich Algorithm
At time t+1 user j complains.
SFR picks a user k from [n]-{j} with probability lt,k/(sT-lt,j).
lt+1,k ← lt,k-δ; lt+1,,j+1←lt,j+δ;
user j
user 2
user 1
lt,1
lt,2
SFR OPT
user k
δ
δ
user j
user k
user n
lt,j
t,j
lt,k
lt,n
APPROX and RANDOM 2006
μT/n
How Much to Steal from the Rich?
SFR maintains the following invariants:
1. All users have at least μT/n
•
lt+1,k ≥ μT/n, hence δ ≤ lt,k - μT/n;
2. lt+1,k does not shrink by a factor more than 1/r
•
lt+1,k ≥ lk,t /r, hence δ ≤ lk,t (r-1)/r;
3. lt+1,j does not grow by a factor more than r
•
lt+1,j ≤ rlt,j,, hence δ ≤ lj,t (r-1);
δ = min {lt,k-μT/n; lt,k (r-1)/r;
APPROX and RANDOM 2006
lt,j(r-1)}.
SFR Analysis
Want to show that for any req. sequence σ
E(SFRs(σ)) ≤ O(logsn)OPT(σ)+d.
Φ: Rn  Rn → R+; at=SFRt+(Φt-Φt-1)
E(SFRs(σ)) = E(∑SFRt)=E(∑at)-Φend+Φ0
Want to prove that for all t:
• Φt ≤ O(n logsn), for all t,
• E(at) ≤ O(logsn)OPTt.
Then Φ0 ≤ O(n logsn), and we use d = O(n logsn).
APPROX and RANDOM 2006
SFR Potential Function
t, j
SFR


lt , j
14
 , t , j.

log 
OPT
 rl

log r


T
/
n
 t, j

n
 t , j   t , j   t 1, j  O(log s n);  t    t , j  nO(log s n)
j 1
• ΔΦ is small when SFR and OPT have proportional
allocations.
• When SFR has cost and OPT does not, then ΔΦ is negative
and compensates for the actual cost of SFR.
APPROX and RANDOM 2006
Amortized Update Cost
E(at) = E(SFRt+ ΔΦt) ≤ O(logsn)OPTt
Case 1: OPTt ≠ 0, SFR = 0.
E(at) = E(0 + #changed intervals  O(logs n)) ≤ O(logsn)OPTt
Case 2: OPTt= 0, SFR = 2.
E(at) = E(2+ΔΦt) E(ΔΦt) ≤ -2.
In Case 2, SFR does:
– lt,j grows by a factor of r then ΔΦt )≤-14;
– lt,k shrinks by a factor of 1/r then ΔΦt ≤-14;
– Neither: (δ = lt,k-μT/n) then ΔΦt ≥ 0 (unfortunate but rare event).
Concluding: E(SFRs(σ)) ≤ O(logsn)OPT(σ)+d.
APPROX and RANDOM 2006
The Additional Resource is Vital
Theorem: There is no online algorithm using
T resources that is f(n) competitive against
and adversary using T resources, for any
function f.
Consider RAP with 2 users and T=1.
APPROX and RANDOM 2006
If s=1 then competitive ratio is ∞
0
user1
S1,1< r S4,1<r
r[0,1]
user2
S2,1<rS4,1<r
1
S≥r
S3,2=1-S
1. Adversary cost is 2.
2. Probability of incurring cost during t’th request is 1/8t.
3. The expected cost of the algorithm diverges as t goes to infinity.
APPROX and RANDOM 2006
Relating the Hardness of the
Problems
?
SFR
SFR
RRAP
TMAV
SFR
≤AD_ON
RAP
APPROX and RANDOM 2006
SFR
RAPP
≤AD_ON
Conclusions
1.
2.
•
•
•
We obtained O(logs n)-competitive algorithms for four
different problems.
Justified the need for sT resource.
Defined a notion of online reduction with respect to
adaptive online adversary.
Related the hardness of the problems using online
reductions.
Reduced (h-k)-Paging to RAP and transferred the
standard paging lower bounds to the four problems.
APPROX and RANDOM 2006
New Issues
• We studied memoryless online algorithms
that do not know the current demands
exactly.
• Online reductions to leverage existing lower
bounds and relate hardness of online
problems.
APPROX and RANDOM 2006
Open problems
• Close the gap between the upper and lower bounds.
• Can competitive ratio preserving reductions with respect to
adaptive online adversary deliver other lower bounds for
other problems?
• Do other problems have similar memoryless online
solutions, where the algorithm does not know the demands
exactly, but only an upper bound approximation of it.
APPROX and RANDOM 2006