Académique Documents
Professionnel Documents
Culture Documents
AA PWT
400
800
300
600
200 400
100 200
0 0
1 5 10 33 66 100 0 1 2 3 4 4.3
Shared cost divisor Shared cost skew
Figure 3: tn -awareness versus tn -ignorance for AA Figure 5: AA Policy 1 versus AA Policy 2, varying
Policy 2. shared cost skew.
2500 30
tn-ignorant policy for MA PWT AA Policy 2, est. lambda
tn-aware policy for MA PWT AA Policy 1, est. lambda
1500
15
1000
10
500 5
0 0
1 5 10 33 66 100 1 5 10 20 30 40
Shared cost divisor Skew
Figure 4: tn -awareness versus tn -ignorance for MA Figure 6: AA Policy 1 versus AA Policy 2, varying
Policy. shared cost skew, λi tsi = const.
Job arrival events are generated using the standard ho- job instance in the queue.)
mogenous Poisson point process [2]. Each job family Fi has Figures 3 and 4 plot the performance of the tn -aware and
an arrival parameter λi which represents the expected num- tn -ignorant variants of our policies (AA Policy 2 and MA
ber of jobs that arrive in one unit of time. There are 500, 000 Policy, respectively) as we vary the magnitude of the shared
units of time in each run of the experiments. The λi values cost (keeping the tn distribution and λ values fixed). In
are initially chosen from a Pareto distribution
P with parame- both graphs, the y-axis plots the metric the policy is tuned
ter α = 1.9 and then are rescaled soPthat i λi E[tn i ] = load. to optimize (AA PWT and MA PWT, respectively). The
The total asymptotic system load ( λi ·tn i ) is 0.5 by default. x-axes plot the shared cost divisor, which is the factor by
Some of our scheduling policies require estimation of the which we divided all shared costs. When the shared cost
job arrival rate λi . To do this, we maintain an estimate Ii divisor is large (e.g., 100), the ts values become quite small
of the difference in the arrival times of the next two jobs relative to the tn values, on average.
in family Fi . We adjust Ii as new job arrivals occur, by Even when nonshared costs are large relative to shared
taking a weighted average of our previous estimate Ii and costs (right-hand side of Figures 3 and 4), tn -awareness has
Ai , the difference in arrival times of the two most recent jobs little impact on performance. Hence from this point forward
from Fi . Formally, the update step is Ii ← 0.05Ai + 0.95Ii . we only consider the simpler, tn -ignorant variants of our
Given Ii and the time t since the last arrival of a job in Fi , policies.
1
we estimate λi as 1/Ii if t < Ii and as 0.05+0.95I i
otherwise.
6.3 Comparison of Policy Variants
6.2 Influence of Nonshared Execution Time
In our first set of experiments, we measure how knowl- 6.3.1 Relaxation 1 versus Relaxation 2
edge of tn affects our scheduling policies. Recall that in We now turn to a comparison of AA Policy 1 versus AA
Sections 4.1.3 and 4.2.1 we dropped tn from the priority Policy 2 (recall that these are based on Relaxation 1 (Sec-
formulae, on the grounds that the factors involving tn are tion 4.1.1) and Relaxation 2 (Section 4.1.2) of the original
small relative to other factors. To validate ignoring tn in our AA PWT minimization problem, respectively). Figure 5
scheduling policies, we compare tn -aware variants (which shows that the two variants exhibit nearly identical perfor-
use the full formulae with tn values) against the tn -ignorant mance, even as we vary the skew in the shared cost (ts ) dis-
variants presented in Sections 4.1.3 and 4.2.1. (The tn -aware tribution among job families (here there are five job families
variants are given knowledge of the precise tn value of each Fi with shared cost tsi = iα , where α is the skew parameter).
6.4 Summary of Findings
The findings from our basic experiments are:
• Estimating the arrival rates (λ values) online, as op-
posed to knowing them from an oracle, does not hurt
performance.
• It is not necessary to incorporate tn estimates into the
priority functions.
• AA Policy 2 (which is based on Relaxation 2) domi-
nates AA Policy 1 (based on Relaxation 1).
From this point forward, we use tn -ignorant AA Policy 2
with online λ estimation.
Figure 8: Hybrid Policy performance on average and Figure 10: Policy performance on AA PWT met-
maximum absolute PWT, as we vary the hybrid pa- ric, as job arrival rates increase (both SJF variants
rameter α. shown).
200 2000
α = 0.99 against two generalizations of shortest-job-first
AR PWT (SJF): The policy “Aware SJF” is the one given in Sec-
180 MR PWT 1800 tion 4.1, which knows the nonshared cost of jobs in its queue,
Average Relative PWT
Figure 11: Policy performance on AA PWT metric, Figure 13: Policy performance on AA PWT metric,
as job arrival rates increase. as nonshared costs increase.
70000 40000
FIFO FIFO
60000 AA Policy 2 35000 AA Policy 2
Max Absolute PWT
Hybrid
Figure 12: Policy performance on MA PWT metric, Figure 14: Policy performance on MA PWT metric,
as job arrival rates increase. as nonshared costs increase.
These graphs are qualitatively similar to Figures 11 and 12, increases via increasing non-shared costs. Here, SJF slightly
but the differences among the scheduling policies are less outperforms our policies on AA PWT, but our Hybrid Policy
pronounced. performs well on both average and maximum PWT.
Figures 15, 16, 17 and 18 are the same as Figures 11, Figure 21 shows average absolute PWT as the job arrival
12, 13 and 14, respectively, but with the y-axis measuring rate increases, while keeping the nonshared cost distribution
relative PWT. If we are interested in minimizing relative constant. Here AA Policy 2 and Hybrid slightly outperform
PWT, our policies, which aim to minimize absolute PWT, SJF.
do not necessarily do as well as SJF. Devising policies that To visualize the temporal behavior in the presence of bursts,
specifically optimize for relative PWT is an important topic Figure 22 shows a moving average of absolute PWT on the
of future work. y-axis, with time plotted on the x-axis. This time series is a
sample realization of the experiment that produced Figure
8.2.2 Bursty Workloads 19, with load = 0.7.
To model bursty job arrival behavior we use two different Since our policies focus on exploiting job arrival rate (λ)
Poisson processes for each job family. One Poisson process estimates, it is not surprising that under extremely bursty
corresponds to a low arrival rate and the other corresponds workloads where there is no semblance of a steady-state λ,
to an arrival rate that is ten times as fast. We switch be- they do not perform as well relative to the baselines as un-
tween these processes using a Markov process: after a job der stationary workloads (Section 8.2.1). However, it is re-
arrives, we switch states (from high arrival rate to low ar- assuring that our Hybrid Policy does not perform noticeably
rival rate or vice versa) with probability 0.05, and stay in worse than shortest-job-first, even under these extreme con-
the same state with probability 0.95. The initial probability ditions.
of either state is the stationary distribution of this process
(i.e. with probaility 0.5 we start with a high arrival rate). 8.3 Summary of Findings
The expected number of jobs coming from bursts is the same
The findings from our experiments on the absolute PWT
as the expected number of jobs not coming from bursts. If
metric which our policies are designed to optimize, are:
λi is the arrival rate for the non-burst process, then the ex-
pected λi (number of jobs perP second) asymptotically equals
20λi /11. Thus the load is i E[λi ]E[tn i ]. • Our MA Policy (a generalization of FIFO to shared
In Figures 19 and 20 we show the average and maximum workloads) is the best policy on maximum PWT, but
absolute PWT, respectively, for bursty job arrivals as load performs poorly on average PWT, as expected.
1200 400
FIFO FIFO
AA Policy 2 350 AA Policy 2
Average Relative PWT
Figure 15: Policy performance on AR PWT metric, Figure 17: Policy performance on AR PWT metric,
as job arrival rates increase. as nonshared costs increase.
8000 4000
FIFO FIFO
7000 3500 AA Policy 2
AA Policy 2
Figure 16: Policy performance on MR PWT metric, Figure 18: Policy performance on MR PWT metric,
as job arrival rates increase. as nonshared costs increase.
• Our Hybrid Policy, if properly tuned, achieves a “sweet a combination of the two objectives. Compared with the
spot” in balancing average and maximum PWT, and baseline shortest-job-first and FIFO policies, which do not
is able to perform quite well on both. account for future sharing opportunities, our policies achieve
significantly lower perceived wait time. This means that
• With stationary workloads, our Hybrid Policy substan- users’ jobs will generally complete earlier under our schedul-
tially outperforms the better of two generalizations of ing policies.
shortest-job-first to shared workloads.
• With extremely bursty workloads, our Hybrid Policy
performs on par with shortest-job-first.
10. REFERENCES
[1] R. H. Arpaci-Dusseau. Run-time adaptation in River.
ACM Trans. on Computing Systems, 21(1):36–86, Feb.
9. SUMMARY 2003.
In this paper we studied how to schedule jobs that can [2] P. Billingsley. Probability and Measure. John Wiley &
share scans over a common set of input files. The goal is to Sons, Inc., New York, 3nd edition, 1995.
amortize expensive file scans across many jobs, but without [3] M. C. Chou, H. Liu, M. Queyranne, and
unduly hurting individual job response times. D. Simchi-Levi. On the asymptotic optimality of a
Our approach builds a simple stochastic model of job simple on-line algorithm for the stochastic
arrivals for each input file, and takes into account antici- single-machine weighted completion time problem and
pated future jobs while scheduling jobs that are currently its extensions. Operations Research, 54(3):464–474,
enqueued. The main idea is as follows: If an enqueued job 2006.
J requires scanning a large file F , and we anticipate the [4] J. Dean and S. Ghemawat. MapReduce: Simplified
near-term arrival of additional jobs that also scan F , then it data processing on large clusters. In Proc. OSDI, 2004.
may make sense to delay J if it has not already waited too [5] S. Divakaran and M. Saks. Online scheduling with
long and other, less sharable, jobs are available to run. release times and set-ups. Technical Report 2001-50,
We formalized the problem and derived a simple and ef- DIMACS, 2001.
fective scheduling policy, under the objective of minimizing [6] P. M. Fernandez. Red brick warehouse: A read-mostly
perceived wait time (PWT) for completion of user jobs. Our RDBMS for open SMP platforms. In Proc. ACM
policy can be tuned for average PWT, maximum PWT, or SIGMOD, 1994.
9000 2500
FIFO FIFO
8000
AA Policy 2 AA Policy 2
Average Absolute PWT
Figure 19: Policy performance on AA PWT metric, Figure 21: Policy performance on AA PWT metric,
as nonshared costs increase, with bursty job arrivals. as arrival rates increase, with bursty job arrivals.
140000
FIFO
120000 AA Policy 2
Max Absolute PWT
Hybrid
100000
Oblivious SJF
80000
60000
40000
20000
0
0.1 0.3 0.5 0.7 0.9
Load (non-shared cost increasing)