350 likes | 470 Views
I think your suggestion is, Can we do two things at once? Well, we’re of the view that we can walk and chew gum at the same time. —Richard Armitage, deputy secretary of state, June 2, 2004. To do two things at once is to do neither. —Publilius Syrus, Roman slave, first century B.C. .
E N D
I think your suggestion is, Can we do two things at once? Well, we’re of the view that we can walk and chew gum at the same time. —Richard Armitage, deputy secretary of state, June 2, 2004 To do two things at once is to do neither. —Publilius Syrus, Roman slave, first century B.C. Multitask a few… Therefore… ..let the rest queue.
Computer systems are not different… thrashing Efficiency (useful work per second) K* Multi-Programming Level (# concurrent tasks/threads) Q: Max number of tasks allowed to share server? Common Soln: K* Server Active tasks Therefore… Tasks not-yet-started Admission Control
Presenting Self-Adaptive Admission Control Policies for Resource-Sharing Systems How to Multitask Smartly VARUN GUPTA MOR HARCHOL-BALTER (Carnegie Mellon University)
A Queueing-theoretic abstraction server Total speed (n) K* # jobs at server (n) (known)
each job gets rate (n) n n jobs A Queueing-theoretic abstraction K = MPL PS server 1 2 : K FIFO buffer response time • The G/G/PS-MPL model • General arrival process for jobs • Job sizes i.i.d. ~ X • Sizes unknown, distribution of X known Total speed (n) K* # jobs at server (n) (known) GOAL: Find MPL (i.e. K) to minimize mean response time
Optimal MPL= K* ? Exponential job sizes (C2 = 1) ExamplePoisson(0.8) arrival process OPT MPL Mean response time MPL K* Total speed (jobs/sec) Weibull job sizes (C2 = 19) K*=5 # jobs at server (n) 45% improvement Mean response time OPT MPL K* MPL
DEPENDS! Optimal MPL= K* ? Exponential job sizes (C2 = 1) ExamplePoisson(0.8) arrival process OPT MPL Mean response time MPL K* Total speed (jobs/sec) Weibull job sizes (C2 = 19) K*=5 # jobs at server (n) 45% improvement Mean response time OPT MPL K* MPL
server Processor Sharing (PS) Intuition for the effect of MPL FIFO
server Processor Sharing (PS) Intuition for the effect of MPL FIFO MPL High job-size variability (C2) High arrival rate Total speed (n) K* # jobs at server (n)
Intuition for the effect of MPL server Processor Sharing (PS) FIFO MPL High job-size variability (C2) High arrival rate Optimal MPL ↑ C2 ↑ Arrival rate ↑ Optimal MPL → K*
Why is finding the optimal MPL hard? - No analysis even for the case of Poisson arrivals (M/G/PS-MPL) Hurdle 1: State dependent service rates Transform of response time known for Exponential job size distribution [Rege Sengupta 85] Mean response time only depends on E[X] [Kelly 79] Our work Hurdle 2: Finite Multi- Programming-Limit Hurdle 3: General (high C2) job size distribution Heavy traffic diffusion approximation [Zhang Zwart 09]
Where we are… SUBGOAL: Approximation for M/G/PS-MPL GOAL: Optimal MPL for M/G/PS-MPL What if the traffic rate is unknown? What if the traffic is not Poisson? ? GOAL #2:Traffic-oblivious dynamic MPL control policies
Where we are… SUBGOAL: Approximation for M/G/PS-MPL GOAL: Optimal MPL for M/G/PS-MPL What if the traffic rate is unknown? What if the traffic is not Poisson? ? GOAL #2:Traffic-oblivious dynamic MPL control policies
RESULT: M/G/PS-MPL approximation PS Server (n) 1 Poisson() 2 Job sizes ~ X K FIFO buffer Easy for X Exp (C2=1)
RESULT: M/G/PS-MPL approximation • Involves only the first two moments of job size distribution • Generalizes • Lee and Longton approx. for M/G/K multi-server system: (n)= n· • Zhang and Zwart approx. for the case (n)= • 2 degrees of freedom • Can match any E[X] and C2≥ 1 THEOREM: The above approx. is exact for the following degenerate hyper-exponential job size distribution:
Where we are… SUBGOAL: Approximation for M/G/PS-MPL GOAL: Optimal MPL for M/G/PS-MPL What if the traffic rate is unknown? What if the traffic is not Poisson? ? GOAL #2:Traffic-oblivious dynamic MPL control policies
Where we are… SUBGOAL: Approximation for M/G/PS-MPL GOAL: Optimal MPL for M/G/PS-MPL What if the traffic rate is unknown? What if the traffic is not Poisson? ? GOAL #2:Traffic-oblivious dynamic MPL control policies
Static MPL policy for M/G/PS-MPL Set MPL = MPL*, where:
(Poisson(0.8) arrivals) Our approx. Total speed (n) Weibull (C2=19) MPL* Mean Resp. Time K* # jobs at server (n) MPL K* gives 45% worse performance than MPL* (Poisson(0.9) arrivals) • Approx accurately predicts the behavior of the curve as a function of MPL • MPL* decreases as arrival rate increases Our approx. Weibull (C2=19) MPL* Mean Resp. Time K* MPL K* gives 25% worse performance than MPL*
Where we are… SUBGOAL: Approximation for M/G/PS-MPL GOAL: Optimal MPL for M/G/PS-MPL What if the traffic rate is unknown? What if the traffic is not Poisson? ? GOAL #2:Traffic-oblivious dynamic MPL control policies
Where we are… SUBGOAL: Approximation for M/G/PS-MPL GOAL: Optimal MPL for M/G/PS-MPL What if the traffic rate is unknown? What if the traffic is not Poisson? ? GOAL #2:Traffic-oblivious dynamic MPL control policies
Traffic-oblivious policies I don’t know the arrival rate!! • Straw man proposal 1: Choose a “robust” static MPL • Must choose MPL=K* : but suboptimal in light/moderate traffic • Straw man proposal 2: Learn the arrival rate • Can’t adapt to changes on small time scale/correlations WE DEMONSTRATE: Dynamic MPL control policies which are 1. Traffic-oblivious:self-adapt to variations in the arrival process 2. Light-weight:make decisions based only on current queue length, Q(t), and current MPL, K(t) My arrivals are not Poisson!!
Traffic-oblivious policies(KEY STEPS) STEP 1: Approximate the orig. job size distribution X ≈ _____ STEP 2: Construct candidate policies π1π2π3 … πN STEP 3: Pick the “best” candidate policy πOPT GOAL: A robust MPL-control policy
Traffic-oblivious policies(KEY STEPS) STEP 1: Approximate the orig. job size distribution X ≈ _____ STEP 2: Construct candidate policies π1π2π3 … πN STEP 3: Pick the “best” candidate policy πOPT GOAL: A robust MPL-control policy
Traffic-oblivious policies(KEY STEPS) GOAL: Approximate the job size distribution by a tractable distribution IDEA: The H* distribution: • Models many small vs. few large jobs • Tractable due to Exponential branch p and γ chosen to match E[X] and C2 For age/size independent policies, H* provides a good approximation for mean response time
Traffic-oblivious policies(KEY STEPS) STEP 1: Approximate the orig. job size distribution X ≈ H* STEP 2: Construct candidate policies π1π2π3 … πN STEP 3: Pick the “best” candidate policy πOPT GOAL: A robust MPL-control policy
Traffic-oblivious policies(KEY STEPS) STEP 1: Approximate the orig. job size distribution X ≈ H* STEP 2: Construct candidate policies π1π2π3 … πN STEP 3: Pick the “best” candidate policy πOPT GOAL: A robust MPL-control policy
Traffic-oblivious policies(KEY STEPS) GOAL: A family of candidate dynamic policies IDEA: • Assume arrival ~ Poisson() • Solve for • Obtain the family by varying Optimal Dynamic MPL policy to minimize mean response time under H* job sizes Intuitively : What should this look like?
Structure of “Stochastic” component “Fluid” = Target MPL Current MPL MPL ↓ K*= MPL ↑ Current Queue Length obtained by combining policy iteration with some new tricks to handle infinite state space
Traffic-oblivious policies(KEY STEPS) STEP 1: Approximate the orig. job size distribution X ≈ H* STEP 2: Construct candidate policies π(λ1) π(λ2) … π(λN) STEP 3: Pick the “best” candidate policy πOPT GOAL: A robust MPL-control policy
Traffic-oblivious policies(KEY STEPS) STEP 1: Approximate the orig. job size distribution X ≈ H* STEP 2: Construct candidate policies π(λ1) π(λ2) … π(λN) STEP 3: Pick the “best” candidate policy πOPT GOAL: A robust MPL-control policy
Traffic-oblivious policies(KEY STEPS) GOAL: Robustly choose a member from family IDEA: Minimize the worst-case relative deviation in an adversarial setting Mean resp. time of policy under Poisson() perf. ratio(,) Mean resp. time of OPT static MPL under Poisson() - You pick - Adversary sees , picks - You lose perf. ratio(,) - Optimize against worst adversary a* = argmin max perf. ratio((a),) a
Traffic-oblivious policies(KEY STEPS) STEP 1: Approximate the orig. job size distribution X ≈ H* STEP 2: Construct candidate policies π(λ1) π(λ2) … π(λN) STEP 3: Pick the “best” candidate policy min max OPT πOPT GOAL: A robust MPL-control policy
Back to picking optimal MPL… Worst Perf. Loss (vs. OPT Static MPL) Scenario #1 Arrival process ~ Poisson(?) Our Dynamic Policy K* 45% 20% Our Dynamic Policy Scenario #2 Arrival process ~ ?(?) (results for Batch Poisson arrivals) K* 50% 14% • Dynamic policies remain “robust” to non-Poisson arrival process • - Static policies become worse
SUMMARY • Efficiency ≠ Min. response time • Static MPL policies via the first approximation for M/G/PS-MPL with state dependent service rates • First traffic-oblivious MPL control policies for resource sharing systems MPL* MPL ↓ MPL ↑ See paper for more results