Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Revisiting Size-Based Scheduling 
with Estimated Job Sizes 
Matteo Dell’Amico (EURECOM, France), 
Damiano Carra (Univ. Ver...
On Size-Based Scheduling
On Size-Based Scheduling An Example 
Processor-Sharing vs. Size-Based 
100 
cluster 
usage (%) 
50 
time 
(s) 
job 3 
job ...
On Size-Based Scheduling An Example 
Processor-Sharing vs. Size-Based 
100 
cluster 
usage (%) 
50 
time 
(s) 
job 3 
job ...
On Size-Based Scheduling Properties 
Size-Based Scheduling: Some Properties 
Shortest Remaining Processing Time (SRPT) 
Mi...
On Size-Based Scheduling Properties 
Size-Based Scheduling: Some Properties 
Shortest Remaining Processing Time (SRPT) 
Mi...
On Size-Based Scheduling Related Work 
Where Are All the Size-Based Schedulers? 
Job size is almost never known a priori 
...
On Size-Based Scheduling Related Work 
Where Are All the Size-Based Schedulers? 
Job size is almost never known a priori 
...
On Size-Based Scheduling Related Work 
Where Are All the Size-Based Schedulers? 
Job size is almost never known a priori 
...
Understanding Size-Based Scheduling With Errors
Understanding Size-Based Scheduling With Errors Simulation 
Scheduling Simulation 
Main Features 
Simulates single-server,...
Understanding Size-Based Scheduling With Errors Simulation 
Log-Normal Error Distribution 
4.0 
3.5 
3.0 
2.5 
PDF 
2.0 
1...
Understanding Size-Based Scheduling With Errors Simulation 
Weibull Job Size Distribution 
2.0 
1.5 
PDF 
1.0 
0.5 
0.0 0....
Understanding Size-Based Scheduling With Errors Simulation 
Other Parameters 
Number of jobs (default: 10,000 per workload...
Understanding Size-Based Scheduling With Errors Simulation Results 
Size-Based Scheduling With Errors 
SRPTE FSPE 
Problem...
Understanding Size-Based Scheduling With Errors Simulation Results 
Over-Estimations and Under-Estimations 
t 
Over-­‐es'm...
Size-Based Scheduling For Approximate Sizes
Size-Based Scheduling For Approximate Sizes FSPE+PS 
FSPE + PS 
Idea 
Without errors, real jobs always complete before vir...
Size-Based Scheduling For Approximate Sizes FSPE+PS 
FSPE + PS: Results 
FSPE FSPE + PS 
Performance becomes very close to...
Size-Based Scheduling For Approximate Sizes Comparison With SRPT 
Schedulers vs. SRPT 
10 
8 
6 
4 
0.125 0.25 0.5 1 2 4 
...
Size-Based Scheduling For Approximate Sizes Real Workloads 
Hadoop @ Facebook 
10 
8 
6 
4 
0.125 0.25 0.5 1 2 4 
sigma 
2...
Size-Based Scheduling For Approximate Sizes Real Workloads 
Web Cache 
100 
10 
0.125 0.25 0.5 1 2 4 
sigma 
1 
MST / MST(...
Take-Home Messages
Take-Home Messages 
Take-Home Messages 
For System Designers 
Do not be afraid of size-based scheduling 
it can work great...
Bonus Content
Bonus Content Fairness 
Fairness: Slowdown 
1.0 
0.8 
0.6 
ECDF 
0.4 
0.2 
100 101 102 
slowdown 
0.0 
SRPTE 
FSPE 
FSPE+P...
Bonus Content Fairness 
Fairness: Conditional Slowdown 
107 
106 
105 
slowdown 
104 
103 
102 
101 
10
Upcoming SlideShare
Loading in …5
×

Revisiting Size-Based Scheduling with Estimated Job Sizes

426 views

Published on

We study size-based schedulers, and focus on the impact of inaccurate job size information on response time and fairness. Our intent is to revisit previous results, which allude to performance degradation for even small errors on job size estimates, thus limiting the applicability of size-based schedulers.

We show that scheduling performance is tightly connected to workload characteristics: in the absence of large skew in the job size distribution, even extremely imprecise estimates suffice to outperform size-oblivious disciplines. Instead, when job sizes are heavily skewed, known size-based disciplines suffer.

In this context, we show -- for the first time -- the dichotomy of over-estimation versus under-estimation. The former is, in general, less problematic than the latter, as its effects are localized to individual jobs. Instead, under-estimation leads to severe problems that may affect a large number of jobs.

We present an approach to mitigate these problems: our technique requires no complex modifications to original
scheduling policies and performs very well. To support our claim, we proceed with a simulation-based evaluation that covers an unprecedented large parameter space, which takes into account a variety of synthetic and real workloads.

As a consequence, we show that size-based scheduling is practical and outperforms alternatives in a wide array of use-cases, even in presence of inaccurate size information.

Published in: Science
  • Be the first to comment

  • Be the first to like this

Revisiting Size-Based Scheduling with Estimated Job Sizes

  1. 1. Revisiting Size-Based Scheduling with Estimated Job Sizes Matteo Dell’Amico (EURECOM, France), Damiano Carra (Univ. Verona, Italy) Mario Pastorelli, Pietro Michiardi (EURECOM, France) MASCOTS 2014 These slides at http://bit.ly/schedsim 1
  2. 2. On Size-Based Scheduling
  3. 3. On Size-Based Scheduling An Example Processor-Sharing vs. Size-Based 100 cluster usage (%) 50 time (s) job 3 job 2 10 15 37.5 42.5 50 100 cluster usage (%) 10 20 30 50 50 time (s) job 1 job 1 job 2 job 3 job 1 3
  4. 4. On Size-Based Scheduling An Example Processor-Sharing vs. Size-Based 100 cluster usage (%) 50 time (s) job 3 job 2 10 15 37.5 42.5 50 100 cluster usage (%) 10 20 30 50 50 time (s) job 1 job 1 job 2 job 3 job 1 3
  5. 5. On Size-Based Scheduling Properties Size-Based Scheduling: Some Properties Shortest Remaining Processing Time (SRPT) Minimizes mean sojourn time (MST) [Schrage, OPER RES ’68] Sojourn time: interval between job submission and completion 4
  6. 6. On Size-Based Scheduling Properties Size-Based Scheduling: Some Properties Shortest Remaining Processing Time (SRPT) Minimizes mean sojourn time (MST) [Schrage, OPER RES ’68] Sojourn time: interval between job submission and completion Fair Sojourn Protocol (FSP) Jobs are scheduled in the order they would complete if doing Processor Sharing (PS) Efficiency: very close to SRPT Fairness: each job completes not later than Processor Sharing [Friedman & Henderson, SIGMETRICS ’03] 4
  7. 7. On Size-Based Scheduling Related Work Where Are All the Size-Based Schedulers? Job size is almost never known a priori 5
  8. 8. On Size-Based Scheduling Related Work Where Are All the Size-Based Schedulers? Job size is almost never known a priori Related Work: Inexact Job Size Information Simulation-based study: estimations need to be precise [Lu et al., MASCOTS 2004] Analytic study: bounded errors, over-estimation only [Wierman & Nuyens, SIGMETRICS PER, 2008] 5
  9. 9. On Size-Based Scheduling Related Work Where Are All the Size-Based Schedulers? Job size is almost never known a priori Related Work: Inexact Job Size Information Simulation-based study: estimations need to be precise [Lu et al., MASCOTS 2004] Analytic study: bounded errors, over-estimation only [Wierman & Nuyens, SIGMETRICS PER, 2008] What Motivated Us We developed HFSP, a size-based scheduler for Hadoop We found it works very well even with very rough estimations [Pastorelli et al., BIGDATA 2013] 5
  10. 10. Understanding Size-Based Scheduling With Errors
  11. 11. Understanding Size-Based Scheduling With Errors Simulation Scheduling Simulation Main Features Simulates single-server, preemptive scheduling Can create synthetic traces or replay real ones Injects artificial size estimation errors in this case, SRPT and FSP become SRPTE and FSPE Efficient and easy to prototype new schedulers 10,000 jobs are simulated in half a second on an old laptop FSP is ~50 lines of Python code Free Software: Apache License 2.0 https://bitbucket.org/bigfootproject/schedsim 7
  12. 12. Understanding Size-Based Scheduling With Errors Simulation Log-Normal Error Distribution 4.0 3.5 3.0 2.5 PDF 2.0 1.5 1.0 0.5 0.0 0.5 1.0 1.5 2.0 2.5 3.0 x 0.0 sigma= 0.125 sigma= 0.25 sigma= 1 sigma= 4 Error: real size estimated size 8
  13. 13. Understanding Size-Based Scheduling With Errors Simulation Weibull Job Size Distribution 2.0 1.5 PDF 1.0 0.5 0.0 0.5 1.0 1.5 2.0 2.5 3.0 x 0.0 shape= 0.125 shape= 1 shape= 2 shape= 4 Interpolates between heavy-tailed job size distributions (shape<1) exponential distributions (shape=1) bell-shaped distributions (shape>1) 9
  14. 14. Understanding Size-Based Scheduling With Errors Simulation Other Parameters Number of jobs (default: 10,000 per workload) at least 30 repetitions per data point System load (default: 0.9) Ratio between requested and available resources Job arrival time (default: exponential) Bursts vs. regular These parameters are not fundamental more details in the paper 10
  15. 15. Understanding Size-Based Scheduling With Errors Simulation Results Size-Based Scheduling With Errors SRPTE FSPE Problems for heavy-tailed job size distributions Otherwise, size-based scheduling works very well 11
  16. 16. Understanding Size-Based Scheduling With Errors Simulation Results Over-Estimations and Under-Estimations t Over-­‐es'ma'on Under-­‐es'ma'on t t t Remaining size Remaining size Remaining size Remaining size J1 J2 J3 J2 J3 J^1 J4 J5 J6 J4 J5 J6 ^ Over-estimating hurts a single job: limited damage Under-estimating very large jobs can wreak havoc 12
  17. 17. Size-Based Scheduling For Approximate Sizes
  18. 18. Size-Based Scheduling For Approximate Sizes FSPE+PS FSPE + PS Idea Without errors, real jobs always complete before virtual ones When they don’t (they are late), there has been a mistake The scheduler can realize this, and take corrective action Realization A scheduler such that late jobs don’t block the system Just do processor sharing between them instead of scheduling the “most late” one 14
  19. 19. Size-Based Scheduling For Approximate Sizes FSPE+PS FSPE + PS: Results FSPE FSPE + PS Performance becomes very close to optimal Outperformed by PS only for extreme skew and errors Replaying real-world traces gives analogous results 15
  20. 20. Size-Based Scheduling For Approximate Sizes Comparison With SRPT Schedulers vs. SRPT 10 8 6 4 0.125 0.25 0.5 1 2 4 shape 2 MST / MST(SRPT) SRPTE FSPE FSPE+PS PS LAS FIFO Sigma: 0.5 16
  21. 21. Size-Based Scheduling For Approximate Sizes Real Workloads Hadoop @ Facebook 10 8 6 4 0.125 0.25 0.5 1 2 4 sigma 2 MST / MST(SRPT) SRPTE FSPE FSPE+PS PS LAS 10 8 6 4 0.125 0.25 0.5 1 2 4 sigma 2 MST / MST(SRPT) SRPTE FSPE FSPE+PS PS LAS Synthetic workload (shape=0.25) Facebook Hadoop Cluster 17
  22. 22. Size-Based Scheduling For Approximate Sizes Real Workloads Web Cache 100 10 0.125 0.25 0.5 1 2 4 sigma 1 MST / MST(SRPT) SRPTE FSPE FSPE+PS PS LAS 10000 1000 100 10 0.125 0.25 0.5 1 2 4 sigma 1 MST / MST(SRPT) SRPTE FSPE FSPE+PS PS LAS FIFO Synthetic workload (shape=0.177) IRCache Web Cache 18
  23. 23. Take-Home Messages
  24. 24. Take-Home Messages Take-Home Messages For System Designers Do not be afraid of size-based scheduling it can work great even with very rough estimations Further Research Schedulers like FSPE+PS, designed for estimated sizes, work very well Can we design a scheduler that always outperforms PS? Can we get better analytical understanding of the phenomena we observed? These slides (plus bonus content) available at http://bit.ly/schedsim 20
  25. 25. Bonus Content
  26. 26. Bonus Content Fairness Fairness: Slowdown 1.0 0.8 0.6 ECDF 0.4 0.2 100 101 102 slowdown 0.0 SRPTE FSPE FSPE+PS PS LAS FIFO 1.00 0.98 0.96 ECDF 0.94 0.92 100 101 102 slowdown 0.90 Shape: 0.25, sigma: 0.5 22
  27. 27. Bonus Content Fairness Fairness: Conditional Slowdown 107 106 105 slowdown 104 103 102 101 10

×