You are on page 1of 4

2019 4th International Conference on Cloud Computing and Internet of Things (CCIOT)

Online Dynamic Resource Procurements via Cloud


Brokerage with Multiple Reserved Instance Terms
Boyu Zhang Ming Fang Hejiao Huang*
School of Artificial Intelligence School of Artificial Intelligence School of Computer Science and
Changchun University of Science and Changchun University of Science and Technology
Technology Technology Harbin Institute of Technology
Changchun 130022 Changchun 130022 ( Shenzhen)
2583392480@qq.com fangming@cust.edu.cn Shenzhen 518055
huanghejiao@hit.edu.cn

Abstract—Different infrastructure resources are utilized by 0.9$ which is lower than the on-demand prices of CSP, i.e.,
the Cloud broker to meet the demands of the users so that the 1$ (step 4). In reality, the broker can earn 1.9$, because he
monetary cost is minimized. To a certain extent, the demands can charge 9.9$ (11*0.9) and only need to pay 8$ (1+4+3).
of the users can be collected or forecasted in advance, and
some off-line algorithms can be used to plan the schemes to use On-demand request Reservation/On-demand
the resources. But it is unavoidable some demands will be
unpredictable and thus the input information will be Price:
User 1 1 On-demand
inaccurate. This blunts greatly the practical effectiveness the 4  =6
User 2 CSP 1
off-line algorithms. It is impracticable to apply the off-line
algorithm with great fluctuation caused by the sudden User 3 Broker
demands. This paper addresses the challenge by an online 1.5 On-demand
User 4 3  =4
algorithm. Extensive real world traces driven evaluations show 5  =8
that the proposed algorithm can save cost up to 14%. t 1 2 3 4 5 6 CSP 2
Exploits proper reservation
Intermediate price: 0.9
Keywords—Cloud Brokerage, Dynamic Resource or on-demand price

Procurements, Online algorithm


Fig. 1. Broker serve the dynamic requests withe a lower intermediate price
by renting instances from multiple CSPs.
I. INTRODUCTION
To a certain extent, the demands of the users can be
It is difficult for users to choose one CSP from numerous collected or forecasted in advance, and some off-line
public cloud providers (CSPs) and then select appropriate algorithms can be used to plan the schemes to use the
infrastructures, such as virtual machines (VM) instance, to resources. But it is unavoidable some demands will be
meet their demands. Because each CSP deliveries services unpredictable and thus the statistical result will be inaccurate.
with different schemes, VM instances are different, prices This blunts greatly the practical effectiveness of the off-line
and rental cycle are also different from each other. The algorithms.
resources can be provided on-demand and be charged at a
short duration of minute (Microsoft Azure [1]) or hour This paper tries to address the change. The main
(Amazon EC2 [2]). As an alternative, VM instances can also contributions are as follows:
be reserved in advance and be launched in the time of need. 1. A new online algorithm is presented to solve dynamic
The reserved instance will be billed by a total fee whenever resources provision via brokerage by using reserved
the instance is active. Amazon gives two choices: 1 year term
instances.
and 3 years term (Amazon EC2 [2]). Whenever, VMware
provides a more flexible service from 1 month to 36 months 2. The effectiveness of the algorithm is demonstrated by
[3]. Of course the average price is much cheaper than the on- using the extensive real world traces driven simulations
demand one. The longer the reserved term is, the cheaper the through comparing with the existing algorithms.
price. The saving over on-demand price of Amazon
m3.media instance can be up to 29% and 60%, for 1-year The remainder of the paper is organized as follows. In
and 3-year terms, respectively [2]. Section 2 related works are reviewed. Section 3 formulates
the problem and presents an online algorithm. It is evaluated
Cloud broker can help users with their professional skills in Section 4 and concluded in Section 5.
[4]. Especially it can provide infrastructures to the users by
multiplexing the demands of users and then rent resources
from CSP. II. RELATED WORK
Most works do not provide the reservation scheme to the
Fig. 1 interprets the instances, prices and services broker whenever in one cloud [5] or multi-cloud [6] [7].
schemes. In step 1, four users apply for on-demand instances Load balancing service broker policy is combined for the
from time 1 to 6. Then the broker strives to rent instances dynamic resource provisioning problem [5]. It only uses the
from CSP to satisfy all the demands with the least monetary on-demand VM resources to meet the requirements of the
cost in step 2. CSP can rent the on-demand or the reserved predicted overall tasks. Energy efficiency is addressed by a
instances with various terms and prices (step 3). A scheme is bin packing algorithm in the multi-cloud scenario [6].
adopted where the left user demand is met by the instance Random key Genetic method is used to reduce the monetary
with the same background setting on the right CSP side. This
cost when different VMs are rented from multiple clouds [7].
enables the broker to serve users with a price of only
Unfortunately, all of them only make use of the on-demand
*Corresponding author. Tel.: +86 755 26033487 resources.

978-1-7281-4398-9/19/$31.00 ©2019 IEEE 10 Changchun, China•December 6-7, 2019


The reservation schemes are first taken into account in 0 otherwise
paper [8] and [9]. The authors try to explore the problem by The last demand time at level
bl
using a set of recursive bellman equations. But both of them l , bl  min{t|d tl  1}
assume that the reserved instance term is only one. It is far The last demand time at level
from reality of the cloud industry. el
l , el  max{t|dtl  1}
Multiple reserved instance terms problem is discussed in
paper [10]. The problem is formulated as a 0-1 integer linear Tl The Length of level l , T l  el  bl  1 , For the online
programming first. Then two level by level off-line scenario when d tl  1 ,then at current time
reservation algorithms are provided, i.e., Level by level
longest term preference decision (3LTPD) and Set cover
t ,T l
 el  t  1
Rl
based algorithm (SCBA). At last it is proved that algorithm T The residue length of level l within the coming
3LTPD finds a 2-approximation solution when the demand is accounting period. For the online scenario, then at
convex. It is also proved that SCBA finds a current time, let T Rl  max(T L , T )
H (m) ( m  max l H (u l ) ) approximation for the problem. c0 The on-demand price
The experiment demonstrates that 3LTPD is superior to
SCBA. But unfortunately, no online scenario is addressed. 1
In Fig. 2, there are two levels. T is 5. J is 3. d 2 equals
III. PROBLEM FORMULATION AND ONLINE ALGORITHM 1 because there is a demand at time 2 and level 1. bl is 1, el

A. Problem Formulation and Notations


is 3, Tl is 3, T Rl is 5 in Fig. 2.
At each time t, the demand of different users at this time 2
In Fig. 3, d 4 equals 0 because there is no demand at
will be aggregated together. Fig. 2 and Fig.3 depict the
corresponding demand curve of the demands appeared in Fig. time 4 and level 2.
1.
Suppose t is the current time. alj is the total cost
3 incurred by on-demand instances used in the past period
L3 [t   , t  1] at level l . If the number of launched on-
Demand

2
1 L2
demand instances in [t   , t  1] is n j then alj  n j c0 .
L1
0 1 2 3 4 5 Time(hour) Then the problem can be described as in the coming
accounting period T (corresponding to a year in the
Fig. 2. Demand curve at time 1 and time 2. Bahncard problem) from time 1, the broker wants to
minimize his monetary cost paid to the CSP while meet the
At time 1 and time 2 only the requirements of user B and requirement of all the users.
D are known (Fig. 2). Because there is no new demand at
time 2, the demand curve at time 1 is just the same as that of
B. Online Algorithm
time 2.
The online algorithm utilizes the idea of Bahncard
problem [11]. Bahncard problem formulates the online ticket
3
L3 purchasing on German Federal Railway. A customer can
Demand

2 always buy a ticket every time he wants to travel or buy a


1 L2
Bahncard so that he can travel freely in the next year. He can
L1
0 1 2 3 4 5 Time(hour) make a choice between the ticket and a Bahncard only based
on his historical travel records. This just corresponds to the
one level broker resource provision problem, where the ticket
Fig. 3. Demand curve at time 3. corresponds to an on-demand instance and a Bahncard
corresponds to a reserved instance. The difference is that
At time 3, the requirement of user C is coming, the there are multiple terms for the reserved instance in our
demand curve is changed as Fig. 3. problem, rather than only one term: a year.
The main notations which will be used later are listed in The following online algorithm 1 is proposed.
table I.
Algorithm 1 Online algorithm (Online)
TABLE I. NOTATIONS Algorithm1 Online algorithm (Online)
Notations Descriptions Input: dt : number of required instances arriving at time
T The coming accounting period t .  1 , 2 ,..., J : increasing reserved instance terms with
J The number of reserved instance terms
increasing cost c1 , c2 ,..., cJ
t The current time
Output: A resource provision solution
dt The number of required instances arriving at time t
1: for l  1,..., dt do
l
d Indicator whether there is a demand at level l at billing
alj  0
t
l
2:
cycle t , i.e., d  1 if dt  l
t where is the level, and

11
3: l
if There is an instance reserved to serve dt already information, it is online algorithms. We also select an off-
line algorithm 3LTPD [10] for comparison, in that it saves
l
or dt  0 then almost the same resource cost as SCBA [10] and runs faster.
The following figure depicts the results.
4: break
5: end if
6: Rl
For the instance with term  j ( j  T ) , calculate

Saving percentage(%)
W/BLP
30% 3LT PD
alj , j  1, 2,..., J . Online
20%
Obviously, al1  al 2  ...  alJ
10%

7: if Exists j , such that alj  c j then 0


A B C D
8: i  max{ j | alj  c j } , reserve an instance with Data source

term  i at level l Fig. 4. Saving percentage with CSP 1 resources.

9: else Fig. 4 compares the three algorithms when only the terms
10: launch an on-demand instance at level l of CSP 1 is used. Obviously the online algorithm 3LTPD is
11: end if the best because it know all the demand in advance. When
12: end for the demand is coming one by one, the online algorithm is
much better than N/B OnD and W/B LP.
Note at time t , dt is the number of required instances W/BLP

Saving percentage(%)
3LT PD
arriving at time t , so dt indicates the maximum level. The 30% Online
algorithm will find an appropriate instance for each level
20%
(Line 1 to Line 12). First, alj is assigned as 0 (Line 2). Then
if the demand has been satisfied (because maybe the term of 10%
a selected reserved instance is longer than the known
demands at this level), or there is no demand at this 0
l A B C D
time ( dt  0) , the next level will be checked (Line 3 to Data source

Line 4). The algorithm only considers the terms that are not Fig. 5. Saving percentage with CSP 2 resources.
longer than the residue accounting period. At the same time,
Saving percentage(%)

W/BLP
the on-demand instance cost of past resource provision is 3LTPD
calculated since it can indicate the regular pattern of the Online

future demands (Line 6). Based on the comparison of the


past on-demand instance cost and the reserved instance cost,
the longest term that is economical is chosen to reserve (Line
8). Otherwise, the on-demand instance is used (Line 10).

Data source
IV. EXPERIMENTAL EVALUATION
Fig. 6. Saving percentage with more reserved instance terms.
We use Parallel Workloads Archive [12] to evaluate the
effectiveness of the online algorithm. A, B, C and D are used Fig. 5 supposes only the terms of CSP 2 are used and Fig.
to indicate the four data sources, respectively. The prices and 6 supposes that all the terms of CSP 1 and CSP 2 are vailable.
terms of CSPs are also the same as that in paper [10]. Both of the two figures illustrate the same phenomenon as
The simulation environment is set up in a Java platform. that of Fig. 4. It is due to that the proposed online algorithm
The platform is running on a PC (Lenovo Think Centre utilizes the historical resource provision information to
M4350t-N020, Intel(R) Core(TM) i5-3470 CPU @ 3.20GHz, facilitate the decision about which kind of instance should be
8G RAM). selected. So a more economical reservation policy is adopted.
on average, 8.58%, 13.86% and 14.42% resource cost are
Two other schemes are used to evaluate the effectiveness saved when the terms of CSP 1, CSP 2 as well as both of
of the proposed algorithm. One is 3LTPD [10]. Another one them are used, respectively.
is an instinctive heuristic. Each time the broker will select the
longest reserved instance term to meet the aggregated
Saving percentage(%)

CSP1
demand. It lies in that the longest instance is the cheapest. It 20% CSP2
is named as the longest preference scheme (abbreviated as CSP1&CSP2
W/B LP).
10%
To calculate the saving percentage, it is supposed that all
demand is served by on-demand instances (abbreviated as
N/B OnD). The cost of N/B OnD is used as the baseline. 0
A B C D
Data source
Herein demand dt arrives at time t and there is no future
information about dt+1. Because N/B OnD uses the current Fig. 7. Saving percentage comparison.

12
Generally, in Fig. 7, note that the saving percentages on Foundation of China under Grant No. 61672195 and No.
data B and D are smaller than that on data A and C. This is 61732022.
because that data C and D are more fluctuant [10]. The
request fluctuation impairs the forecast based on historical REFERENCES
information, and hence the accuracy of the decision.
[1] Microsoft, Microsoftvmpricing, http://azure.microsoft.com/zh-cn/
Fig. 7 also reveals that more cost can be saved when pricing/details/virtual-machines/#Linux.
more candidate reserved instance terms are available. i.e., [2] Amazon, Amazonvmpricing, http://aws.amazon.com/ec2/pricing/.
when both of the terms of CSP 1 and CSP 2 are available, [3] VMVare, Vmvarepricing, http://vcloud.vmware.com/service-
most cost can be reduced because more suitable instances offering/pricing-calculator/subscription.
terms can be reserved. [4] Fowley F, Pahl C, Zhang L. A comparison framework and review of
service brokerage solutions for cloud architectures[C]//International
Conference on Service Oriented Computing. Springer, Cham, 2013:
V. CONCLUSIONS AND FUTURE WORK 137-149.
Considering the multiple reserved instance terms, An [5] Jyoti A, Shrimali M. Dynamic provisioning of resources based on
load balancing and service broker policy in cloud computing[J].
online algorithm is presented to address the dynamic Cluster Computing, 1-19.
resource procurement problem for a broker. It is [6] Baker T, Aldawsari B, Asim M, et al. Cloud-SEnergy: A bin-packing
demonstrated that it can save a great monetary cost for the based multi-cloud service broker for energy efficient composition and
broker by only considering the historical resource provision execution of data-intensive applications[J]. Sustainable Computing:
records. informatics and systems, 2018, 19: 242-252.
[7] Heilig L, Lalla-Ruiz E, Voß S. A cloud brokerage approach for
Our future work aims to exploit resources considering the solving the resource management problem in multi-cloud
virtual migration cost, including time payload and stability. environments[J]. Computers & Industrial Engineering, 2016, 95: 16-
Two factors should be taken into account. One is the policy 26.
about how to deliver better services to enterprise users. [8] Wang W, Niu D, Li B, et al. Dynamic cloud resource reservation via
Comparing to small users, demand modes of large enterprise cloud brokerage[C]//2013 IEEE 33rd International Conference on
Distributed Computing Systems. IEEE, 2013: 400-409.
users are more stable and scalable. Though we can still use
[9] Wang W, Niu D, Liang B, et al. Dynamic cloud resource reservation
the aforementioned schemes, a specific one which considers via iaas cloud brokerage[J]. IEEE Trans. Parallel Distrib. Syst. PP,
the demand pattern so that it is with lower price, provides 2014, 99:1-12.
more flexible usage pattern and guarantees high availability [10] Zhang J, Chen S, Huang H, et al. Dynamic resource provision for
is an attractive direction. Another is to explore how to unify cloud broker with multiple reserved instance terms[C]//International
the demand uncertainty with the algorithm. Conference on Algorithms and Architectures for Parallel Processing.
Springer, Cham, 2015: 339-356.
[11] Fleischer R. On the Bahncard problem[J]. Theoretical Computer
ACKNOWLEDGMENT Science, 2001, 268(1): 161-174.
This work is financially supported by National Key R&D [12] Feitelson D G, Tsafrir D, Krakov D. Experience with using the
Program of China under Grant No. 2017YFB0803002, parallel workloads archive[J]. Journal of Parallel and Distributed
Computing, 2014, 74(10): 2967-2982.
Science and Technology Development Plan Program of Jilin
Province (20170307002GX), National Natural Science

13

You might also like