HAL Id: inria-00070508
https://hal.inria.fr/inria-00070508
Submitted on 19 May 2006
HAL is a multi-disciplinary open access
archive for the deposit and dissemination of
sci-entific research documents, whether they are
pub-L’archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
brokering for heterogeneous computational grids
Vandy Berten, Joël Goossens, Emmanuel Jeannot
To cite this version:
Vandy Berten, Joël Goossens, Emmanuel Jeannot. On the distribution of sequential jobs in random
brokering for heterogeneous computational grids. [Research Report] RR-5499, INRIA. 2005, pp.23.
�inria-00070508�
ISRN INRIA/RR--5499--FR+ENG
a p p o r t
d e r e c h e r c h e
Thème NUM
On the distribution of sequential jobs in random
brokering for heterogeneous computational grids
Vandy B
ERTEN— Joël G
OOSSENS— Emmanuel J
EANNOTN° 5499
Unité de recherche INRIA Lorraine
Vandy Berten
∗, Joël Goossens
†, Emmanuel Jeannot
‡Thème NUM — Systèmes numériques Projet Algorille
Rapport de recherche n° 5499 — Février 2005 — 23 pages
Abstract: This paper analyzes the way sequential jobs are distributed and the system
behaves in a heterogeneous computational grid environment where the brokering is done in such a way that each Computing Element has a probability to be chosen proportional to its number of CPUs and, (new from the previous paper) its relative speed. We give the asymptotic behavior for several metrics (queue sizes, slowdown. . . ) in several cases, or, in some case, an approximation of this behavior. We study those metrics in several workload specifications: for various loads (saturated or non saturated), with several distri-butions,. . . We compare our probabilistic analysis to simulation we performed, in order to validate our results.
Key-words: Grid brokering, multi-level scheduling, random brokering, stochastic
work-load, heterogeneous and distributed architecture.
∗[email protected] - Research Fellow for FNRS-ULB (Fonds National de la Recherche Scientifique
- Université Libre de Bruxelles, Belgium)
†[email protected] - ULB (Université Libre de Bruxelles, Belgium)
calcul hétérogènes avec méta-scheduling aléatoire.
Résumé : Ce travail analyse la façon dont des jobs séquentiels sont distribués dans
un environnement de grille de calcul où le brokering est fait en sorte que la probabilité qu’un site soit sélectionné pour l’exécution d’un job est proportionnelle à la puissance de ce site, c’est-à-dire le produit entre le nombre de processeurs et le facteur d’accélération de ces processeurs. Nous fournissons le comportement asymptotique d’un certain nombre de métriques, telles que la taille des files d’attente, le facteur de ralentissement (ou slowdown), ou le nombre de processeurs utilisés. Dans certains cas, nous proposons une approximation de ce comportement.
Mots-clés : meta-ordonnancement aléatoire, Grille, ordonnancement multi-niveau, charge
1
Introduction
Grid systems are the gathering of distributed and heterogeneous resources (CPU, disk, network, etc.). They are promising infrastructures for executing large scale applications or for providing computational power to everyone. In order to hide the complexity of grids to the users, executing environments (called middleware) are to be developed. A middleware aims at providing a programming API and an execution model for the applications. It relies on a set of services that enables the control of the resources, the deployment of the services, the execution of the applications, etc. The scheduling service has in charge the allocation of the tasks on the distributed resources. Therefore it is one of the key services for enabling performance and efficiency of the whole grid.
In this paper, we focus on a special kind of grid scheduler called a resource broker or a meta-scheduler. A meta-scheduler has in charge to dispatch client requests (jobs) onto computing elements (for instance a cluster) each of these being composed of several computing nodes (processors). Each computing element executes its own local scheduling policy for executing the subset of the jobs assigned to it. In general the local scheduler is called a batch scheduler. A common implementation of a batch scheduler consists in storing the jobs into a queue that follows a FIFO policy. Other techniques have been also studied; see for instance [7] for an overview.
In order to be efficient, a resource broker needs to know the duration of the submitted job on each node of the computing resources. This assumption is not always realistic, as the duration of the job might not be known before its completion. Indeed, this duration may depend on its parameters and data. It also requires the user to have run its job at least once and give obtained duration to the broker. In this work, we propose another approach where the duration of each job is not known but is given by a random variable with a fixed mean (for instance the duration follows an exponential law). Moreover, we do not assume that the submission of the jobs is known in advance. We suppose that the arrival date is also drawn with a random variable (for instance a Poisson law). This probabilistic approach is driven by the dynamic nature of grids where it is not always possible to precisely know in advance both duration and arrival date of jobs (as in a UNIX system). The proposed resource brokering algorithm is therefore a randomized one.
Resource brokering is an important subject since many middlewares use a meta-scheduler for allocating jobs. This is the case of EDG/EGEE that is one of the few production grid functioning 7 days per week, 24 hours per day. In this paper we study a randomized algo-rithm (random brokering) for allocating stochastic workload to a grid environment similar to the EDG/EGEE one. As in EGEE, we assume that computing elements of the target grid are heterogeneous. However, inside each computing elements, the processors are sup-posed homogeneous. Two cases are analyzed. In the first case, we assume that the grid is not saturated (it is submitted less jobs than it can execute). In the second case, the grid is saturated (it is submitted more jobs than it can execute). Each job is assumed to be sequential (requires only one CPU).
For each case, we compute the average queue length of each computing element (sec-tion 3). The queue length is an important metric since it helps to design and tune the local
batch scheduler. We also study the utilization of the grid: the number of CPU used on each computing elements (section 4). When, due to change of the load, the grid goes from the saturated case to the non-saturated case, we compute an approximation of the time required to empty the queues on each computing elements (section 5). Finally, jobs may be delayed depending on the load of the grid. We study this last metric (called the slowdown) for several distribution of the duration of the tasks (section 6). Each of these metrics is stud-ied both analytically and with simulation experiments. Therefore, the contribution of this paper is an extensive comprehension of the behavior of random brokering on heterogeneous computational grids.
This paper generalizes the results presented in [1] which considers homogeneous grids (where CPUs have all the same speed). In this paper, we generalize those results by analyz-ing heterogeneous grids (where CPUs have different CPU speeds). We extend in this paper the properties considered in [1] by generalizing our proof techniques. We show in few cases, that the properties remain the same and consequently are not related to the CPU speeds (which is rather counter intuitive), and we give the more general result in other cases. We provide also in this paper analysis for additional distributions (e.g., uniform and erlang).
2
Background
2.1
Model of computation
In this paper, we will consider a quite simple but sufficiently realistic model of computational grid. The analysis we made is mainly focused on computational grids, as we assume that network latencies and transfer times are negligible and we thus do not take into account the data localization. In the grid we consider, there is a central Resource Broker (RB), to which each Computing Element (CE) is connected, and each client sends its jobs to that central RB. Without lack of generality, we use only one client, but several kinds of workloads have
been simulated. Each CE Ci has a relative speed si, which is the relative speed of its CPUs
compared to a reference CPU. That means that if we have two CPUs with relative speeds
s1 and s2, a job which takes ` units of time on the first CPU to be processed would take
` · s1
s2 on the second one. We assume that our system is locally homogeneous, meaning that
each CPU of a computing element has the same speed.
Each job j submitted on our system has mainly one parameter: a virtual length (or
virtual execution time) j`, that is the time that would be taken by a reference CPU (with
a relative speed equal to 1) for processing that job. On a CE with relative speed s, the
job j will therefore use one CPU during j`/s units of time. j`/s is the effective length (or
execution time) of j on a CE with relative speed s. We assume that, on one processor, we
do not use parallelism or preemption (and then migration), and that our system is greedy1
.
1
A system is said to be greedy (sometimes called expedient) if it never leaves any resource idle intentionally. If a system is greedy, a resource is idle only if there is no eligible job waiting for that resource.
2.2
Mathematical model
In the next sections, we will use the following notations: Our system is composed of N
Computing Elements, called Ci(i ∈ [1 . . . N ]). ci refers to the number of CPUs of Ci, and
si to the relative speed of Ci. ci· si is the virtual number of CPUs on Ci. C,PNi=1ci· si
(the symbol, means “is by definition” or “is defined as”) is then the total number of virtual
CPUs. We define the system load ν(t) as the total amount of virtual work received in [0, t] divided by the product between the total number of virtual CPUs (C) and the total duration (t), or in other word, the total amount of (virtual) work received divided by the total amount of (virtual) work that the system could provide. Formally,
ν(t),
P
{j∈J |js≤t}j`
C · t
whereJ is the set of jobs submitted to the system, and jsis the job j’s submission time.
The interval [0, t] is called the observation period.
We introduce here a notation: f1(t) ∼t f2(t) means that limt→∞ff12(t)(t) = 1. Informally,
we say that “f1(t) behaves asymptotically like f2(t)”. Notice that f1(t)∼
t f2(t) ⇔ f1(t) =
f2(t) + ε(t), with limt→∞fε(t)2(t) = 0.
We assume that the arrival of jobs is a random process with an average delay λ−1between
two successive arrivals (e.g., the arrivals could be a Poisson process with rate λ, that is, the delay between two successive arrivals follows an Exponential law with the same rate of
change). We also assume that the average virtual execution time (E[j`]) has a distribution
with mean µ−1(for instance an Exponential distribution with rate µ). We assume that jobs
are independent (i.e., they do not share common ressources except CPUs, and there is no precedence constraints between jobs).
2.3
Random Brokering
2.3.1 Dispatching the jobs
In this work, we will study a particular case of brokering, where jobs are randomly dis-patched, but with a distribution of probability based on the capacity of the different CEs.
In a EDG system, this corresponds to the case where the rank, in fuzzy mode, is
TotalCPUs * AverageSI00(or GlueHostBenchmarkSI00 * CEInfoTotalCPUs in the glue
schema).
The system we analyze is modelized as follows. Each job requires only one CPU, and
the broker chooses one among all Computing Elements in such way that each Ci has a
probability equal to ci·si
C to be chosen.
It is easy to see (see for instance [1]) that, if inter-arrivals are independent, for each Ci,
the inter-arrival mean will tend towards λ−1i , where λi , λciC·si, and the average execution
2.3.2 System load
We define here νias being µλiici. We have then νi= λ
ci·si C
µsici =
λ
µC , ν.
It is not difficult to see that, in the average, ν(t) ∼
t ν; indeed (by the Law of Large
Numbers), ν(t) , P {j∈J |js≤t}j` C·t = k{j∈J |js≤t}k P {j∈J |js≤t}j` k{j∈J |js≤t}k C·t ∼ t k{j∈J |js≤t}k t µ−1 C ∼t µ−1 C·λ−1 = ν
ν will then be called the system load. If ν < 1, the system will be said non-saturated, and if ν > 1, the system will be considered as saturated. The case ν = 1 will not be analyzed in this paper.
In the next two sections, we will first look at the queue size. We then shortly take a glance at two other metrics (number of used CPUs and resorption time), and finally, we analyze the average slowdown. From a theoretical point of view, the pure saturated case (ν > 1) is not really interesting, because queues grow indefinitely and therefore the system “explodes”. However, in real systems, the load is often time dependent, and an alternation of saturated and non-saturated phases can be observed. We are then interested by how queues are growing during a saturated phase, and how queues are decreasing when the load goes down to a non-saturated phase.
Next sections require a different approach if ν < 1 and if ν > 1 (i.e., if the system is saturated). They will therefore be splitted in two parts.
3
Queue size
As a first metric, we will here analyze the average queue size of computing elements. This metric is usefull, for instance for tuning the local scheduler, or for dimensioning the memory needs for buffers.
This study will be divided in two parts: the first one analyzing non saturated systems (ν < 1), the second one saturated systems (ν > 1).
3.1
ν <
1
Let us first have a look at the case ν < 1. We focus here on a single (arbitrary) Ci, where
the arrival is a Poisson process with rate λi and the execution time has an Exponential
distribution with mean µi−1. Such a system is well known, and has been abundantly studied
Let Ji be the number of jobs in Ci (running and waiting jobs), and P[Ji = n] the
probability that the number of jobs in Ci is ni; we know (see for instance [9], page 371,
section 8.5.2) that P[Ji= n]∼ t b ( (νc i)n n! if n ∈ [0, ci] νn·c ici ci! otherwise (1) where b, ci−1 X k=0 (νci)k k! + (νci)ci ci! 1 1 − ν −1
If Qi is the asymptotic queue size, we have
P[Qi= n] = P[Ji= n + ci] if n > 0 Pci k=0P[Ji= k] if n = 0
Indeed, if there are n > 0 jobs in the queue, that means that those n jobs cannot be processed currently, because all CPUs are busy. There is therefore at that time n (in
the queue) + ci (currently processed) jobs on Ci. If there are no jobs in the queue, the
probability of this event is equal to P[Ji≤ ci].
Hence, P[Qi= n]∼ t ( bνn+ci·cici ci! if n > 0 Pci k=0b (νci)k k! if n = 0
It is now easy to compute the average queue size:
Theorem 3.1 If ν < 1, the average queue size of Ci is
E[Qi] ∼ t b νci+1· cci i ci!(1 − ν)2 where b, ci−1 X k=0 (νci)k k! + (νci)ci ci! 1 1 − ν −1 Proof : E[Qi] ∼ t P∞ n=1n · bν n+ci·cici ci! by definition of E = b(νci)ci ci! P∞ n=1nνn = b(νci)ci ci! ν (1−ν)2 Then, E[Qi]∼ t b νci+1· cci i ci!(1 − ν)2
with the same b as above.
Let us remark that the relative speed siof Cidoes not appear in E[Qi] when ν < 1. The
average queue is then “relative speed independent” in the non-saturated case.
3.2
ν >
1
When ν > 1, we can free the constraint that we are only looking at poissonnian systems. The only thing we need is that inter-arrivals and execution times have a finite average.
We are interested in the Ci queue size. Obviously, we cannot use the same technique
as above, because asymptotically, the queue of a saturated CE is always infinite, regardless of the load provided that ν > 1. We will focus on the average queue size at time t, that
is, if Pn(t) is the probability that there are n jobs in the queue at time t, we will consider
P∞
n=0nPn(t).
Before estimating the queue size, we will need to know the number of arrived jobs before time t, as well as the number of jobs having left the system by time t.
3.2.1 Arrivals
Let Ai(t) be the random variable which gives the number of jobs submitted between 0 and t
(included) to Ci, and Di(t) the random variable which gives the number of jobs having left
Ci up to t. We have:
Lemma 3.1 If the arrival process has λ−1i as inter-arrival mean, and a finite variance, then
E[Ai(t)] ∼
t λit
Proof : It is known (see [4], page 372, chapter XI, section 6) that the number of
jobs arrived between 0 and t tends asymptotically (in terms of t) towards a Gaussian with
mean λit and variance tvλ3i, where v is the variance of inter-arrivals, which has to be finite.
This is an extension of the central limit theorem. We have therefore that E[Ai(t)] behaves
asymptotically as λit
However, in practice, such a process converges quite quickly towards a Gaussian; a few dozen iterations are generally sufficient to have a really good approximation, for most distributions encountered in the kind of system we look at.
3.2.2 Departures
We will now show that the asymptotic behavior of E[Di(t)] on t, when ν > 1, is equal to
µitci. We first need to remember a result from queuing theory: if ν > 1 in a G/G/c queue,
the average time for having back an empty queue from a point where the queue is not empty
is infinite. Moreover, the average length of an idle period2
is finite. It is due to the fact that
2
An idle period on a CE is a period during which at least one CPU is not running a job and which cannot be extended without containing a period where each CPU is busy. On a single processor, an idle period is a period during which the CPU is not running a job and that cannot be extended.
the state “empty queue” is transient; the number of visits to such a state is then (almost surely) finite, and the number of busy periods (between two successive idle periods) is finite. Therefore, the average length of a busy period is infinite, and the average length of an idle period is finite.
We have from this that if I(t) is the sum of each idle period duration on [0, t], then
(t − I(t))∼
t t.
Let Dk
i(t) be the number of jobs sent on Ci, processed by the CPU k, and having left
the system by t, D∗ki(t) be the number of departures before t in a system where we compact
the time line in order to remove every idle period, and δk(t) be the total idle time on CPU
k between 0 and t. We have : Lemma 3.2
Dki(t) = D∗ki(t − δk(t))
and
t − δk(t)∼t t
Proof : We will bring some changes to our system, in order to remove every idle periods.
By definition of Dk
i(t), we have that Di(t) =Pck=1i Dik(t), and then
E[Di(t)] = E[ ci X k=1 Dki(t)] = ci X k=1 E[Dik(t)] (2)
Let us now look at one specific processor (let say k). If we observe the usage of that
CPU, we can see a succession of idle and busy periods. Let i1 be the first idle period (if
such a period exists), and let d1 be its duration. We can see that if we moved down by a
time d1 the arrival time of each job submitted after i1 on this CPU, i1 disappears, but we
have that Dk
i(t) = D
0
k
i (t − d1), where D0 is the number of jobs leaving the “new” system. If
we continue the same process until we have removed all idle periods, we will have that
Dik(t) = D∗ki(t −
X
`
d`)
where there are no more idle periods in the system described by D∗, and, by definition,
δk(t) =P`d`. Clearly, δk(t) ≤ I(t) (each idle period of the kthCPU is counted in I(t), but
some idle periods from other CPUs are in I(t) as well), and then t − δk(t)∼t t.
We can now show another lemma: Lemma 3.3
E[Dk
i(t)|no idle period in [0, t]] ∼t µit
Proof : If we do not have idle periods in [0, t], the “departure events” is a stochastic
process, where inter-arrival events are distributed as effective job lengths. For instance, if the job lengths distribution is exponential, the departures will be distributed as a Poisson
process. We can then use the same reasoning as for Lemma 3.1, using µi−1 as inter-arrival
mean.
Lemma 3.4 E[Di(t)]∼ t µitci Proof : E[Di(t)] =Pci k=1E[Dik(t)] by Equation 2 =Pci k=1E[D∗ki(t − δk(t))] by Lemma 3.2 ∼ t Pci k=1µi(t − δk(t)) by Lemma 3.3 ∼ t Pci k=1µit because t − δk(t) ∼t t (Lemma 3.2) = µitci 3.2.3 Queue size
Now we have the asymptotic behavior of Ai and Di; we can therefore find the asymptotic
behavior of Qi. Theorem 3.2 If ν > 1, we have E[Qi(t)] ∼ t λit ν − 1 ν
Proof : By definition of J (Ji(t) is the number of jobs in the system – running and
waiting – at time t), A and D, we have
Ji(t) = Ai(t) − Di(t)
E[Ji(t)] = E[Ai(t)] − E[Di(t)]
∼
t λit − µitci By Lemma 3.1 and 3.4
= t(λi− µici)
Of course, the queue size Qi(t) is equal to max(Ji(t) − ci, 0), and therefore, in the case
we are looking at (saturated and greedy system), we have almost always Qi(t) = Ji(t) − ci.
Therefore
E[Qi(t)] ∼
t t(λi− µici) − ci
∼
t t(λi− µici) Because ci is constant regarding to t
= λitν−1ν
The slope of the queue growth is therefore (λi− µici).
We can now calculate easily the total amount of jobs being in a queue of the whole system; we just need to sum up those queue sizes:
E[Q(t)] = X i λit ν − 1 ν = λtν − 1 ν
3.3
Experimental results
0 0.5 1 1.5 2 2.5 3 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8Average queue size
ν c1 = 16,s1 = 0.8 c2 = 8, s2 = 1 c3 = 8, s3 = 0.6 c4 = 4, s4 = 1 E[Q1(ν)] E[Q2(ν)] E[Q3(ν)] E[Q4(ν)] 0 2000 4000 6000 8000 10000 12000 0 1 2 3 4 5 6 7 8
Average queue size
ν
Figure 1: Queue Size observed in simulation and predicted, for non saturated system (left - Theorem
3.1) and saturated systems (right - Theorem 3.2). On the right plot, asymptotes are shown
In this paper, we are interested in various metrics, like the (average) queue size, the (aver-age) slowdown, the (aver(aver-age) number of used CPUs. . . and in particular in their asymptotic behavior for various system loads. In order to illustrate that, we will plot those metrics (y-axis), observed by simulation or predicted by theoretical analysis, obtained for a (large) fixed time t, in function of the system load ν (x-axis). For instance, in Figure 1, we per-formed about one hundred of simulations, for various ν’s going from 0 to 8 (0 to 0.8 for the left plot), and noticed the average queue size after a “long” constant time for each computing element (four dots vertically aligned); we also plotted in the same figure the values predicted by the theory (lines). The size (number of CPUs and the relative speeds) of the simulated CE is shown in the legend.
In the examples we picked from our simulations, we used the following parameters: the
simulation duration (t) was 100 000 and the average inter-arrival delay (λ−1) was 2. The
four CEs had 16, 8, 8 and 4 CPUs (ci), and the relative speeds were, respectively, 0.8, 1,
0.6, 1.
In the first plot (Figure 1, right side), we put our results for ν < 1 (using Theorem 3.1, which is only valid for exponential distributions), and in the second plot, we show the case ν > 1 (using Theorem 3.2). We did not put these two parts on the same plot for a simple reason of readability; the order of magnitude for the first part is around 10 (queue sizes are lower that 10 up to ν ' 0.98), and around 10000 for the second part (the biggest queue size
tends asymptotically towards∼ 10810).
We observe that there is an “inversion” around ν = 1: when ν < 1, E[Qi] < E[Qj] if
ci > cj, and for ν > 1, we have the opposite. More precisely, we have that E[Qi] > E[Qj]
if λi > λj, or if cisi > cjsj. We can see as well that, as we mentioned above, in the
that the C2and C3have the same average, in spite of the fact that C2is almost twice more
powerfull than C3.
If, in the saturated case, a CE with c CPUs with relative speed s is equivalent to a CE with c/n CPUs with relative speed s · n (with c/n ∈ N), this is not the case in non-saturated case: two CEs with the same number of CPUs are “equivalent” (in terms of queue size), whatever the relative speeds.
4
Used CPUs
0 2 4 6 8 10 12 14 16 0 0.5 1 1.5 2 Used CPUs ν c1 = 16, s1 = 0.8 c2 = 8, s2 = 1 c3 = 8, s3 = 0.6 c4 = 4, s4 = 1Figure 2: Average CPU usage.
The average number of used CPUs corre-sponds to the average number of jobs run-ning on a Computing Element in [0, t]. In the sequential case, a simple argument al-lows to find this average, in the saturated case and in the non-saturate case. The first case is trivial: if the system is saturated and queues are almost never empty, each CPU is continuously processing a job. The average
number of used CPUs on Ci is therefore ci
for any ν > 1. For the second case, we know
(see Lemma 3.1) that E[Ai(t)] ∼t λit. Let’s
assume that at time t, the queue is empty, or at least with a size negligible regarding
the Ai(t). The (average) total amount of
virtual work processed in [0, t] tends
there-fore towards λit
µ (the number of jobs multiplied by the average length), and so we need in
average λi
µ virtual CPUs, or
λi
µsi real (or effective) CPUs, which is equal to νci.
As for queue size, we can easily obtain the total number of used CPUs (for ν > 1): P
iνci= νPici.
The Figure 2 confirms the validity of our argument.
5
Resorption time
From a theoretical point of view, it can seem weird to consider a system where ν > 1. Indeed, this kind of system is not stable, and its asymptotic behavior is not viable. We find however this analysis interesting, because it allows to answer the following question: if,
starting from a point where all queues are (almost) empty, the load of our system is ν1> 1
during a period t1, and that after that period, the load goes down to ν2 < 1, how many
time will it take before that all queues are (almost) completely resorbed? We are not giving below a precise proof, but rather a rough estimation of that resorption time.
We shown in Section 4, that if the load is ν < 1, there will be in the average ciν (real)
used CPUs, and then ci(1 − ν) free CPUs on Ci. We know as well from Lemma 3.4 that if
we have k CPUs, Ci will take in the average kµsNii units of time for processing Ni jobs with
average virtual length µ. We will then consider the following approximation giving the time
needed by Ci for resorbing Ni sequential jobs with average virtual length µ0, if the load is
ν:
Ni
ci(1 − ν)µ0si
As a direct corollary of Theorem 3.2, we show that if there are N jobs waiting in the
whole system, N cisi
C are in average on Ci. The resorption does no longer depend on i, and
we have:
Lemma 5.1 The mean time needed for resorbing N sequential jobs (fairly distributed, with
average length µ0) if the load is ν < 1 is approximately
N
C(1 − ν)µ0
In particular, this results means that if the input is suddenly stopped after having a load
ν0> 1 during t units of time (N = λtν0−1
ν0 ), the resorption time will be
λtν0−1
ν0
Cµ0 = t(ν
0− 1)
6
Slowdown
The slowdown for a particular job is classically defined as waiting time + execution time
execution time
In our case, we will need to make a few adaptation to that formula, due to the heterogeneity of our system. We mainly want the same job with the same completion time (waiting time + effective execution time) on two CEs with different relative speeds having the same slowdown on those CEs. We assume that the user does not care that the real execution time of his job was shorter or longer that he though, he only cares about the time he waits before getting back his results.
We will then define the slowdown as (for a formal definition of effective and virtual execution time, cf. section 2.1, page 4):
waiting time + effective execution time virtual execution time
If the average waiting time – that is, the time between the submission time and the begin
of the job execution – for a job submitted on Ci at time θ with a load ν is Wi(θ, ν), the
average slowdown for a job submitted on Ciat time θ with a load ν will be
E[SDi(θ)] = Z ∞ 0 Wi(θ, ν) + m/si m f (m)dm = Wi(θ, ν) Z ∞ 0 f (m) m dm + si −1 (3)
where f (m) is the probability density for virtual job length. This average is valid only if waiting times are independent of the execution times, which is true for simple scheduling strategies such as FCFS or FF, but is not longer true for more complex techniques such as Backfilling [8].
If that function is not continuous, and that job lengths can take the values mn, n ∈
[1 . . . N ], with a probability P (mn) the slowdown will be
E[SDi(θ)] = Wi(θ, ν) N X n=1 P (mn) mn + si−1
6.1
Preliminary
Before splitting our argument in two cases (ν < 1 and ν > 1), we will compute the integral (or summation) in particular cases, keeping in mind first that f (m) is a probability density
function (R0∞f (m)dm = 1) and secondly that its average is µ (R0∞mf (m)dm = µ).
We will use several distributions for the virtual execution time:
- Constant: each job has a constant virtual execution time of µ−1.
- Uniform: virtual execution times have a uniform distribution going from (1 − α)/µ to (1 + α)/µ for α in ]0, 1[.
- Shifted exponential: as it is unfortunately not really possible to compute the average slowdown for an exponential distribution - the non-null probability density to have a zero length job makes the integral infinite - we will slightly modify the exponential distribution
in the following way: the job length is a constant α
µ plus an exponential distribution with a
rate 1−αµ , with α ∈]0, 1[.
- Erlang: virtual execution times have a one dimensional Erlang distribution with a shape h.
Table 6.1 summarizes the value of R0∞f(m)m for those distributions.
6.2
ν <
1
Knowing the average waiting time (or the average queue size) is required in order to esti-mate the slowdown. Unfortunately, in the non-saturated case, we only have results for the Poissonnian case. Our results for the average slowdown are then also limited.
Table 1: summary of distributions used in this paper Distribution f (m) R0∞f(m)m Constant N = 1, m1= µ−1, P(m1) = 1 µ Uniform f (m) = µ 2α if 1−α µ < m < 1+α µ 0 otherwise µ 2αlog 1+α 1−α Shifted exponential f (m) = ( 0 if m <α µ µ 1−αe −(m−α µ) µ 1−α otherwise µ 1−αe α 1−αΓ[0, α 1−α] Erlang f (m) = (h−1)!(µh)hmh−1e−µmh µ h h−1
Lemma 6.1 If ν < 1, with shifted exponential distribution for job length, the average
slow-down E[SDi] is asymptotically close to
1 cisi b(νci)ci ci!(1 − ν)2 e1−αα 1 − α Γ[0, α 1 − α] + si −1
Where b is the one defined in Theorem 3.1.
Proof : As in the section 3.1, for ν < 1, we first consider the Poisson-Exponential case.
We know by equation 3 that E[SDi(t)] = Wi(θ, ν)R0∞f(m)m dm + si−1. In the poissonnian
case, we can compute Wi(θ, ν).
When there is at least one free CPU on Ci, that is, when Ji is in [0, ci− 1], the waiting
time is null. If each CPU is processing some work and there is n (possibly 0) jobs in the
queue, the arriving job will in the average wait n+1
µci =
ν
λi(n + 1) (because execution times
are exponentially distributed). The average waiting time is then
Wi(θ, ν) = ci−1 X n=0 0 · P[Ji = n] | {z } =0 + ∞ X n=ci ν λi (n − ci+ 1)P[Ji= n] = ν λi ∞ X q=0 qP[Ji= q + c] | {z } =E[Qi] +ν λi ∞ X q=0 P[Ji= q + ci] | {z } =A
with (by equation 1)
A = ∞ X q=0 P[Ji= q + ci]∼ θ ∞ X q=0 bν q+cic ici ci! ∼ θ b (νci)ci ci! 1 1 − ν
and (by Theorem 3.1) E[Qi] = b ν ci+1c ici ci!(1 − ν)2 Then, Wi(ν, θ) ∼ θ ν λi b ν ci+1c ici ci!(1 − ν)2 + b(νci) ci ci! 1 1 − ν ∼ θ ν λi b(νci)ci ci!(1 − ν)!
As quoted above, for a “pure” exponential distribution, the integral is infinite. However, our simulations have shown that if we slightly modify our job length distribution (we kept the inter-arrival distribution and we used a shifted exponential distribution for job lengths
with a small α), queue sizes are still quite close to the E[Qi] we obtained above. Despite that
we cannot give an exact average or the asymptotic behavior of the slowdown, we are going
to give an approximation of this average. We consider for that estimation that the E[Qi] we
got in Theorem 3.1 is still valid for a shifted exponential distribution for job lengths, if α is close enough to 0. We then give the approximation for this average:
E[SDi] ' ν λi b(νci)ci ci!(1 − ν)2 µ 1 − α e α 1−α Γ[0, α 1 − α] + si −1 = 1 cisi b(νci)ci ci!(1 − ν)2 e1−αα 1 − α Γ[0, α 1 − α] + si −1
Where b is the one defined in Theorem 3.1.
We can see that, in case of real exponential distribution (that is, shifted distribution with parameter α = 0), the average queue size is infinite, because Γ[0, 0] is infinite. However, the
Γ function grows quite slowly: Γ[0, α
1−α] is greater than 100 only for α < 10−43 (Γ[0,
α
1−α]
is linear in− log(α)).
6.3
ν >
1
In the system we are studying, we measure the slowdown of completed jobs. We computed
then the average for each measured job3
. But, at the end of our observation period, especially if ν 1, a lot of jobs are still in the queue and are therefore not taken into account in our average. The average slowdown is thus measured between the first job and the last finished job (and not the last submitted job) before the end of our observation period. Of course, the heavier the load, the sooner the last finished job has been submitted, and the fewer the number of jobs being part of the average.
3
We are not fully assured that there is not a problem here: a job has to wait for another job completion, and thus slowdowns could be not independent. We still need to check that slowdowns are independent, and if not, if this could cause some problems.
In order to predict the average slowdown between the first job and the last one leaving the system before the end of the observation period, we will proceed in two steps; first
we predict the average slowdown of the job submitted at a time θ (E[SDi(θ)]), then we
will use these results for predicting the average slowdown on each job leaving the system
between 0 and a time t, or the measured slowdown (E[MSDi(t)]). Notice that, if ν < 1,
E[SDi(t)]∼
t E[MSDi(t)].
6.3.1 Slowdown for a job submitted at time θ.
Equation 3 gave us the general form of the slowdown for a job submitted at time θ. We com-pute in the previous section the value of the integral part for several job length distribution;
we still need to estimate the waiting time Wi(θ, ν).
Lemma 6.2 if ν > 1, the average waiting time for a job submitted at time θ is
Wi(ν, θ) ∼
θ θ(ν − 1)
Proof : From Theorem 3.2, we know that the average number of jobs in queue i is
asymptotically (for θ → ∞)
λiθ
ν − 1 ν
The average time the Nth job in the queue i (c
i jobs are running, N − 1 jobs are waiting
before this job) will wait tends (for N → ∞) to N
µici. In order to be convinced of it, let us
remark that the job flow at input of CPUs (that is, the flow at the output of queue of jobs coming in the CPUs) is in the average equal to the job flow at the output of CPUs. We
therefore know that, in the average, the queue is emptied4
according to µitci (see Lemma
3.4), and thus that the Nthjob waits in the queue in the average during N
µici units of time.
Then, the average waiting time for a job coming at time t on Ciis (because µNici is linear
in N ) Wi(ν, θ)∼t λiθ ν − 1 ν 1 µici = θ(ν − 1) because λi µici = ν.
Let remark that we found the same result as for the comment we did after Lemma 5.1, which is not surprising, because the resorption time after a time θ is equivalent to the waiting time to the last job submitted at that time.
And thus, E[SDi(θ)] ∼ θ θ(ν − 1) Z ∞ 0 f (m) m dm + si−1 ∼θ θ(ν − 1) Z ∞ 0 f (m) m dm (4)
The following lemma is simply proved by replacing the integral in equation 4 by the results we got above (begin of section 6, page 13).
4
That does not mean that the queue size goes down at that speed, but the jobs are leaving the queue at that speed.
Lemma 6.3 if ν > 1, the average slowdown of the job submitted at time θ is E[SDi(θ)]∼ θ λθ ν − 1 νC · 1 (1) 1 2αlog 1+α 1−α (2) e1−αα Γ[0, α 1−α] 1−α (3) h h−1 (4)
if virtual execution times distribution is, respectively,
- (1) constant with value µ−1,
- (2) uniform going from (1 − α)/µ to (1 + α)/µ for α in ]0, 1[, - (3) shifted exponential with parameter α,
- (4) Erlang with parameter h
6.3.2 Average slowdown until the last finished job with ν > 1
We know the slowdown of a job submitted at a given time. We will now estimate the submission time of the job finishing at time θ, and compute the average slowdown between 0 and the submission time of the last finished job.
Lemma 6.4 A job finishing at time τ has been submitted (in average) at time
θ = λτ − νC
λν
Proof : If a job is submitted at a time θ in queue i, it will end up in the average at a time
which is the sum of the arrival time, the average queuing time, and the average execution
time: τ ∼
θ θ + θ(ν − 1) + µ
−1= νθ + νC
λ
In order to give an estimation of the average slowdown from 0 to λsit−νC
λsiν (that is, the
average slowdown measured at time t), we need again to know the job length distribution as above.
Lemma 6.5 If ν > 1, the average slowdown for jobs leaving the system between 0 and t, in
the case of constant execution time µ−1, tends asymptotically on t towards
λtν − 1
2ν2C
Proof : We use here a reasoning close to the one we used for the estimation of the
departure in queue size when ν > 1. We “compact” our jobs in a way that we do not longer
have idle periods in 0 and t − δk(t). That manipulation does not change the slowdown of
any job, and thus keeps the average slowdown. Because the execution time is constant, we
have on the kth processor in the new system one job ending at time µ
i−1 (or λsνCi), another
We know furthermore by Lemma 6.3 (1) and 6.4 that a job ending at time τ has been slowdowned in the average by
λsiτ − νC λsiν λ(ν − 1) Cν = λ τ (ν − 1) ν2C + 1 − ν siν ∼ τ λτ ν − 1 ν2C
If MSDki(t) is the measured slowdown on the kth CPU of C
i between 0 and t, and
MSD∗ki(t0) is the same in the modified system, we have then that (t0 denotes t − δ
k(t)) E[MSDk i(t)] = E[MSD∗ki(t0)] ∼ t 1 bt0 λsiνC c Pbt0 λsiνC c j=1 jνC λsi λ(ν−1) ν2C = 1 bt0 λsiνC c (ν−1 siν bt0 λsiνC c(bt0 λsiνC c+1) 2 ) = ν−12ν (bt0λ νCc + 1) ∼ t ν−1 2siν(b tλsi νC c + 1) because t0 ∼t t ∼ t λt ν−1 2ν2C
We can now compute the average measured slowdown for all our system E[MSDi(t)]:
E[MSDi(t)] = 1 ci Pci k=1E[MSDki(t)] ∼ t 1 ci Pci k=1λt2νν−12C = λt2νν−12C When the execution time is not constant, we will admit an approximation of the slow-down. We will consider that this time is really small compared to t and sufficiently regular, and replace the summation by an integral (dτ will be the execution time).
Lemma 6.6 If ν > 1, the average slowdown for jobs leaving the system between 0 and t, in
the case of uniform execution distribution between µ(1−α) and µ(1+α) tends asymptotically on t towards λtν − 1 2ν2C· 1 2αlog 1 + α 1 − α
Proof : In the case of uniform distribution, the job ending at time τ has been
slow-downed by a time λτ − νC λν λ ν − 1 2αCν log 1 + α 1 − α = log 1 + α 1 − α ν − 1 2αν λτ Cν − 1
The average slowdown measured at time t can be approximated by (where t0is the instant
1 t0 Z t0 0 log 1 + α 1 − α ν − 1 2αν λτ Cν − 1 dτ = log 1 + α 1 − α ν − 1 2αν λt0 2Cν− 1 ∼ t λt log 1 + α 1 − α ν − 1 4αν2C
Because 1 is negligible compared to 2Cνλt0 and that t0= t − ε − δk(t)∼
t t, where ε is lower
that the execution time of the first job ending after t, which is in the average µ, and does
not depend upon t.
Lemma 6.7 If ν > 1, the average slowdown for jobs leaving the system between 0 and t,
in the case of shifted exponential distribution with parameter α tends asymptotically on t towards λtν − 1 2ν2C · e α 1−αΓ[0, α 1−α] 1 − α
Proof : With the same argument, we found that in the case of a shifted exponential,
the job ending at time τ has been slowdowned by a time λτ − νC λν λ ν − 1 νC e α 1−αΓ[0, α 1−α] 1 − α
and that the average slowdown measured at time t tends towards
λtν − 1 2ν2C · e α 1−αΓ[0, α 1−α] 1 − α
Lemma 6.8 If ν > 1, the average slowdown for jobs leaving the system between 0 and t, in
the case of Erlang distribution with shape h tends asymptotically on t towards
λtν − 1
2ν2C·
h h − 1
6.4
Experimental results
As for queue sizes, and for the same reasons, we show separately the cases ν < 1 and ν > 1. In the case ν < 1, we only found results for (nearly) exponential distribution. Figure 3 (left) shows this case. For ν > 1, we obtained results for different distributions (fixed, uniform, shifted exponential, and Erlang). Our predictions are superposed to our simulation results in those figures.
0 2 4 6 8 10 12 14 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 Average slowdown ν c1 = 16, s1 = 0.8 c2 = 8, s2 = 1 c3 = 8, s3 = 0.6 c4 = 4, s4 = 1 E[MSD1(t)] E[MSD2(t)] E[MSD3(t)] E[MSD4(t)] 0 50 100 150 200 250 0 1 2 3 4 5 6 7 8 Average slowdown ν c1 = 16, s1 = 0.8 c2 = 8, s2 = 1 c3 = 8, s3 = 0.6 c4 = 4, s4 = 1 E[MSD(t)] 0 50 100 150 200 250 0 1 2 3 4 5 6 7 8 Average slowdown ν c1 = 16, s1 = 0.8 c2 = 8, s2 = 1 c3 = 8, s3 = 0.6 c4 = 4, s4 = 1 E[MSD(t, ν)]
Figure 3: Average slowdown, with (left) exponential distribution shifted with α = 0.0005 on non
saturated system (Lemma 6.1), (center) fixed job length (Lemma 6.5)) on saturated system, and (right) uniform distribution from 0.5µ to 1.5µ on saturated system (Lemma 6.6)
The most interesting difference between ν < 1 and ν > 1 is probably that, in the first case, the average slowdown depends upon the CE on which the concerned job has been submitted on, while when ν > 1, the average slowdown is the same for each CE. This appears in formula’s: average slowdown for ν < 1 contains i’s, and average slowdown for ν > 1 is not “i-dependent”. However, we have to notice that we do not compute the average slowdown on the same number of jobs. For the first part, we compute the average on almost all submitted jobs, while in the second part, the bigger ν is, the more the proportion of measured job is small.
0 100 200 300 400 500 600 0 1 2 3 4 5 6 7 8 Average slowdown ν c1 = 16, s1 = 0.8 c2 = 8, s2 = 1 c3 = 8, s3 = 0.6 c4 = 4, s4 = 1 E[MSD(t, ν)] 0 200 400 600 800 1000 1200 1400 1600 1800 2000 0 1 2 3 4 5 6 7 8 Average slowdown ν c1 = 16, s1 = 0.8 c2 = 8, s2 = 1 c3 = 8, s3 = 0.6 c4 = 4, s4 = 1 E[MSD(t, ν)] 0 50 100 150 200 250 300 350 400 450 500 0 1 2 3 4 5 6 7 8 Average slowdown ν c1 = 16, s1 = 0.8 c2 = 8, s2 = 1 c3 = 8, s3 = 0.6 c4 = 4, s4 = 1 E[MSD(t, ν)]
Figure 4: Average slowdown on saturated systems, with (left) shifted Exponential distribution with
α = 0.05, (center) idem with α = 0.0005 (right) (Lemma 6.7), and (rigth) Erlang with shape (h)=2.
For ν < 1, the slowdown we give corresponds to the average factor a job submitted at any time would be slowdowned. For ν > 1, it is not the case; the slowdown for a job submitted at time t would be in average the one we gave in Lemma 6.3, but is still “i-independent”
As we could expect, when the job length distribution does not allow small jobs, the observed dispersion is rather small. In the case of shifted exponential distribution with a small α, (Figure 4, right plot), we observe some surprising extreme values; the values come generally from a really small job submitted late in the system. This kind of job waits a very long time in the queue (compared to its execution time), and has then a heavy weight in the average. In real situation, the same problem occurs when a job crashes at the very
beginning of its execution; that distorts the average slowdown. It is why Feitelson et al. [3] propose his bounded slowdown, which reduces the weight of small jobs.
Another remark is that the average slowdown (on finished jobs) is notably greater in some distributions than in others, despite the fact that, as we shown it above, queue sizes does not depend (too much) on job length distribution.
Figures 3 and 4 show how our predictions are close to our observations. We see that in case of shifted exponential, the smaller α, the bigger the dispersion.
7
Conclusions
Scheduling is one of the key services required for enabling performance on distributed and heterogeneous platforms such as computational grids. In this paper we have focused on a special kind of scheduler called a resource broker. A resource broker (also called a meta-scheduler) is mandatory when dealing with a multi-level architecture such as the one provided by the EDG/EGEE infrastructure. A resource broker dispatches requests on computing elements and each computing element schedules its own requests on its processors following a given policy (FIFO, etc.).
Due to the dynamic nature of many applications executed on computational grids, it is not possible to know in advance the arrival date and the duration of each request. Therefore, in this context it is neither possible to design a static algorithm that assumes the full knowledge of the application nor a dynamic one that only assumes the knowledge of task duration.
In this paper we have proposed and study a randomized resource broker for heterogeneous multi-level architectures where the arrival date and duration of the requests are given by probabilistic distributions (with fixed mean). We extend the results and analysis from previous literature (mainly from [1]) by generalizing the field of application studied so far. Our contribution is an extensive study of the behavior of the resource broker and the platform under such stochastic workload. More precisely we have studied the saturated and non-saturated case. For each case, we compute the average queue length of each computing elements and study the number of CPU used on each computing elements. We analyze the behavior of the system when it switches from the saturated to the non-saturated case. Finally, we evaluate how jobs are delayed according to the global load of the grid. Moreover, each of these metrics is studied both analytically and experimentally. To the best of our knowledge, those kind of analysis and measurment have only been studied in homogeneous environments; our work extends those results to heterogeneous systems.
We have shown by plotting together our simulation observations and our theoretical predictions or approximations that we have acquired a really good knowledge of job random brokering.
Our future works are directed towards more complex cases: current-state dependent brokering (based on queue lengths, free CPUs, estimation of waiting time,. . . ), (partially) randomized or fully deterministic, for other job length and interarrival distributions. These new constraints will more than probably make our analysis more difficult. Indeed, for
in-stance, we will need to introduce a feedback from Computing Elements to the Resource Broker. We also want to extend our work towards fault tolerance and reliability by du-plicating requests on several computing elements or by restarting request when a failure occurs.
References
[1] Vandy Berten and Joël Goossens. On the job distribution in random brokering for computational grids. In Proceedings of Second International Symposium on Parallel and Distributed Processing and Applications (ISPA’2004). Springer-Verlag, 2004.
[2] C. Ernemann, V. Hamscher, U. Schwiegelshohn, A. Streit, and R. Yah-yapour. On Advantages of Grid Computing for Parallel Job Scheduling. In Proceedings of the 2nd IEEE International Symposium on Cluster Computing and the Grid (CC-GRID 2002), May 2002.
[3] Dror G. Feitelson, Larry Rudolph, Uwe Schwiegelshohn, Kenneth C. Sevcik, and Parkson Wong. Theory and Practice in Parallel Job Scheduling. In Dror G. Feitelson and Larry Rudolph, editors, Job Scheduling Strategies for Parallel Processing, pages 1–34. Springer Verlag, 1997.
[4] W. Feller. An Introduction to Probability Theory and Its Applications, volume II, 2d Ed. John Wiley & Sons, 1971.
[5] Volker Hamscher, Uwe Schwiegelshohn, Achim Streit, and Ramin Yahyapour. Evaluation of job-scheduling strategies for grid computing. In Proceedings of the First IEEE/ ACM International Workshop on Grid Computing, pages 191–202. Springer-Verlag, 2000. [6] M. Harchol-Balter. Task assignment with unknown duration. Journal of the ACM,
49(2):260–288, 2002.
[7] U. Sscwiegelshohn J. Krallmann and R. Yahyapour. On the design and evaluation of job scheduling algorithms. Job Scheduling Strategies for Parallel Processing, pages 17–42, 1999.
[8] A. Mu’alem and D. Feitelson. Utilization, predictability, workloads, and user runtime estimates in scheduling the IBM SP2 with backfilling. IEEE Trans. Parallel and Dis-tributed Syst., 12(6):529–543, June 2001.
[9] R Nelson. Probability, Stochastic Processes, and Queueing Theory. Springer-Verlag, 1995.
615, rue du Jardin Botanique - BP 101 - 54602 Villers-lès-Nancy Cedex (France)
Unité de recherche INRIA Futurs : Parc Club Orsay Université - ZAC des Vignes 4, rue Jacques Monod - 91893 ORSAY Cedex (France)
Unité de recherche INRIA Rennes : IRISA, Campus universitaire de Beaulieu - 35042 Rennes Cedex (France) Unité de recherche INRIA Rhône-Alpes : 655, avenue de l’Europe - 38334 Montbonnot Saint-Ismier (France) Unité de recherche INRIA Rocquencourt : Domaine de Voluceau - Rocquencourt - BP 105 - 78153 Le Chesnay Cedex (France)