Paper 4
Paper 4
Abstract—With virtual machine (VM) technology being increasingly mature, compute resources in cloud systems can be partitioned in
fine granularity and allocated on demand. We make three contributions in this paper: 1) We formulate a deadline-driven resource
allocation problem based on the cloud environment facilitated with VM resource isolation technology, and also propose a novel solution
with polynomial time, which could minimize users’ payment in terms of their expected deadlines. 2) By analyzing the upper bound of
task execution length based on the possibly inaccurate workload prediction, we further propose an error-tolerant method to guarantee
task’s completion within its deadline. 3) We validate its effectiveness over a real VM-facilitated cluster environment under different
levels of competition. In our experiment, by tuning algorithmic input deadline based on our derived bound, task execution length can
always be limited within its deadline in the sufficient-supply situation; the mean execution length still keeps 70 percent as high as user-
specified deadline under the severe competition. Under the original-deadline-based solution, about 52.5 percent of tasks are
completed within 0.95-1.0 as high as their deadlines, which still conforms to the deadline-guaranteed requirement. Only 20 percent of
tasks violate deadlines, yet most (17.5 percent) are still finished within 1.05 times of deadlines.
Index Terms—VM multiplexing, resource allocation, convex optimization, prediction error tolerance, payment minimization
1 INTRODUCTION
p1 in Fig. 1 is running two VMs that are allocated with half nodes ðps ; s ¼ 1; 2; . . . ; nÞ, how to select ps and split resources
of the total physical resources, so its availability vector such that ti ’s payment (i.e., (2)) is minimized, subject to
a ðp1 Þ ¼ fCPU ¼ 1:2 Gflops; disk IO ¼ 0:5 Gbpsg. If there are
no workloads being executed simultaneously for a parti- Min P ðrrðti ÞÞ
cular task, its total execution time will be the sum of the s:t:
individual processing times on different dimensions. If the
execution of the workloads overlap, however, the task’s T ðti Þ Dðti Þ ð3Þ
completion time would be shorter. Accordingly, ti ’s final
execution time (denoted as TP ðti ÞÞ is definitely confined r ðti Þ a ðps Þ: ð4Þ
within such a range ½maxðrlkk Þ; R lk
k¼1 rk . For simplicity, we
denote
P lk task ti ’s execution time as (1) (affine transformation
of R Þ, where denotes a constant coefficient. Such a 3 OPTIMAL RESOURCE ALLOCATION
i¼1 rk
definition specifies a defacto broad set of applications each In this section, we will first analyze the problem mentioned
with multiple execution dimensions. The typical example is above, and then propose our optimal solution.
a single job with multiple sequentially interdependent tasks By combining (1) and (2), it is easy to verify that 8rk ;
@ 2 P ðrrðti ÞÞ P
or some program with distinct execution phases each ¼ R ð 2brk2lk þ 2lr3k R
@r2k i¼1 bi ri Þ > 0; thus, the target func-
relying on independent compute resources (where ¼ 1Þ. k k
tion P ðrrðti ÞÞ is convex, which means that there must exist a
" # minimal extreme point.
X R
lk ðti Þ maxðrlkk Þ
T ðti Þ ¼ ; where 2 PR l ; 1 : ð1Þ Based on the convex optimization theory [9], the
r ðt Þ
k¼1 k i k¼1 r
k
Lagrangian function of the problem could be formulated
k
as (5), where and 1 ; 2 ; . . . ; R are corresponding
For any cloud system, the resources provisioned are Lagrangian multipliers. Note that is a constant defined
usually set with a price vector denoted as bðpi Þ ¼ ðb1 ðpi Þ; in (1) and r is the abbreviation of r ðti Þ as stated above
b2 ðpi Þ; . . . , bR ðpi ÞÞT along R dimensions. bk ðpi Þ ð1 k RÞ ! ! !
denotes the per-time-unit price that the consumers need to 1 X R XR
lk X R
lk
pay for the consumption of the kth dimension on pi . Each F1 ðrrÞ ¼ bk rk þ D
R k¼1 k¼1 k
r r
k¼1 k
task ti is set with a deadline (denoted Dðti ÞÞ for its execution ð5Þ
and the payment is expected to be minimized under our XR
þ k ðrk ak Þ:
algorithm.
k¼1
In our cloud model, any task will be executed on one or
more virtual machines with user-reserved resources and the Accordingly, we could get the Karush-Kuhn-Tucker
payment is calculated based on the customized resource conditions [9] (i.e., the necessary and sufficient condition
(a.k.a., pay-by-reserve policy). Adopting such a pricing of the optimization) as below:
policy is driven by three reasons. First, the efficiencies of 8
>
> 0; k 0; k ¼ 1; 2 . . . ; R
many applications usually rely on multiple resources but it >
>
> X R
li
is nontrivial to precisely evaluate the exact amount of their >
> D
>
>
consumption separately on individual resources. Second, >
> r i
>
>
i¼1 !
quite a few users prefer to reserving resources for tolerating >
> XR
li
>
>
usage burst and guaranteeing their service levels. Lastly, the < D ¼0
i¼1 i
r
alternative pricing policy, pay-as-you-consume, is rather P >
> rk ak ðps Þ; k ¼ 1; 2; . . . ; R; s ¼ 1; 2; . . . ; n
>
simple because its payment P is always fixed ð¼ R >
>
k¼1 >
> k ðrk ak ðps ÞÞ ¼ 0;! k ¼ 1; 2; . . . ; R; s ¼ 1; 2; . . . ; n !
ðbk ðps Þ rk ðti Þ rlkkðtðtiiÞÞÞ ¼ R
k¼1 bk ðps Þ lk ðti ÞÞ regardless of the
>
> X X
>
> @F1 1 R
lk R
li lk
resource allocation. >
> ¼ bi ri 2 þ bk þ 2 þ k ¼ 0:
>
> @r R r r rk
Based on the pay-by-reserve policy, task ti ’s total >
> k i¼1 k i¼1 i
:
payment will be calculated via (2), where ps refers to ti ’s k ¼ 1; 2; . . . ; R
execution node. The mean price (i.e., R1 bðps ÞT rðti ÞÞ will be ð6Þ
used as the pricing unit over time, for computing user’s
payment. Such a design can be consistent with our pay-by- In other words, as long as we can find such an
allocation case ðrr ¼ ðr1 ; r2 ; . . . ; rR ÞT Þ to satisfy the above
reserve model, and also prevent users from feeling too
conditions simultaneously, we can set it as the optimal
costly when their applications’ execution cannot overlap at
solution of the deadline-driven payment-minimized pro-
different dimensions
blem. However, it is nontrivial to do that, because the last
1 condition ð@F @rk ¼ 0Þ cannot be directly solved. Whereas, we
1
P ðrrðti ÞÞ ¼ bðps ÞT r ðti Þ T ðti Þ: ð2Þ exploit a novel algorithm with polynomial time complexity
R
ðn R2 Þ to allocate resource, which can be proved to satisfy
In this paper, we might omit the notations ti and pi if the KKT condition listed above.
thus would not cause ambiguity. For instance, lk ðti Þ; Our algorithm is designed based on such a discovery: if
r ðti Þ; bk ðpi Þ; a ðpi Þ, and Dðti Þ may be substituted by we do not consider the limit of resource capacities (i.e.,
lk ; r; bk ; a , and D respectively, in the following text. condition (4)), the problem can be directly solved using
Our research could be briefly summarized as the follow- Lagrangian multiplier method. As follows, we will first
ing convex optimization format: for any task ti with its derive the optimal solution to the problem with unbounded
workload vector lðti Þ, given a set of candidate execution capacities (i.e., without the condition (4)) in Theorem 1. And
1100 IEEE TRANSACTIONS ON PARALLEL AND DISTRIBUTED SYSTEMS, VOL. 24, NO. 6, JUNE 2013
Proof. As mentioned previously, the target function is and their number is infinitive, along the line fr1 ¼ r2 and
convex; thus, there must exist the minimal extreme point. P ðrrÞ ¼ 4g. This result is consistent with (12).
In order to simplify the target function (i.e., (2)), we fix Formula (7) presents the resource share vector r ðÞ
the task’s execution time to be T ð DÞ, which also gained by ti such that its payment and the resource
satisfies the problem’s conditions. Then, the target utilization can be both minimized within its execution
function could be converted to deadline (i.e., (3)). Considering the constraint (4), rðÞ is
right the optimal solution as long as rðÞ a ðps Þ.
T XR
P ðrrÞ ¼ bk rk ; where T D: ð8Þ However, if rðÞ does not fully satisfy the constraint (4)
R k¼1 ðÞ
(i.e., 9k: rk > ak ðps ÞÞ; r ðÞ should not be a feasible
solution. As one contribution, we propose an efficient
The corresponding Lagrangian function is shown
algorithm (Algorithm 1) to determine the optimal
below:
solution subject to the constraint (4) with the provable
!
T XR XR
lk time complexity Oðn R2 Þ. u
t
F2 ðrrÞ ¼ bk rk þ D : ð9Þ Definition 1. For any task ti , based on a subset ð Þ, CO-
R k¼1 r
k¼1 k
STEPð; CÞ is defined as the procedure of computing the
Based on the Lagrangian multiplier method, @F @rk ¼ 0
2
optimal solution of minimizing P ðrr ðti ÞÞ subject to
(where k ¼ 1; 2; . . . ; RÞ constructs a set of necessary the constraint (13) by using convex optimization (similar to
conditions for getting the optimal solution (i.e., (10) the proof of Theorem 1), where C denotes a deadline and
must hold, where is a constant) r ðti Þð¼ ðr1 ; r2 ; . . . ; rR ÞT Þ denotes the resource shares gained
by ti on the execution dimension set .
R=T ¼ bk r2k =lk : ð10Þ
X
R
li
According to (10), we can easily get (11), 8j; kð1 j 6¼ C: ð13Þ
k RÞ i¼1
ri
r2k bk =lk ¼ r2j bj =lj : ð11Þ We devise Algorithm 1 for minimizing P ðrrðti ÞÞ subject to
the constraints (3) and (4), as shown below.
That is, (12) is the sufficient and necessary condition of
the optimal solution, s.t. a given deadline Algorithm 1. OPTIMAL ALLOCATION ALGORITHM
pffiffiffiffiffiffiffiffiffiffi pffiffiffiffiffiffiffiffiffiffi pffiffiffiffiffiffiffiffiffiffiffiffi Input: Dðti Þ; Output: execution node ps ; r ðti Þ
r1 : r2 : rR ¼ l1 =b1 : l2 =b2 : : lR =bR : ð12Þ 1: for (each candidate node ps Þ do
In order to save the resource utilized by the current task 2: ¼ ; C ¼ Dðti Þ; r ¼ (empty set);
as 3: repeat
PRmuch li
as possible, the optimal allocation should make
ðÞ
i¼1 ri equal to D. InPfact, for any resource allocation r ðti Þ 4: r ðti ; ps Þ ¼ CO-STEPð; CÞ; =* Compute optimal r
meeting (12) while R li
i¼1 ri < D, there must exist another
on =
ðÞ
solution with lower resource allocation r ðti Þ0 (i.e., r 0 ðti Þ 5: ¼ dk jdk 2 & rk ðti ; ps Þ > ak ðps Þ};
r ðti ÞÞ such that it also satisfies (12). Hence, P the task ti ’s = select elements violating constraint (4) =
R lk
optimal resource allocation should make k¼1 rk ¼ D, 6: ¼ n; = takes away =
P
then, by combining this equation, we can calculate the 7: C ¼ C dk 2 alkk ; = Update C =
optimal resource vector to be allocated as (7). u
t 8: r ðti ; ps Þ ¼ r ðti ; ps Þ [ frk ¼ ak ðps Þjdk 2 &ak ðps Þ
Remark. With unbounded resource availabilities, there will is dk ’s upper bound};
be no any constraint to the problem of minimizing the 9: until ð ¼ Þ;
ðÞ
target function P ðrrÞ. Based on the above analysis, there 10: r ðti ; ps Þ ¼ r ðti ; ps Þ [ r ðti ; ps Þ;
are infinite number of optimal stationary points, whose 11: end for
sufficient and necessary conditions are (12). For a vivid 12: Select the smallest P ðti Þ by traversing the candidate
illustration, we show the graph of a simple case in Fig. 2, solution set;
where b ¼ ð1; 1ÞT and l ¼ ð1; 1ÞT . From this figure, we 13: Output the selected node ps and resource allocation
can observe that there exist the minimal extreme points r ðti ; ps Þ;
DI AND WANG: ERROR-TOLERANT RESOURCE ALLOCATION AND PAYMENT MINIMIZATION FOR CLOUD SYSTEM 1101
In this algorithm, line 4 executes CO-STEPð; CÞ in order previously selected h1 will together compose the solution
ðÞ
to find the optimal r ðti ; ps Þ, under the assumption without satisfying the condition (6). If there are still h2 ð0 < h2
ðÞ R h1 Þ new resource shares violating rk ak in this
constraint (4). If r ðti ; ps Þ completely satisfies the constraint
ðÞ round, Algorithm 1 will continue the adjustment
(4) (i.e., ¼ Þ, then r ðti ; ps Þ is the local optimal resource P until
allocation for ti to be run on ps ; otherwise, let the resource the Hth round such that either all the R H i¼1 hi
shares ðrk ðti Þ, where k ¼ 1; 2; . . . ; RÞ that violate the con- remaining resource shares can satisfy rk ak or there are
straint (4) equal to its upper bound (i.e., ak ðps ÞÞ and take the no remaining resource dimensions in . In the former
case, we can easily verify that all the R resource shares
corresponding execution dimensions (i.e., Þ away from ,
P satisfy the condition (6) simultaneously, composing an
then, C ¼ C dk 2 alkk for the remaining dimensions. The
optimalPsolution; for the latter case, we could conclude
process will go on until the computed optimal resource
that R li
i¼1 ai D, then there does not exist a feasible
shares on the remaining dimensions satisfy the constraint resource allocation to run the task within the specified
(4). Since the time complexity of CO-STEPð; CÞ is OðjjÞ, deadline. In this situation, r ¼ a ¼ ða1 ; a2 ; . . . ; aR ÞT will
the number of computation steps of line 2-10 in Algorithm 1 get the execution time closest to the deadline, and it will
PR1
in the worst case is i¼0 ðR iÞ, thus the total time serve as the final solution. u
t
complexity of Algorithm 1 ¼ Oðn R2 Þ.
Although Algorithm 1 is proved optimal for minimizing
Based on the Algorithm 1, it is obvious that the local
the payment cost within user-defined deadline for his/her
optimal resource allocation for ti to be executed on a
task, the deadline still may not be guaranteed due to two
specified node ps is the most crucial part. In fact, the final
factors, either bounded available resources or inaccurate
outputted resource allocation solution of the whole algo-
workload vector information about the task. We propose
rithm will be globally optimal around the whole system as the following lemma, which provides a necessary and
long as each local process on a specified node (line 2-10) can sufficient condition of guaranteeing the task’s deadline
be proved as optimal resource allocation. Consequently, we given accurate prediction and relatively sufficient re-
will intensively discuss the local divisible-resource alloca- sources. In next section, we will discuss how to guarantee
tion by specifying a particular execution node, in the task’s deadline when performing the Algorithm 1 with even
following text. inaccurate workload vector.
Theorem 2. Given a submitted task ti with its load vector l ðti Þ Lemma 1. Given a task ti ’s workload vector lðti Þ ¼
and a deadline Dðti Þ and a particular node ps with its resource ðl1 ; l2 ; . . . ; lR ÞT and its deadline Dðti Þ, and a candidate
price vector bðps Þ, then the output after running the line 2-10 execution node ps , then ti can be executed within Dðti Þ if
of Algorithm 1 (i.e., r ðti ; ps Þ is optimal for minimizing ti ’s and only if (i.e., ,Þ Inequality (14) holds:
payment (i.e., P ðrrðti Þ)), subject to the constraints (3) and (4).
XR
lj ðti Þ
Main idea. We will prove that the r ðti ; ps Þ satisfies KKT Dðti Þ: ð14Þ
a
j¼1 j s
ðp Þ
conditions (i.e., (6)).
Proof. At the beginning, the algorithm executes the CO- Proof. To prove ( : If Inequality (14) holds, it is obvious
ðÞ ðÞ
STEPð; Dðti ÞÞ and the output is denoted r . Since r is there must exist a P viable resource allocation
ðÞ lj ðti Þ
derived from Definition P li 1 and Theorem 1, r must r ðti Þð a ðps ÞÞ, such that R j¼1 aj ðps Þ ¼ Dðti Þ. Hence, ti can
satisfy (12) and R i¼1 ri ¼ D, then if we let k ¼ 0 for any be executed within Dðti Þ.
k, there must exist an assignment such that all the To prove ) : If ti can be executed within Dðti Þ, there
ðÞ
conditions in (6) hold except for rk ak . Accordingly,
ðÞ ðÞ ðÞ ðÞ PR ljexist a viable resource allocation r ðti Þ such that
must
r ¼ r as long as rk ak for all rk s in r . j¼1 rj Dðti Þ and r ðti Þ a ðps Þ. Assuming
P Inequality
ðÞ lj ðti Þ
If r cannot satisfy all the R inequalities ðrk ak , (14) does not hold at the moment, i.e., R j¼1 aj ðps Þ > Dðti Þ,
where k ¼ 1; 2; . . . ; RÞ, we need to further adjust the then, we could derive
ðÞ
solution r to find the one completely satisfying the
condition (6). In Algorithm 1, at this moment, all the rk s
ðÞ XR
lj ðri Þ XR
lj ðti Þ
ðÞ < : ð15Þ
such that rk > ak will be selected and set to ak . Without r ðp Þ j¼1 aj ðps Þ
j¼1 j s
loss of generality, assuming there are h1 such resource
shares and they are denoted as r1 ; r2 ; . . . ; rh1 . Obviously, Accordingly, we can derive that there must exist a
each selected rk must satisfy k ðrk ak Þ ¼ 0 because dimension, for example, dk such that rk ðti Þ aðps Þ,
rk ¼ ak . On the other hand, Algorithm 1 will continue to which contradicts to the previous assumption that rðti Þ
execute CO-STEPð; P CÞ on the rest R h1 dimensions, is a viable solution ðrrðti Þ aðps ÞÞ. u
t
where C ¼ Dðti Þ hk¼1 1 lk
rk . Likewise, all the R h1 new
resource shares (each denoted by rk ; k ¼ h1 +1, . . . ; RÞ
4 OPTIMALITY ANALYSIS WITH INACCURATE
must also satisfy
INFORMATION
sffiffiffiffiffiffiffiffiffiffi sffiffiffiffiffiffiffiffiffiffi sffiffiffiffiffi
lh1 þ1 lh1 þ2 lR In this section, we focus on such a question: what is the final
rh1 þ1 : rh1 þ2 : : rR ¼ : : : ; upper bound of task execution length as compared to its
bh1 þ1 bh1 þ2 bR
P li predefined deadline D, when running it using the resource
and R i¼1 ri ¼ D, thus if each of them meets the condition vector allocated under Algorithm 1 with inaccurately
rk ak , the R h1 new resource shares and the predicted workload information?
1102 IEEE TRANSACTIONS ON PARALLEL AND DISTRIBUTED SYSTEMS, VOL. 24, NO. 6, JUNE 2013
ðÞ
4.1 Problem Description . r E ðti Þ ¼ r E ðti Þ.
ðÞ
Although Algorithm 1’s output is proved optimal, such a . r E ðti Þ 6¼ r E ðti Þ.
result relies on a strong condition, i.e., accurate task’s The first situation indicates that in terms of the skewed
workload vector. That is, each user needs to precisely estimation of workload ratios, all the resource shares
predict the execution property (i.e., workload ratio) for his/ calculated by the initial CO-STEP in Algorithm 1 are always
her task, before constructing the resource allocation with no greater than the corresponding capacities. That is, it is
minimized payment for its execution under a user-specified equal to the situation with the assumption that Inequality
deadline. In some cases, the execution property could be (18) holds:
easily estimated accurately. For instance, we can decide the
ðÞ
workload ratio between the data to be read/written from/ rE ðti Þ aðps Þ: ð18Þ
to disk and those to be downloaded/uploaded via network
In contrast, the second one means that the initial CO-STEP
by comparing their data sizes. In many other cases,
cannot fulfill the above condition, and the optimal alloca-
however, the execution property cannot be accurately
tion cannot be found unless a few more adjustment steps
estimated, such as computation-intensive applications
(line 5-8 of Algorithm 1).
whose execution times highly depends on the CPU cycles
As follows, we will first derive task ti ’s execution time
to consume.
upper bound for the first category (i.e., Theorem 3), and
Definition 2. Suppose a task ti ’s real workload vector is lðti Þ, then discuss the upper bound (i.e., Theorem 4) for the more
while its workload vector used by our algorithm is l 0 ðti Þ subject generic case including the second category.
to the Inequality (16), where and are the lower bound and
Theorem 3. Given a submitted task ti with a predefined deadline
upper bound for the estimation ratio specified by user based on
Dðti Þ, a candidate execution node ps with unbounded resource
experiences or particular workload prediction methods such as
capacity and a resource price vector (denoted bðps ÞÞ, and a
[13], [14], [15]:
skewed workload vector l0 ðti Þ subject to Inequality (16), then
l0k ðti Þ the bound of execution time must satisfy Inequality (19), under
; k ¼ 1; 2; . . . R: ð16Þ ðÞ
lk ðti Þ the resource allocation r E :
1 ðÞ 1
To illustrate the above definition, an example is given. Dðti Þ TE ðti Þ Dðti Þ: ð19Þ
Assuming the task ti ’s real workload ratios range in [0.125,
1], and the workload vector l 0 ðti Þ used by Algorithm 1 will Proof.
be set based on the task’s historical execution records.
Suppose each element l0k ðti Þðk ¼ 1; 2; . . . RÞ will be set to 0.25 ðÞ
X
R
lk X
R
lk
if the corresponding true workload fluctuates in [0.125, 0.5] TE ¼ ðÞ
¼ P R p ffiffiffiffiffiffiffi qffiffiffil0
k¼1 rEk k¼1 ð l0i bi Þ bkk
and set to 0.75 if the true workload ranges within (0.5, 1]. D i¼1
Then, we could get Inequality (17) below, where ¼ 0:125 ! pffiffiffiffiffi PR pffiffiffiffiffiffiffiffi
0:25 ¼ XR
0:5
0:5 and ¼ 0:25 ¼ 2: D lk bk D 1 lk b k D
¼ PR pffiffiffiffiffiffi
0
ffi p ffiffiffi
0
ffi p ffiffiffi
ffi p ffiffiffi
ffi Pk¼1
R pffiffiffiffiffiffiffi
¼ :
i¼1 li bi k¼1 l k
i¼1 li bi
l0k ðti Þ t
u
0:5 2; k ¼ 1; 2; . . . R: ð17Þ
lk ðti Þ
Using the inaccurate prediction l0 ðti Þ to perform the The key of the above proof is based on the Inequality
Algorithm 1, it is obvious that ti ’s real execution time may (16). Similarly, According to Inequality (16), we can also
surpass the expected execution deadline Dðti Þ. Hence, one ðÞ
derive TE D .
question is what the worst performance will get when Accordingly, Inequality (19) holds. It is easy to see that
using l 0 ðti Þ instead of lðti Þ, compared to the expected Inequality (19)’s bound is tight. Considering such a case:
deadline Dðti Þ. ðÞ
8k; l0k ðti Þ ¼ lk ðti Þ, then TE will be equal to D
4.2 Deadline Extension Ratio (DER) with Skewed Theorem 4. Given a submitted task ti with a predefined deadline
Estimation of Execution Property Dðti Þ, a candidate execution node ps with a limited available
resource vector ðaðps ÞÞ and price vector b ðps Þ, and a skewed
PR lk we denote r E ð¼ ðrE1 ; rE2 ; . . . ;
For simplicity of description,
T
rER Þ Þ and TE ð¼ k¼1 r Þ as the output of Algorithm 1 workload vector l 0 ðti Þ subject to Inequality (16), if Inequality
Ek
with the skewed workload prediction and the correspond- (14) holds, then under the resource allocation r E , the bound of
ing execution time, respectively ðE here implies “Estima- execution time must conform to
tion with error”). Similarly,
P we denote rI ð¼ ðrI1 ; rI2 ; . . . ; 1 1
rIR ÞT Þ and TI ð¼ D ¼ R lk
k¼1 rIk Þ as the output with real Dðti Þ TE ðti Þ Dðti Þ: ð20Þ
workload vector and the corresponding execution time,
respectively ðI here indicates “Ideal case”). Hence, our Proof. Without loss of generality, we denote to be the set
T
objective is to determine the upper bound of TE , a.k.a., of resource dimensions accumulated by Line 5 of
I
deadline extension ratio. Algorithm 1, and the corresponding dimensions’ indexes
We partition the situation that Algorithm 1 would face to are 1, 2,. . . ; jj. That is, r1 ¼ a1 ; r2 ¼ a2 ; . . . ; rjj ¼ ajj ,
ðÞ
two categories, where r E refers to the optimal resource while rjjþ1 < ajjþ1 ; . . . ; rR < aR . Hence, we can get the
allocation with the constraint (4) (unlike the notation r E Þ: following equation:
DI AND WANG: ERROR-TOLERANT RESOURCE ALLOCATION AND PAYMENT MINIMIZATION FOR CLOUD SYSTEM 1103
0 1
Xj j XR
li li TABLE 1
TE ¼ @ þ A: ð21Þ
i¼1 i
a r
i¼jjþ1 Ei
Workload of Typical Matrix Operations (Seconds/Core)
u
t Each user request (denoted as task ti Þ is assigned with a
deadline, which is a random value in [18 T1 ðti Þ; T1 ðti Þ],
where T1 ðti Þ means the estimated execution time when
5 PERFORMANCE EVALUATION running the task ti on a particular core. Based on our
5.1 Experimental Setting experiment, the three matrix operations on one core will
We implement a web service-based prototype that can cost from 1 second to 1,206 seconds as shown in Table 1,
compute a set of combined matrix operations. Each matrix which implies a quite heterogenous nature. In Table 1,
1104 IEEE TRANSACTIONS ON PARALLEL AND DISTRIBUTED SYSTEMS, VOL. 24, NO. 6, JUNE 2013
Fig. 3. Workload prediction. (a) Lower bound. (b) Upper bound. Fig. 4. Deadline extension ratio. (a) D0 ¼ D. (b) D0 ¼ D.
M; N, and P refers to the matrix scale in the matrix-matrix- physical machines in our experiment but much more than 10
multiply and QR-Decomposition Solving, and m indicates tasks can be processed with guaranteed deadlines, which
the value of exponent in the matrix-power computation. indicates a remarkably high level on service consolidation.
Users’ prices of running the three individual matrix- This also implies a great potential in improving resource
operations are set to 1, 2, and 3, respectively. utilization by taking advantage of VM-multiplexing feature.
Fig. 5 presents the distribution of the deadline extension
5.2 Experimental Results ratio, in a competitive situation where there are 40 tasks
We first present the prediction effect over the historical submitted. We observe that the stricter deadline-based
records of the three matrix operations (as shown in Fig. 3), in algorithm can more effectively limit the majority tasks’
that the approximation ratio of our optimal algorithm is execution times to about 0.7 times as high as the user-
based on the inaccuracy of the workload predicted, accord- specified deadlines (i.e., the original ones), but it may suffer
ing to the analysis in Section 4. From this figure, we can from higher DER at the worst case. In comparison, the
clearly observe that the prediction method we used can make majority of tasks (about 52.5 percent) under the original-
sure that the lower bound of the workload predicted (i.e., ’s deadline-based algorithm are completed within 0.95- 1.0
value will be set close to 0.7, where is defined in Definition 2 times of their deadlines, which still conforms to the deadline-
and used in Theorem 3 and 4) is always lower than the real guaranteed requirement; there are about 20 percent of tasks
that would violate deadlines, most of which (17.5 percent)
workload that is calculated after its execution.
are still finished within 1.05 times of deadlines.
We evaluate our designed algorithm with and without the
Finally, we evaluate the fairness of task processing in the
prediction-error-tolerant support. That is, the system will
two cases, confirming the stability. Based on Jain’s work
test the Algorithm 1 with the tuned stricter deadline ðD0 Þ or
[19], fairness index (higher value means higher fairness) is
the original one ðDÞ. We use Deadline Extension Ratio (defined
defined as (24) whose value ranges in [0, 1], where xi refers
as the ratio of task’s final execution time to its deadline) to
to the DER of task ti :
evaluate the statistical task execution lengths compared to
Pn
their expected deadlines. We run 40 separate cases each with ð x i Þ2
different number (1-40) of tasks, and show the lowest/ xÞ ¼ Pi¼1n 2 :
F ðx ð24Þ
n i¼1
xi
average/highest level of DER for each case.
We first show the experimental result by using the We present the experimental results about the fairness
original deadline D (i.e., D0 ¼ DÞ in the algorithm. From index of the DER in Fig. 6. As observed, the fairness index is
Fig. 4a, we see that the tasks’ execution times cannot be always kept over 0.99 for both cases under the relatively
always guaranteed to be executed within their deadlines in uncompetitive situation (e.g., m 30Þ, and still kept about
the worst case, no matter how many tasks (1-40) are 0.95 in the case with higher competition (i.e., when m > 30Þ.
submitted. Specifically, even though the system availability Recall that there are only 10 physical machines used for
is relatively high (e.g., there are only several tasks sub- resource provisioning in our experiment, which implies our
mitted), the average value of deadline extension ratio is solution’s allocation effect is confirmed to be quite stable to
nearly to 1 and its highest value in the worst case is up to 1.2. any task’s execution under such a dense server consolida-
This is mainly due to the inaccurate workload prediction tion. In addition, the main reason for the degradation of the
with about 30 percent margin of errors as shown in Fig. 3. In fairness of DER in the competitive situation is that the tasks
comparison, Fig. 4b shows the deadline extension ratio when
the deadline D0 is set to a stricter deadline ð DÞ. When the
number (denoted by mÞ of tasks submitted scales up to 30, all
tasks’ execution times can be kept nearly to about only 0.7
times as high as their preset deadlines ðDÞ at the worst
situation (i.e., the highest level shown in the figure). With
further increasing number of the submitted tasks, tasks’
execution times cannot be always guaranteed because of the
limited resource capacities (or the higher level of competi-
tions on resources), but the mean level is still kept
remarkably lower than 1, which means that most of the
tasks can still meet the QoS (i.e., large majority can be
finished before deadlines). Note that there are only 10 Fig. 5. Distribution of DER (the number of tasks).
DI AND WANG: ERROR-TOLERANT RESOURCE ALLOCATION AND PAYMENT MINIMIZATION FOR CLOUD SYSTEM 1105