Information Technology Reference
In-Depth Information
According to the budget constraints the algorithm constructs a scaling plan
that best fit the workflow computation requirements for the next hour. Algo-
rithm 1 presents the process of infrastructure scaling.
Algorithm 1. Infrastructure scaling algorithm
1: procedure scaleInfrastructure:
2:
tasks ₐ getTasksInThePeriod()
tasks running during the next hour
C unbound estimateConsumption( tasks ) get unconstrained consumption
3:
4:
C od scale( C unbound ,B od /cost unbound )
determine on-demand instances
C unbound ₐ C unbound − C od
5:
6:
bidPrices ₐ predictBidPrices()
invokes a bid price prediction method
C s scale( C s ,B s /cost s )
determine spot instances
7:
8:
C od = C od − R
9:
C s = C s ( R − C od )
10:
for all VMType i in VMTypes do :
request instances
11:
requestInstance( C od [ VMType i ])
12:
requestSpotInstance( C s [ VMType i ] , bidPrices [ VMType i ])
To generate the scaling plan, the algorithm starts by estimating the compu-
tation load for the next hour (lines 2 and 3). A consumption vector C unbound =
{
represents the amount of instances necessary for each type for
the next hour with unconstrained budget . Each component c i represents the
amount of instances of type VMType i .
Each c i value is estimated summing the computation hour portions for all
the tasks which prefer and instance of type VMType i .Inthecaseof running
tasks , the computation load is set to the type of the instance where such task
is executing.
To generate the scaling plan, the algorithm computes two consumption vec-
tors, C od and C s (for on-demand and spot instances respectively) derived from
the unconstrained consumption vector C unbound . This process is carried out in
two steps:
c 1 ,c 2 ,...,c n }
1. The consumption vector of on-demand instances C od is determined fitting
the number of instances according to the available budget B od .The C od vec-
tor is obtained scaling the unconstrained consumption vector C unbound by the
factor B od /cost od ,where cost od is the total cost of acquiring all the instances
in C unbound using the on-demand instance prices (line 4). A consumption
round( C
·
r ) r< 1
vector C is scaled by a factor r> 0 as scale( C,r )=
1 ,
round( C )
r
r is the product of a vector and a scalar and the round function
is applied to each element of the resulting vector.
2. In analogous manner, the consumption vector of spot instances C s is de-
termined by scaling the remaining unconstrained instances: C unbound
where C
·
C od
(line 5). This new consumption vector is then scaled by the factor B s /cost s
 
Search WWH ::




Custom Search