revised manuscript prepared by han zhao june 2015 1

16
REVISED MANUSCRIPT PREPARED BY HAN ZHAO JUNE 2015 1 Exploring Fine-Grained Resource Rental Planning in Cloud Computing Han Zhao, Member, IEEE, Miao Pan, Member, IEEE, Xinxin Liu, Member, IEEE, Xiaolin Li, Member, IEEE, and Yuguang Fang, Fellow, IEEE Abstract—Application services based on cloud computing infrastructure are proliferating over the Internet. In this paper, we investigate the problem of how to minimize cloud resource rental cost associated with hosting such cloud-based application services, while meeting the projected service demand. This problem arises when applications generate high volume of data that incurs significant cost on storage and transfer. As a result, an Application Service Provider (ASP) needs to carefully evaluate various resource rental options before finalizing the application deployment. We choose Amazon EC2 marketplace as a case of study, and analyze the economical trade-off for on-demand resource rental strategies. Given fixed resource pricing, we first develop a deterministic model, using a mixed integer linear program, to facilitate resource rental decision making. Evaluation results show that our planning optimization model reduces resource rental cost by as much as 50% compared with a baseline strategy. Next, we further investigate planning solutions to resource market featuring time-varying pricing (Amazon Spot Instance Market). We perform time-series analysis over the spot price trace and examine its predictability using Auto-Regressive Integrated Moving-Average (ARIMA). We also develop a stochastic planning model based on multistage recourse. By comparing these two approaches, we discover that spot price forecasting does not provide our planning model with a crystal ball due to the weak correlation of past and future price, and the stochastic planning model better hedges against resource pricing uncertainty than resource rental planning using forecast prices. Index Terms—Cloud Computing, Amazon EC2, Resource Rental Planning, Linear Programming, Stochastic Optimization 1 I NTRODUCTION With the rapid progress of computing, storage, and net- working technologies, distributed computing paradigms have undergone profound changes in the past decade. In particular, the emerging cloud computing model, with its virtually infinite resources and elasticity, liberates organizations from the expensive infrastructure invest- ment. As a result, more and more Application Service Providers (ASPs) recognize the separation between the actual application and the infrastructure necessary to run it, and begin to deploy applications on resources rented from infrastructure providers. For example, Foursquare uses Amazon EC2 to perform analytics across more than 5 million daily checkins, and saves 53% in costs while maintaining scalability needs [1]. According to a recent Han Zhao and Xinxin Liu were with the Department of Computer & Information Science & Engineering, University of Florida, E405 CSE Building, Gainesville, FL, 32611. Email: {han,xinxin}@cise.ufl.edu Miao Pan is with the Department of Computer Science, Texas Southern University, 122 Nabrit Science Center, Houston, TX, 77004. Email: [email protected] Xiaolin Li and Yuguang Fang are with the Department of Electrical and Computer Engineering, University of Florida, 216 Larsen Hall, Gainesville, FL, 32611. Email: {andyli,fang}@ece.ufl.edu The work presented in this paper is supported in part by National Sci- ence Foundation (grants ACI 1245880, ACI 1229576, CCF-1128805, OCI- 0904938, and CNS-0709329). The work of Y. Fang was partially supported by National Science Foundation under grant CNS-1343356. forecast by Gartner, Software-as-a-Service and Cloud- based business application services will grow from $13.4 billion in 2011 to $32.2 billion in 2016 [2]. By adopting cloud computing, a major issue faced by the ASPs is how to minimize the resource rental cost while meeting their application service demand. Significant research efforts have been directed to- ward developing optimal resource provisioning schemes to meet service requirements (avoid the cost due to over-provisioning and the penalty due to under- provisioning) [3]–[5]. These works, although offer ef- fective resource provisioning controls in response with varying workload, are still coarse-grained in terms of exploring application elasticity with regard to different resource pricing options. We believe that a fine-grained resource rental planning scheme is needed to further reduce ASPs’ operational cost. Specifically, this paper proposes a fine-grained control scheme to regulate the rental activities on a time-slotted basis, exploring hourly charging rate of various types of resources, in order to meet the projected service demand and minimize resource rental cost at the same time. Complementary to prior resource scaling solutions, this work opens up tremendous new research opportunities, coined as application scaling, aimed to develop the most economic resource rental plan without compromising the service- level agreement. Yet another obstacle lies in the uncertainty of com- putational resource pricing. This challenge is encoun- tered in the spot resource market emerged in recent years. On a spot resource market, depending on the This is the author's version of an article that has been published in this journal. Changes were made to this version by the publisher prior to publication. The final version of record is available at http://dx.doi.org/10.1109/TCC.2015.2464799 Copyright (c) 2015 IEEE. Personal use is permitted. For any other purposes, permission must be obtained from the IEEE by emailing [email protected].

Upload: others

Post on 06-May-2022

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: REVISED MANUSCRIPT PREPARED BY HAN ZHAO JUNE 2015 1

REVISED MANUSCRIPT PREPARED BY HAN ZHAO JUNE 2015 1

Exploring Fine-Grained Resource RentalPlanning in Cloud Computing

Han Zhao, Member, IEEE, Miao Pan, Member, IEEE, Xinxin Liu, Member, IEEE,

Xiaolin Li, Member, IEEE, and Yuguang Fang, Fellow, IEEE

Abstract—Application services based on cloud computing infrastructure are proliferating over the Internet. In this paper, we investigate

the problem of how to minimize cloud resource rental cost associated with hosting such cloud-based application services, while meeting

the projected service demand. This problem arises when applications generate high volume of data that incurs significant cost on

storage and transfer. As a result, an Application Service Provider (ASP) needs to carefully evaluate various resource rental options

before finalizing the application deployment. We choose Amazon EC2 marketplace as a case of study, and analyze the economical

trade-off for on-demand resource rental strategies. Given fixed resource pricing, we first develop a deterministic model, using a mixed

integer linear program, to facilitate resource rental decision making. Evaluation results show that our planning optimization model

reduces resource rental cost by as much as 50% compared with a baseline strategy. Next, we further investigate planning solutions to

resource market featuring time-varying pricing (Amazon Spot Instance Market). We perform time-series analysis over the spot price

trace and examine its predictability using Auto-Regressive Integrated Moving-Average (ARIMA). We also develop a stochastic planning

model based on multistage recourse. By comparing these two approaches, we discover that spot price forecasting does not provide

our planning model with a crystal ball due to the weak correlation of past and future price, and the stochastic planning model better

hedges against resource pricing uncertainty than resource rental planning using forecast prices.

Index Terms—Cloud Computing, Amazon EC2, Resource Rental Planning, Linear Programming, Stochastic Optimization

1 INTRODUCTION

With the rapid progress of computing, storage, and net-working technologies, distributed computing paradigmshave undergone profound changes in the past decade. Inparticular, the emerging cloud computing model, withits virtually infinite resources and elasticity, liberatesorganizations from the expensive infrastructure invest-ment. As a result, more and more Application ServiceProviders (ASPs) recognize the separation between theactual application and the infrastructure necessary to runit, and begin to deploy applications on resources rentedfrom infrastructure providers. For example, Foursquareuses Amazon EC2 to perform analytics across more than5 million daily checkins, and saves 53% in costs whilemaintaining scalability needs [1]. According to a recent

• Han Zhao and Xinxin Liu were with the Department of Computer &Information Science & Engineering, University of Florida, E405 CSEBuilding, Gainesville, FL, 32611.Email: han,[email protected]

• Miao Pan is with the Department of Computer Science, Texas SouthernUniversity, 122 Nabrit Science Center, Houston, TX, 77004.Email: [email protected]

• Xiaolin Li and Yuguang Fang are with the Department of Electricaland Computer Engineering, University of Florida, 216 Larsen Hall,Gainesville, FL, 32611.Email: andyli,[email protected]

The work presented in this paper is supported in part by National Sci-ence Foundation (grants ACI 1245880, ACI 1229576, CCF-1128805, OCI-0904938, and CNS-0709329).The work of Y. Fang was partially supported by National Science Foundationunder grant CNS-1343356.

forecast by Gartner, Software-as-a-Service and Cloud-based business application services will grow from $13.4billion in 2011 to $32.2 billion in 2016 [2].

By adopting cloud computing, a major issue facedby the ASPs is how to minimize the resource rentalcost while meeting their application service demand.Significant research efforts have been directed to-ward developing optimal resource provisioning schemesto meet service requirements (avoid the cost dueto over-provisioning and the penalty due to under-provisioning) [3]–[5]. These works, although offer ef-fective resource provisioning controls in response withvarying workload, are still coarse-grained in terms ofexploring application elasticity with regard to differentresource pricing options. We believe that a fine-grainedresource rental planning scheme is needed to furtherreduce ASPs’ operational cost. Specifically, this paperproposes a fine-grained control scheme to regulate therental activities on a time-slotted basis, exploring hourlycharging rate of various types of resources, in orderto meet the projected service demand and minimizeresource rental cost at the same time. Complementaryto prior resource scaling solutions, this work opensup tremendous new research opportunities, coined asapplication scaling, aimed to develop the most economicresource rental plan without compromising the service-level agreement.

Yet another obstacle lies in the uncertainty of com-putational resource pricing. This challenge is encoun-tered in the spot resource market emerged in recentyears. On a spot resource market, depending on the

This is the author's version of an article that has been published in this journal. Changes were made to this version by the publisher prior to publication.The final version of record is available at http://dx.doi.org/10.1109/TCC.2015.2464799

Copyright (c) 2015 IEEE. Personal use is permitted. For any other purposes, permission must be obtained from the IEEE by emailing [email protected].

Page 2: REVISED MANUSCRIPT PREPARED BY HAN ZHAO JUNE 2015 1

REVISED MANUSCRIPT PREPARED BY HAN ZHAO JUNE 2015 2

resource supply and demand level, the unit price of acomputational instance is fluctuating all the time. Forexample, in December 2009, Amazon launched its spotinstance service and implemented an auction mechanismto determine instance pricing, as auctions are effectivemechanisms to achieve economically efficient resourceallocations and the maximized revenue of the cloudprovider [6]–[8]. Since spot instances leverage idle cy-cles from the regular on-demand server pool, they areauctioned off at a price much lower than that of theregular on-demand instance most of the time. As a result,this real-time bidding market has attracted many ASPswho wish to increase server capacity at low cost, andthere is a growing research interest in utilizing spotinstance service. However, modeling and analyzing spotinstance pricing is largely neglected due to the lackof information. We believe that our study is helpfulto understand spot pricing, and more importantly, toimprove resource utilization under spot pricing.

In this paper, we first develop a fine-grained optimalresource rental planning model for elastic applicationscaling in a cloud resource market. In particular, givena forecasted demand schedule, the ASP needs to peri-odically review the running progress of the deployedservice and make optimal job allocation as well as re-source rental decisions so as not to waste money onexcessive computation, storage or data transfer. Ourfirst contribution is the formulation of a deterministicplanning model that approximates resource rental deci-sion making process over certain planning horizon. Thesolution to this model serves as a guide to make cost-efficient resource rental decisions in real time. We showthat our planning model is especially useful for high-cost Virtual Machine (VM) classes. This is because costsaving from our model primarily comes from eliminat-ing unnecessary job running by decreasing VM rentalfrequency. From this perspective, our model formulationis aligned with the dynamic lot-sizing model commonlyencountered in the field of production planning.

The second contribution of this paper is that weanalyze and solve the fine-grained cloud resource rentalplanning problem under the pricing uncertainty chal-lenge. In particular, two possible solutions are jointlyexplored in this paper. We systematically analyze thepredictability of Amazon EC2 spot pricing and show thatprediction cannot provide adequate approximation to beused in deterministic planning model. For the purpose ofcomparison, we propose a multistage resource model forstochastic resource rental planning. This model decom-poses the stochastic process of decision making undervarying price into sequential decision making processeswith the aid of price distribution at various stages. Assuch, the stochastic optimization problem is transformedinto a large-scale deterministic optimization problem.We further present a polynomial-time solution to theproblem. Through simulations, we have shown that thestochastic planning approach is more cost-efficient thanpredictive planning.

In summary, the key contributions of this paper arelisted as follows:

• A fine-grained planning approach for cost-efficientresource rental in cloud resource market.

• A MILP formulation for determining the optimalresource rental over a fixed planning horizon.

• A systematic time-series analysis of the predictabil-ity of spot pricing using real price traces of Ama-zon’s spot instance service.

• A stochastic optimization solution to deal with spotprice uncertainty in resource rental planning.

The rest of the paper is organized as follows. Section 2surveys the related work. In Section 3, we present thesystem model, provide a deterministic planning modelfor the problem, give out an optimal solution, andevaluate the performance of the deterministic pricingresource planning approach. In Section 4, we analyze thepredictability of Amazon EC2 spot pricing using time-series analysis techniques, propose a stochastic optimiza-tion model to solve the rental planning problem, andperform simulations to evaluate the performance of oursolution. We highlight some interesting issues for furtherdiscussion in Section 5 and finally, conclude this paperin Section 6.

2 RELATED WORK

Nowadays, a wide variety of computational and data in-tensive applications utilize cloud to their benefit. There-fore, it becomes imperative to understand the cost-benefit of running resource-demanding applications incloud in order to make cost-efficient resource rentaldecisions. Compared with running applications on con-ventional platforms such as grid, cloud eliminates up-front setup and operational cost for distributed re-sources. However, moving and storing large data set incloud incur significant cost comparable to the computingcost [9]. Tremendous research efforts have been made tomitigate such cost in cloud. In this paper, we present aplanning model that optimizes resource usage for elasticapplications with comprehensive cost considerations.

Finding an optimal resource utilization strategy ischallenging for both cloud infrastructure providers andapplication service providers. Many studies [10]–[12]attempted to reduce the operational cost and maxi-mize leasing revenue from the perspective of the cloudinfrastructure provider. However, the general problemof minimizing resource allocation cost while meetingjob demand is NP-hard [13]. This paper approachescost optimization from the angle of application serviceproviders and proposes solutions to take most advantageof the infrastructure resources by planning ahead.

As computational resources become tradable in cloud,recent works [14]–[16] were geared towards developingnovel trading strategies based on information acquiredfrom the market. Amongst all the emerging cloud re-source markets, Amazon EC2 is the most representativeexample which attracts significant research attentions.

This is the author's version of an article that has been published in this journal. Changes were made to this version by the publisher prior to publication.The final version of record is available at http://dx.doi.org/10.1109/TCC.2015.2464799

Copyright (c) 2015 IEEE. Personal use is permitted. For any other purposes, permission must be obtained from the IEEE by emailing [email protected].

Page 3: REVISED MANUSCRIPT PREPARED BY HAN ZHAO JUNE 2015 1

REVISED MANUSCRIPT PREPARED BY HAN ZHAO JUNE 2015 3

For instance, researchers have proposed ideas to allocateresources via brokerage services [17], or take advantageof the low price offered by reserved instances to savecost [18], [19]. With regard to the spot instance market,many works [20]–[22] proposed solutions to achieveresource availability guarantee using statistical analy-sis. Notably, Ben-Yehuda et al. [21] reverse engineeredspot prices by constructing a spare capacity pricingmodel based on existing price traces. Javadi et al. [22]conducted a comprehensive analysis of spot instancesbased on one year price history in EC2, and proposeda statistical model to capture the dynamics for pricevariation in hour-in-day and day-of-week. This paperfocuses on analysis of on-demand and spot resourcemarket. The proposed solution targets at the generalcloud market and takes EC2 as a case of study. Ourwork takes one step further from the prior art by pre-senting a fine-grained planning control model basedon the forecast demand. The optimization models takefull consideration of various resource types and theirassociated costs within a cloud resource market, andinvestigate the optimal tradeoff point in resource rentalallocation.

In this paper, the cost optimization model applies tosome cloud market where price is market-driven andusers bid according to their true valuations (simple-minded assumption). The most relevant works to thispaper are presented in [23] and [24]. In [23], the authorspresented an optimal VM placement algorithm that min-imizes the cost of resource provisioning in a multiplecloud providers environment, and in [24], the authorsproposed a profit-aware dynamic bidding algorithm tooptimize ASP’s profits in EC2 spot market. Our work’sapplication scenario is different from [23], and we de-velop our model based on realistic application and pricetraces. Comparing with [24], our approach presents adifferent model that takes storage and network transfercost into account in addition to computational instancebidding. Finally, in a recent study conducted by Xu andLi [25], the authors investigated Amazon EC2 pricing,and developed a revenue management framework tomaximize revenue for the cloud provider. Comparedto their work, this paper targets at maximizing costeffectiveness for the ASPs and has different problemformulation.

3 FINE-GRAINED RESOURCE RENTAL PLAN-NING FOR ON-DEMAND RESOURCE MARKET

Resource rental planning entails the acquisition andallocation of computational and storage resources toapplications so as to satisfy demand over a specifiedtime horizon. A fine-grained control scheme is proposedto optimize rental decision on a time slotted basis. Inthis section, we present the system model, formulate thefine-grained rental planning problem in the context ofthis model, and examine solutions to solve the problem.

3.1 System Model

We consider the scenario where an ASP offers somecomputational and data intensive application services(example services are data visualization, data analytics,data indexing, etc...) to customers over a network. In-stead of using local resources, the tasks of computa-tion and data storage are completely outsourced to ashared resource pool operated by some Infrastructure-as-a-Service (IaaS) provider(s), as shown in Figure 1.The depicted system model resembles a broad rangeof practical examples in today’s cloud-based servicemarket. For instance, the ASP could be mapped to someSoftware-as-a-Service provider who offers routine dataanalytics to its customer firms, or some academic insti-tution who provides scientific data visualization servicesto the general public.

Customer

Service Broker

IaaSProvider

VM VM VM

Cloud Storage

Cloud Storage

Cloud Storage

Network

Transfer-in Cost

Local DataServer Network

Transfer-out Cost

Storage

Cost

Computational

Cost

Rent

Lease

Service

Cloud Resource

Market

I/O Cost

Fig. 1. System model for cloud-based resource rental planningproblem

As illustrated in Figure 1, resource usage incurs mone-tary cost to the ASP in various forms. Rental activities arecharged throughout the life cycle of the deployed serviceas follows. First, input data necessary to run the programis imported into the cloud from the local storage media,introducing network transfer-in cost. Next, a number ofVM instances are launched to perform data processingtasks. Each of them costs certain amount of moneydepending on both VM unit price and rental duration.After the computational jobs are completed, results andlogs are saved to cloud storage, and may be dumpedinto local persistent storage later. Many often the datasize is large (e.g., images or videos) and incurs signifi-cant storage and network transfer-out cost for the ASP.The storage cost may also apply to input data alreadyfetched into the cloud but not processed yet. Finally, highperformance applications often feature tremendous I/Orequirements and some resource provider will charge forI/O activities. When performing resource rental plan-ning, an ASP needs to consider all costs described abovein order to understand the cost-benefit ratio of possiblechoices.

This is the author's version of an article that has been published in this journal. Changes were made to this version by the publisher prior to publication.The final version of record is available at http://dx.doi.org/10.1109/TCC.2015.2464799

Copyright (c) 2015 IEEE. Personal use is permitted. For any other purposes, permission must be obtained from the IEEE by emailing [email protected].

Page 4: REVISED MANUSCRIPT PREPARED BY HAN ZHAO JUNE 2015 1

REVISED MANUSCRIPT PREPARED BY HAN ZHAO JUNE 2015 4

3.2 Motivation for Fine-Grained Resource Rental

Planning

Resource management in cloud entails multiple levelsof scheduling. At a higher level, the ASP needs todecide how many resources to allocate to meet servicedemand (auto scaling). Essentially, auto resource scalingapproaches are grouped into two categories, proactiveand reactive. Proactive scaling, due to its preventive na-ture, gains popularity for tight QoS control. As a predic-tive resource scaling schedule is established, what’s oftenoverlooked is that the ASP can reorganize the usageprofile of various types of resources in the predictivehorizon to save costs associated with resource rental ac-tivities. Such fine-grained resource rental planning stemsfrom the observation that certain types of applicationscan leverage multiple types of cloud resources to provideservices. For example, some image recognition servicesneed to serve user requests in real time, but can lever-age pre-processed image processing results fetched fromcloud storage to meet current or future service requests.

In this paper, we assume the forecasted demandschedule is established and attempt to build a costmodel to analyze the optimal strategy of resource rentalactivities in a time slotted fashion. Once the ASP createsa clear rental plan over the planning horizon at this fine-grained level, the schedule of jobs1 is adjusted (throughjob addition, replication, migration or removal) to lineup with the resource rental plan. Suppose we alreadyknow the number of computational instances needed ateach decision point by solving the higher level schedul-ing problem, for each instance, we further investigateif we can leverage other types of cloud resources tobring down the rental cost. Therefore, we build our costoptimization model at per-VM level, rather than at thewhole resource group level. A motivating example isdemonstrated in Figure 2. We plot an example demandforecast for a single VM instance. The top dash linerepresents the VM’s maximum load handling capacity.If the VM strictly follows a job processing schedulein accordance with the forecast workload pattern (redsteps), computing cycles are wasted. For example, theASP pays full rent for the VM between 2pm and 3pm,but does not fully utilize the server’s computing ca-pability shown in the shaded area. In this paper, wepropose to let the ASP “consolidate” future computingjobs in current rental slot, given that transfer and stor-age cost less. Our approach introduces operational andmanagement science techniques into cloud computingand achieves better cost-effectiveness compared to on-demand resource provisioning.

3.3 Optimization Planning Model for DeterministicInstance Pricing

The first resource rental planning model targets at an on-demand resource market where each VM costs a fixed

1. Here “job” refers to the general concept of computational tasks.

11am 12am 1pm 2pm 3pm 4pm 5pm 6pm 7pm

Wo

rklo

ad

Time

Load Capacity

Wasted Computing

Fig. 2. Example forecasted demand schedule for a VM in-stance.

amount of money. Each VM belongs to a specific VMtype specifying the hardware configuration. We assumethe applications are elastic and composed of jobs easy toscale gracefully and automatically. For example, appli-cations processing Bags-of-Tasks (no job dependencies).Similar to [26], we are interested in self-aware solutionsthat can plan resource usage of cloud applications undervarious pricing. The planning horizon T is divided intofixed time slots t = 1, ..., T . We refer to the start of eachtime slot as a decision point. At each decision point, arental operation is performed to access the most cost-effective resource available for the application.

Let T be the set of decision points. The goal ofresource rental planning is to minimize the total rentalcost associated with processing the forecast workloadover the planning horizon T . In order to accomplish thisgoal, three sets of variables are introduced to representthe rental decisions to be made at each decision point.The first set of variables, αi,t, denotes the amount of datato be processed by the application during time slot ton a type-i VM. Next, at the end of slot t, we use βi,t

to represent the desired storage space for holding thedata. Finally, let binary decision variables χt denote ifpowering on a type-i VM is needed at time slot t. αi,t

and χi,t specify how to make use of the computationalresources to control the application progress, while βi,t

determines the amount of storage resources to reserve ina cloud market. If all these variables are determined, acontrol policy is formed to guide the rental activities inthe cloud market for optimal resource utilization.

A number of cost parameters are associated with ourresource rental optimization problem. Specifically, therental cost (processing cost) for type-i VM in time slot tis Cp(i, t), and the storage rental cost per data unit forslot t is Cs(t). As presented earlier in Section 3.1, manyIaaS providers charge nontrivial cost for data transferacross the cloud boundary. For each time slot t, let Cio(t)be the I/O cost for data transfer from and to the cloudstorage, and let C+

f (t) and C−f be the cost for transferring

into and out of the cloud, respectively. In this paper, weassume a real-time service model that demand needs

This is the author's version of an article that has been published in this journal. Changes were made to this version by the publisher prior to publication.The final version of record is available at http://dx.doi.org/10.1109/TCC.2015.2464799

Copyright (c) 2015 IEEE. Personal use is permitted. For any other purposes, permission must be obtained from the IEEE by emailing [email protected].

Page 5: REVISED MANUSCRIPT PREPARED BY HAN ZHAO JUNE 2015 1

REVISED MANUSCRIPT PREPARED BY HAN ZHAO JUNE 2015 5

to be satisfied before the end of each decision point.We represent the customer’s demand function as D(·),where D(i, t) denotes the forecast workload demandprofile (in this paper defined as the output data amountsent to customers) for a type-i VM in slot t.

For readers’ reference, we summarize the notationused throughout the paper in Table 1.

TABLE 1Notation Box

Variables

αi,toutput data size generated by one

type-i VM in time slot t

βi,tstorage space for data produced byone type-i VM at the end of slot t

χi,tbinary decision variable representing rental decision

of one type-i VM in time slot t

Parameters

T Set of time slotsI Set of VM types

Cp(i, t) VM rental cost (per type-i VM · slot duration)Cs(t) Storage cost (per data unit · slot duration)Cio(t) I/O operation cost (per data unit · slot duration)

C+

f(t) Network transfer-in cost (per data unit · slot duration)

C−

f(t) Network transfer-out cost (per data unit · slot duration)

D(i, t)Demand to be satisfied for one type-i

VM at the end of slot t

P(i)Average bottleneck resource consumption rate (per data unit

generated) for one type-i VM

Q(i, t)Bottleneck resource available for one type-i

VM in time slot t

ΦiAverage output-to-input ratio for one

type-i VM (application specific)

With all the prerequisites, we formulate the rentalpayment function following a linear cost model. Morespecifically, the rental cost is linearly proportional to theconsumed resource amount as well as to the durationof the rental period. Naturally, our objective functionaims at minimizing the rental cost for each type-i VMover the entire planning horizon T (we minimize thecost at per-VM level, as explained in Section 3.2). Ateach decision point, a fixed rental cost Cp(i, t) is chargedif the ASP decides to rent one type-i VM (χi,t = 1).Now, given the presence of this computational resourcecost, the ASP may choose to make full use of the VMcapacity so as to meet the forecast workload demandover a number of future time slots. However, doing sowill increase the storage and I/O cost as more workloadis processed earlier in time. As such, the planning prob-lem arises as the ASP needs to carefully trade off thecomputational rental cost versus storage and data mi-gration costs. In production planning, similar problemsare recognized as the dynamic lot-sizing problem. Thesolution to the dynamic lot-sizing problem determinesthe optimal frequency of setups so as to minimize thetotal cost within the resource and demand constraints.In the context of cloud computing, we formulate theplanning problem under fixed resource pricing as theDeterministic Resource Rental Planning (DRRP) prob-lem. DRRP models cloud resource rental on a per-VMbasis, forming a fine-grained control policy for rentalplanning. The complete model formulation is describedin function (1) to (7).

Note that the objective function does not take I/O andstorage cost for input data into account. This is becausewe assume that input data is brought into cloud on thefly to complete the computational jobs. Another optionis to copy all input data once and store them in cloudthroughout the entire planning horizon. The decision onwhich option is better depends on the data access patternand the duration of planning horizon. In this paper, wesimply assume that input data is “transfer-on-demand”to simplify the presentation. In addition, the formulationroughly models the expected average performance ofeach VM type. In reality, the performance heterogeneityexists within the same VM type [27], [28]. However, wefocus on cost analysis in this paper and will not includethis factor into our formulation.

min∑

t∈T

(C+f (t) · Φi · αi,t + (Cs(t) + Cio(t))

· βi,t + C−f (t) ·D(i, t) + Cp(i, t) · χi,t) (1)

s.t.

βi,t−1 + αi,t − βi,t = D(i, t), i ∈ I, t ∈ T (2)

P(i) · αi,t ≤ Q(i, t), i ∈ I, t ∈ T (3)

αi,t ≤ B · χi,t, i ∈ I, t ∈ T (4)

βi,0 = ε, i ∈ I (5)

αi,t, βi,t ∈ R+, i ∈ I, t ∈ T (6)

χi,t ∈ 0, 1, i ∈ I, t ∈ T (7)

Constraint (2) is analogous to the inventory balanceconstraint in the dynamic lot-sizing problem. It simplyspecifies that workload demand should be met at anytime slot. At slot t, the data stored at the previoustime slot βi,t−1, and the data generated in the currentslot αi,t, are combined together to serve the forecasteddemand profile emerged in the current time slot, i.e.,βi,t−1 + αi,t ≥ D(i, t). The overprovisioning amountbecomes the storage amount βi,t at the end of t. Theinitial storage space is set to be some constant ε inconstraint (5), depending on the specific planning sce-nario. Next, let P(i) be the average bottleneck resourceconsumption rate for one type-i VM, and let Q(i, t)denote the bottleneck resource available for one type-i VM in t, constraint (3) ensures that the workloadprocessing rate does not saturate the available bottleneckresource.

Constraint (4) is often referred to as the forcing con-straint. It states that there will be no data generated in t ifno rental decision is made (χi,t = 0). B is set to be a verylarge constant that exceeds the maximum possible valueof αi,t. Finally, constraints (6) and (7) specify domainsof the variables. Note that each VM might not be fullyutilized during a time slot, as VM boot-up time is non-trivial according to some recent study [29]. Accordingto the DRRP formulation, this could affect the setupof Q(i, t). Moreover, depending on the effective lengthof t, the optimal solution is subject to change given

This is the author's version of an article that has been published in this journal. Changes were made to this version by the publisher prior to publication.The final version of record is available at http://dx.doi.org/10.1109/TCC.2015.2464799

Copyright (c) 2015 IEEE. Personal use is permitted. For any other purposes, permission must be obtained from the IEEE by emailing [email protected].

Page 6: REVISED MANUSCRIPT PREPARED BY HAN ZHAO JUNE 2015 1

REVISED MANUSCRIPT PREPARED BY HAN ZHAO JUNE 2015 6

the fixed service demand constraint (Constraint (2)). Forsimplicity, we assume boot-up time is not counted fordefining an effective charging period.

3.4 Solution to Deterministic Pricing Resource

Rental Planning

In this section, we briefly demonstrate the techniqueswhich find an optimal plan for objective function (1) sub-ject to constraints (2) to (7). The formulation is a MixedInteger Linear Program (MILP) that is NP-complete ingeneral. When considering only the production variableαi,t and the inventory variable βi,t, the problem canbe solved by translating the original problem to theminimum cost flow problem [30]. We show the trans-formation to flow network in Figure 3.

0

1 2 3 T

∑=

T

t

tiD

1

),(

)1,(iD− )2,(iD− ),( TiD−

1,iα

2,iα 3,i

αTi ,α

1,iβ

2,iβ

)3,(iD−

Production Arc

Inventory Carry Arc

Fig. 3. Flow network of the deterministic pricing resource rentalplanning problem

As shown in Figure 3, the network has T +1 vertices.Vertex 0 is the “source” of all data generation, and ishereafter referred to as the source node. The t-th vertex(t = 1, ..., T ) represents the t-th planning time slot. Thesevertices are referred to as sink nodes. Directed edges arecategorized into two types. Those connecting the sourcenode with sink nodes are labeled as the productionarcs, and those connecting two successive sink nodes arelabelled as the inventory carry arcs. We also assign thesupply value of

∑Tt=1 D(i, t) to the source node, and the

demand value of −D(i, t) to each sink node t = 1, ..., T .By establishing this flow network, the inventory balanceconstraint (2) is translated to the flow balance constraintin the minimum cost flow problem. The resource con-straint (3) is enforced by imposing capacities on theproduction and inventory carry arcs in each period.

When the binary variable χi,t and the forcing con-straint (4) are included, we can solve the proposed MILPwith standard techniques such as the Branch-and-Boundalgorithm. We will briefly demonstrate how to use thegeneral Branch-and-Bound technique to solve DRRP asfollows.

The first step of the algorithm is to replace the con-straint that χi,t must be 0 or 1 by a weaker constraint,i.e., 0 < χi,t < 1 for t = 1...T . The formulation result is alinear relaxation of the original DRRP program, labeledas DRRP-LR. Let Z(P ) be the optimal value of somelinear program P . Apparently, the objective value of anyfeasible solution found, referred to as Z ′, defines theupper bound of the solution. Therefore, we have,

Z(DRRP-LR) <= Z(DRRP) <= Z ′.

The Branch-and-Bound algorithm uses divide-and-conquer principle and construct a search tree over thefeasible solution space. Since DRRP-LR is a linear pro-gram without integer constraints, we can easily solve itwith standard techniques. If it returns a feasible solution,we will use it to initialize the lower bound of Z(DRRP).Without loss of generality, we assume that the solutionto DRRP-LR is bounded, otherwise the correspondingDRRP is either unbounded or infeasible. We also initial-ize the current best solution to DRRP to this value.

If χi,t for all t = 1...T are integers, we obtain thebest solution already. Otherwise, for χi,t has a fractionalvalue, create two new subprograms (branching step),one in which χi,t = 1 and the other in which χi,t = 0.Now compute the optimal solution for each subprogram.This process is recursive, as the computation will beconducted on two disjoint sets created by new branchingvariables. When a new solution is calculated, we com-pare it with the current best solution. If it’s greater, thesolution is either upper bounded by the best solution sofar or infeasible, therefore no further branching is needed(bounding step), otherwise the value overwrites thecurrent best solution and remove the founded solutionfrom the variable domain. The process terminates whenthe remaining variable set becomes empty.

3.5 Evaluation of Deterministic Pricing Resource

Rental Planning

We consider three VM classes I = c1.medium,m1.large,m1.xlarge, and perform simulations to evaluatethe solution to DRRP based on realistic pricing andapplication-usage scenarios. The rental planning deci-sions are made hourly to align with Amazon’s chargingintervals, spanning over a daily planning horizon (24hours). Each hour corresponds to one time slot in DRRP.The MILP formulation is solved using the CPLEXTM [31]solver integrated in AIMMS 3.11 [32]. We sample thehourly data processing demand from a normal distribu-tion N (0.4, 0.2) (expressed in the unit of Gigabyte). It isassumed that the software required by the applicationservices has been configured on VM instances rentedfrom the cloud market. Therefore, we do not take theinitial environment preparation into account.

The cost parameters used in model formulations areset according to Amazon’s EC2 on-demand pricing pol-icy2. Specifically, the hourly on-demand VM rental costsare $0.2, $0.4, $0.8 for the three VM classes. Amongthe three VM classes, c1.medium is compute-optimizedwhile m1.large and m1.xlarge are general-purpose in-stance classes. We choose them as representative VMclasses to evaluate due to the following reasons: (1) to

2. Amazon has declared lower pricing for EC2 when we preparedthis manuscript. Since our simulation is based on [33], the studypresented here is by no means up-to-date, but serves as a representativecase of study.

This is the author's version of an article that has been published in this journal. Changes were made to this version by the publisher prior to publication.The final version of record is available at http://dx.doi.org/10.1109/TCC.2015.2464799

Copyright (c) 2015 IEEE. Personal use is permitted. For any other purposes, permission must be obtained from the IEEE by emailing [email protected].

Page 7: REVISED MANUSCRIPT PREPARED BY HAN ZHAO JUNE 2015 1

REVISED MANUSCRIPT PREPARED BY HAN ZHAO JUNE 2015 7

evaluate VM instances that differ in hardware capability;and (2) to evaluate if compute-optimized instance classhas an impact to the cost structure breakdown. UsingElastic Block Store (EBS), the storage cost is $0.1 perGB/month, and 0.1 per million I/O operations. Theinbound and outbound transfer cost is $0.1 and $0.17per GB. In order to provide realistic parameter estimatesin our proposed models, we refer to a recent paper [33]studying the cost and performance of running scien-tific workflow applications on Amazon EC2. Based onthe 3-year cost of a mosaic service (generated by anastronomical application Montage, see [34] for details)hosted on EC2, we normalize the I/O cost to $0.2 perGB, and set Φi to 0.5 for all i ∈ I. According tothe data provided in [33] (runtime, input and outputvolume, etc.), the VM instances are able to offer sufficientresources for serving the randomly generated demand.Therefore, constraint (3) in DRRP is omitted.

We first show the cost-saving advantage of our pro-posed solution over resource rental without planning.The results are shown at the upper side of Figure 4.In our simulation, per-VM costs over daily planninghorizon for both schemes are compared. From the re-sults, we can observe that cost derived from solvingDRRP is significantly lower than that of the no-planningsolution. As VM becomes more powerful, the cost re-duction becomes more significant. Especially, the costreduction for VM of class m1.xlarge achieves nearly50% drop off. This is because compared to the no-planning solution, the cost reduction primarily comesfrom the saving of computational cost (VMs are turnedoff in cloud when demand is forecasted and satisfiedby previously rented computational cycles). Therefore,more saving is expected for high-cost VM classes. Thecost structure for each VM class is presented in the lowerside of Figure 4. We observe that more money is spenton I/O and storage as VM becomes more powerful.This is because more powerful VM incurs higher VMrental cost each time the rental decision is made. As aresult, an ASP tends to rent VM less frequently to servethe customer demand. Another interesting observationis that c1.medium has similar compute cost percentagewith m1.xlarge. Although c1.medium is cheaper and ingeneral less powerful than m1.large, it has better compu-tational resources (5 Compute Units VS. 4 in m1.large).It is a clear evidence that for compute-optimized VMinstances, allocating more time for computation yieldsmore cost saving in general. Therefore, the relative capa-bility of the hardware components does have a positiveimpact to the optimal cost saving model.

Next, we investigate cost saving with regard to differ-ent planning horizons, and plot the results in Figure 5.In the first set of evaluations, we use the same demanddata and calculate the total cost for DRRP with the stepincrement of four hours. The results are then comparedagainst the cost without planning, and are summarizedwith labels “vm-class-24h” corresponding to the bottomx axis in Figure 5. Note that cost saving varies because it

0

5

10

15

20

22

c1.medium m1.large m1.xlarge

Dai

ly P

er-in

stan

ce C

ost No-Plan

DRRP

0

20

40

60

80

100

c1.medium m1.large m1.xlarge

Per

cent

age

of T

otal

Cos

t

%16

%33

%49

TransferI/O+Storage

Compute

Fig. 4. Cost comparison for DRRP and resource rentalwithout planning

is correlated with the demand input, therefore, we can-not draw the conclusion on the optimal planning horizonfrom this set of evaluations. However, we do know thatgiven the same demand input across the planning hori-zon, the effectiveness of DRRP is independent of specificVM classes as they exhibit the same trend across time. Inthe second set of evaluations, we generate demand witha new distribution, and create a “cyclic” input patternfor every 12 hours, i.e., the same input is used for every12 hours. The cost saving percentage is plotted withlabel “m1.xlarge-72h” corresponding to the top x axisin Figure 5. It might be tempting to increase planninghorizon for better cost efficiency. However, doing sowill not give ASPs a lot of gains, because we observethe cost saving is relatively stable across time. On theother side, increased planning horizon results in moreinaccuracy due to more variables in larger predictionwindow and increased computational overhead. ASPsshould select the optimal planning horizon based onthe most confident prediction window within acceptablecomputational overhead (for solving DRRP).

Finally, we conduct a sensitivity analysis to the solu-tion for DRRP and plot the results in Figure 6. We definecost ratio as the cost of rental planning based on DRRPto the cost of resource rental without planning. The baseratio (67%) is set to the cost ratio of VM class m1.largecalculated in the last simulation. From this base ratio,we first vary the weights of I/O and computational costgradually. In one direction, we keep the I/O cost fixedand increase the computational cost with a fixed stepof 0.1, and then we increase the I/O cost in the otherdirection similarly. The result showed in the left partof Figure 6 clearly demonstrate that the cost reductionachieved by solving DRRP becomes more salient forexpensive computational resources. This conclusion con-firms the analysis we previously provided. The impact

This is the author's version of an article that has been published in this journal. Changes were made to this version by the publisher prior to publication.The final version of record is available at http://dx.doi.org/10.1109/TCC.2015.2464799

Copyright (c) 2015 IEEE. Personal use is permitted. For any other purposes, permission must be obtained from the IEEE by emailing [email protected].

Page 8: REVISED MANUSCRIPT PREPARED BY HAN ZHAO JUNE 2015 1

REVISED MANUSCRIPT PREPARED BY HAN ZHAO JUNE 2015 8

0%

10%

20%

30%

40%

50%

4 8 12 16 20 24

12 24 36 48 60 72C

ost S

avin

g (P

erce

ntag

e)

Interval (24-hour)

Interval (72-hour)

c1.medium-24hm1.large-24h

m1.xlarge-24hm1.xlarge-72h

Fig. 5. DRRP: cost saving over time

of demand is investigated in the right part of Figure 6. Inparticular, we alter the mean of the demand distributionfrom 0.2 to 1.6 GB/hour. As more demand is generatedfor services, the computational resources tend to be keptbusy all the time because the current storage cannot meetthe demand. As a result, cost reduction is not noticeablefor heavy service demand.

0

0.2

0.4

0.6

0.8

1

Cos

t Rat

io

base ratio line

0

0.2

0.4

0.6

0.8

1

0.2 0.4 0.8 1.2 1.6

demand meanI/O CPU

Fig. 6. Sensitivity analysis for DRRP

4 DEALING WITH SPOT PRICING UNCER-TAINTY IN CLOUD

In this section, we extend the resource rental planningmodel by including cost uncertainty. Such uncertainty isintroduced by many IaaS providers who offer spot pric-ing option for idle computational resources. The pricefluctuation of spot resources over time creates time seriesdata for analysis. Using Amazon’s spot market as a caseof study, we take two routes to attack the resource rentalplanning problem with spot pricing uncertainty. First,we apply time series forecasting to spot price historycrawled from [35]. The prediction results are fed intoour deterministic planning model (hereafter labelled aspredictive planing). Next, we propose an alternative ap-proach that leverages the price distribution information

(hereafter labelled as stochastic planning). A dynamicprogramming algorithm is also presented to solve thestochastic optimization problem. We compare the twoapproaches in the end of this section, and conclude thatthe stochastic planning approach saves more cost thanthe predictive planning approach.

Before we proceed, a few assumptions need to beclarified. First, we assume that ASPs will bid truthfullyin the spot resource acquisition process. This assumptionis in line with the assumption made in [20]. With thisassumption, an ASP will not bid strategically. In fact,whether strategic bidding is helpful to achieve some de-sired level of resource availability is controversial. On theone hand, by exploiting prior price history, it is viable tooptimize bidding using probabilistic models for a singlebidder [36]. On the other hand, one should also considerbidding strategies of other bidders before making deci-sions. From a game theoretic perspective, intentionallyoverbidding or underbidding is not a dominant strategy(e.g., if every bidder overbids, the spot price increases,only benefiting the IaaS provider). Second, an out-of-bidevent occurs when an ASP’s bid price is lower than thespot price. If such an event happens, the ASP needs torent the desired number of VMs from the regular on-demand resource market in order to meet the demandrequirement.

4.1 Predictive Planning in Amazon Spot Market

4.1.1 Background

In this paper, we use Amazon’s spot instance market as acase of study for price prediction and cost optimization.Launched on December 2009, Amazon’s spot instancemarket offers a new way to purchase EC2 instances ina discount rate. It allows cloud customers to bid onunused server capacity and use them as long as thebid exceeds the current spot price, which is updatedperiodically based on supply and demand. Payment inspot instance auction is uniform, i.e., all winners in theauction will pay a per-unit price equal to the lowestwinning bid (a.k.a the spot price). While running spotinstances saves huge cost (typically over 60% accordingto [37]), it also introduces significant uncertainty forresource availability. As a result, previous resource rentalplanning model based on deterministic resource pricingdoes not apply.

If one is able to forecast spot prices with relativelyhigh accuracy, then these predictions can be used toinstantiate the DRRP model presented in Section 3.3to obtain a near-optimal solution. However, performingforecasting is challenging for customers because theydo not possess the global information of supply anddemand as Amazon does. In [14], the authors attemptedto predict customer demand from the view of an IaaSprovider. They proposed a simple auto-regression modelfor prediction but no prediction results were reporteddue to the lack of realistic demand information. Anotherstudy on the predictability of Amazon’s spot instance

This is the author's version of an article that has been published in this journal. Changes were made to this version by the publisher prior to publication.The final version of record is available at http://dx.doi.org/10.1109/TCC.2015.2464799

Copyright (c) 2015 IEEE. Personal use is permitted. For any other purposes, permission must be obtained from the IEEE by emailing [email protected].

Page 9: REVISED MANUSCRIPT PREPARED BY HAN ZHAO JUNE 2015 1

REVISED MANUSCRIPT PREPARED BY HAN ZHAO JUNE 2015 9

price was presented in [20]. Their work focused onachieving availability guarantee with spot instances, andused a quantile function of the approximate normal dis-tribution to predict when the autocorrelation of currentand past price is weak. When the autocorrelation isstrong, a simple linear regression prediction model wasadopted. However, we found that such an approxima-tion is inaccurate in some test cases that cannot be takenas a generic approach. In this section, we will assess thepredictability of spot instance price based on a statisticalapproach (ARIMA), and estimate the prediction errorsusing empirical data set.

4.1.2 Methodology

We have collected the historical data (published on [35])for spot price variation from February 1, 2010 to June 22,2011. The data source represents spot price variationsfor Linux instances in us-east-1 region. The data sizeis approximately 100K records. In this paper, we onlybriefly describe the methodology we used to evaluatethe predictability of spot pricing. More details can befound in our prior work [38]

First, we trim out the outliers in the data set and plotthe daily price update frequency for VM of class linux-c1-medium in Figure 7. Because the derived data set isunequally spaced with inconsistent sampling intervals,we further convert the data into equally spaced timeseries data with a regular update frequency of 24 timesper day. At the start of each hour, the spot price is setto be the most recent updated price in the last hour.If no update appears in the last hour, the spot price isunchanged.

0 100 200 300 400 500

05

1015

2025

days

num

ber

of u

pdat

es

Fig. 7. Variation of daily spot price update frequency for

VM class linux-c1-medium

We have performed various experiments on this con-verted data set, each with different time scale of pre-diction (both short-term and long-term). In Figure 8, weplot the histogram and density of the selected data. Wealso randomly generate the same number of points froma normal distribution characterized by the three mainmeasures in quantitative statistics (mean, variance andstandard deviation), and plot the curve in Figure 8 forcomparison. Examination of the Shapiro-Wilk test result(omitted here) verifies that the pricing data does not fitthe normal distribution.

linux−c1−medium price

Fre

quen

cy

0.056 0.058 0.060 0.062 0.064

050

100

150

200

250

Fig. 8. Histogram plot for the selected spot price history

(linux-c1-medium). Black line depicts the density, andthe red line depicts the approximate normal distribution

sampled from the same mean and variance of the series.

In order to identify patterns in the selected seriesand perform prediction, we use the ARIMA approachdeveloped by Box and Jenkins [39], which retains greatflexibility in recognizing data patterns and is relativelylightweight compared to machine learning techniquessuch as artificial neural networks or support vectormachines. The decomposition of the selected series ispresented in Figure 9, where the original time seriesis decomposed into three parts: trend, seasonal, andrandom noise. We can see that the target series does notexhibit clear trend, but advertises certain cyclic patternas shown in the seasonal decomposition. For that rea-son, we revise our prediction approach by employinga Seasonal ARIMA (SARIMA) model which takes theseasonal component into account. It can be expressedas SARIMA, (p, d, q) × (P,D,Q)24, which includes theseasonal parameters for price prediction.

0.05

70.

060

0.06

3

data

−4e

−04

2e−

04

seas

onal

0.05

900.

0600

tren

d

−0.

004

0.00

00.

004

0 10 20 30 40 50 60

rem

aind

er

time

Fig. 9. Data decomposition for the selected data series

The next step for identifying the SARIMA modelparameters is to plot the correlograms for autocorrela-tion function (ACF) and partial autocorrelation function(PACF), as displayed in Figure 10. Note that the x-axisis normalized by frequency so that 1.0 corresponds tolag = 24. From the graphs we can observe that, the

This is the author's version of an article that has been published in this journal. Changes were made to this version by the publisher prior to publication.The final version of record is available at http://dx.doi.org/10.1109/TCC.2015.2464799

Copyright (c) 2015 IEEE. Personal use is permitted. For any other purposes, permission must be obtained from the IEEE by emailing [email protected].

Page 10: REVISED MANUSCRIPT PREPARED BY HAN ZHAO JUNE 2015 1

REVISED MANUSCRIPT PREPARED BY HAN ZHAO JUNE 2015 10

selected series has certain degree of correlation with itspast at certain lag value, e.g., lag = 3, because thesevalues exceed the 95% confidence limit. However, sucha correlation is not strong enough since its value is stillfar from from 1.0 (perfect correlation).

0.0 0.2 0.4 0.6 0.8 1.0 1.2

−0.

20.

41.

0

Lag

AC

F

0.0 0.2 0.4 0.6 0.8 1.0 1.2

−0.

10.

1

Lag

Par

tial A

CF

Fig. 10. ACF and PACF for the selected series

Finally, the identification of the most appropriatemodel parameters is achieved by the forecast packagedeveloped in R [40]. The prediction result for the selectedseries is shown in Figure 11. The blue solid pointsand the red hollow points represent the predicted andthe actual prices on February 1st, 2011. The black linesrepresent spot price variation in the past 48 hours. Weobserve that the predicted prices are mostly hangingover the average price line. While this model returnsthe least prediction error compared to other models, itsmean squared prediction error (MSPE) is only slightlybetter than the simple prediction using the expectedmean value.

0 10 20 30 40 50 60 70

0.05

70.

059

0.06

10.

063

hour

spot

pric

e

Fig. 11. Day-ahead prediction for the selected series:

black line shows the past 48-hour price variation, red solidand blue hollow points represent predict and real prices

respectively, purple dashed line denotes the averageprice in the selected data series.

4.2 Stochastic Planning for Spot Pricing Market

4.2.1 Solution Overview

In addition to the predictive planning approach, wepropose an alternative approach that takes the stochasticnature of the spot pricing into account. We model thefluctuation of the spot instance rental cost Cp(i, t) as astochastic process Cp with state space S. Cp is a collection

of S-valued random variables on a probability spaceΩ indexed by the time slot set T , i.e., Cp for class-i instance is a collection: Cp(i, t) : t ∈ T . The truevaluations of the spot prices over the planning horizon

are represented by set: Cp(i, t) : t ∈ T . The goal ofthe stochastic resource rental planning is to optimizethe expected overall cost over the complete state andprobability space. In particular, the objective function (1)in DRRP can be reformulated as follows:

δexp = ECp∑

t∈T

(C+f (t) · Φi · αi,t + (Cs(t) + Cio(t))

· βi,t + C−f (t) ·D(i, t) + Cp(i, t) · χi,t,

(8)

where δexp is the expected total cost. The optimizationmodel now becomes to minimize (8), subject to con-straints (2), (3), (4), (5), (6), and (7). We summarize oursolution to stochastic resource planning as follows.

1) Generate bid prices Cp(i, t) for the class-i VM atevery t ∈ T , based on the true valuations.

2) Calculate the base probability distribution accordingto the pricing history.

3) Derive new probability distributions at all t ∈ Taccording to the base distribution and the bid price.

4) Reformulate using a multistage recourse approach,based on the newly generated distributions.

5) Solve the deterministic equivalent reformulation.

If the bid price is not sufficient, the planner has to waituntil the next auction starts (in this paper we assumethat the auction is held regularly at the start of eachplanning period). Due to the possibility of losing theauction, the actual realizations of spot prices are possiblydifferent at multiple decision points. Step 1), 2) and 3)summarize our solution to this challenge. We call ourproposed approach bid-dependent dynamic sampling.After calculating the distributions, a multistage resourcemodel is used to optimize the expected total cost.

4.2.2 Bid-Dependent Dynamic Sampling

Let Si be the finite state space for the spot price of a class-i VM. A base probability distribution is the summarizeddiscrete probability distribution over a selected historicalprice series: Pr(Cp(i, t) = si), si ∈ Si. This distributioncannot be used in our stochastic optimization modelbecause it does not include the risk of out-of-bid. There-fore, we propose to use the following approach to dy-namically generate the probability distribution at everydecision point t. The values in the finite state space Si issorted in the ascending order (no equivalent values arepresent in Si). Suppose the fixed on-demand cost is λi.At each decision point, we keep all the probability dis-tributions for those prices in the base distribution whose

values are less than the bid prices, i.e., si ≤ Cp(i, t). Therest of the distributions is substituted by the followingprobability representing the likelihood of the out-of-bidevent.

This is the author's version of an article that has been published in this journal. Changes were made to this version by the publisher prior to publication.The final version of record is available at http://dx.doi.org/10.1109/TCC.2015.2464799

Copyright (c) 2015 IEEE. Personal use is permitted. For any other purposes, permission must be obtained from the IEEE by emailing [email protected].

Page 11: REVISED MANUSCRIPT PREPARED BY HAN ZHAO JUNE 2015 1

REVISED MANUSCRIPT PREPARED BY HAN ZHAO JUNE 2015 11

Pr(Cp(i, t) = λi) = 1−∑

si≤Cp(i,t)

Pr(Cp(i, t) = si) (9)

Note that it is impossible to generate the precisedistribution at each decision point because we do notknow the actual realization of the spot price in advance.Therefore, the dynamically generated distribution basedon the ASP’s bid price is an approximation to the actualspot price distribution. However, stochastic planningusing this approximated distribution outperforms deter-ministic planning using fixed cost parameters. We willillustrate this point as well as the impact of approxima-tion precision to stochastic planning in the later part ofthis section.

4.2.3 Transforming Stochastic Planning Using Multi-

stage Recourse

We formulate the problem of Stochastic Resource RentalPlanning (SRRP) as a stochastic optimization problem,and build a multistage recourse model to solve this prob-lem. The multistage recourse model allows the applica-tion planner to adopt a decision policy that can respondto random events as they unfold. Initially, decisions aremade given present resources. As time evolves, possibleadjustments (recourse actions) become available to theapplication planner. As to SRRP, rental planning deci-sions at various decision points are recourse variables.

The dynamic stochastic spot prices are representedin a multistage scenario tree, G = (V , E), presented inFigure 12. A scenario tree has T + 1 stages. The firststage represents the current state of the world, and allsubsequent stages correspond to the future time slotswhen new information is available to the applicationplanner. A vertex v in stage t ∈ T stands for the stateof the system that can be distinguished by informationavailable up to stage t. Each vertex v ∈ V , except theroot vertex (indexed as v = 0), has a unique parentvertex π(v). The probability associated with the staterepresented by vertex v is pv. Let τ(v) denote the timestage of vertex v in the tree, we have:

∑τ(v)=t pv = 1.

Each non-leaf vertex v is the root of the subtree: G(v) =(V ′ ⊆ V , E ′ ⊆ E) containing all descendants of vertex v.The complete tree is represented by G = G(0).

Let the set of leaf vertices of G(0) be L, and let theset of vertices on the path from the root to vertex v beP(v). If v ∈ L, then P(v) represents a scenario of theproblem describing a joint realization of the stochasticparameters over all stages. Otherwise, P(v) denotes apartial realization of the problem up to the stage τ(v).With the notations defined above, a decision variableXi,t defined in the deterministic problem is replaced bya set of scenario-dependent decision variables (recoursevariables) presented below.

Xi,t ⇒ Xi,v|τ(v) = t, t ∈ T (10)

t = 0 t = 1 t = 2 t = T

Fig. 12. An example of the multistage scenario tree:

each leaf vertex represents a scenario, and each non-

leaf vertex represents an intermediate state within theplanning horizon. A probability is associated with each

branch that represents the likelihood of state transition.

The multistage scenario tree is perfectly balanced be-cause each path from root to leaf vertex has the samelength T . However, the numbers of possible states ap-peared in each stage are not necessarily equal becauseof the bid-based dynamic sampling process presented inSection 4.2.2. Given a scenario tree with a scenario setS, the ASP wishes to set a policy that makes differentresource rental decisions under different scenarios. For ascenario Sj ∈ S, decisions made at stage t if encounteredby scenario Sj is a vector:

αi,v, βi,v, χi,v, v ∈ Sj (11)

The solution must conform to the flow of availableinformation (non-anticipativity). It guaranties that deci-sions do not rely on information that is not yet available.

4.2.4 Deterministic Reformulation of SRRP

Having built the multistage recourse model, we derivea deterministic equivalent formulation of SRRP. In thereformulation, the time-dependent decision variables areeliminated. The new formulation introduces a set of newvariables that are indexed by the vertices presented inG(0). Each variable indexed by vertex v is associatedwith a probability pv. As such, the goal of resource rentalplanning is to solve MILP with regard to the scenariotree. The complete deterministic equivalent formulationof SRRP is given below:

min∑

v∈V

pv · (C+f (τ(v)) · Φi · αi,v + (Cs(τ(v))+

Cio(τ(v))) · βi,v + C−f (τ(v)) ·D(i, τ(v))+

Cp(i, τ(v)) · χi,v) (12)

This is the author's version of an article that has been published in this journal. Changes were made to this version by the publisher prior to publication.The final version of record is available at http://dx.doi.org/10.1109/TCC.2015.2464799

Copyright (c) 2015 IEEE. Personal use is permitted. For any other purposes, permission must be obtained from the IEEE by emailing [email protected].

Page 12: REVISED MANUSCRIPT PREPARED BY HAN ZHAO JUNE 2015 1

REVISED MANUSCRIPT PREPARED BY HAN ZHAO JUNE 2015 12

s.t.

βi,π(v) + αi,v − βi,v = D(i, τ(v)), i ∈ I, v ∈ V (13)

P(i) · αi,v ≤ Q(i, v), i ∈ I, v ∈ V (14)

αi,v ≤ B · χi,v, i ∈ I, v ∈ V (15)

βi,0 = ε, i ∈ I (16)

αi,v, βi,v ∈ R+, i ∈ I, v ∈ V (17)

χi,v ∈ 0, 1, i ∈ I, v ∈ V (18)

4.2.5 Polynomial-Time Algorithms for Stochastic PricingResource Rental Planning

Since variables at each t ∈ T are associated with anumber of possible realizations, solving SRRP is equiv-alent to solving a large-scale MILP. There exists a num-ber of standard techniques to solve this problem, forexample, using Benders decomposition [41]. However,due to the huge search space for optimization, they areonly suitable for performing short-term resource rentaldecisions. For example, we used CPLEX to solve SRRPfor a 6-hour planning horizon on a machine with IntelCore i5-650 (4M Cache, 3.20GHz) and 4GB memory.It took a few minutes to generate the solution. Whenmore scenarios were incorporated, the computationaltime became unbearable for practical use.

Fortunately, a number of polynomial algorithmswere proposed to solve the stochastic lot-sizing prob-lem (SLSP) in manufacturing and operations research.Among them, the most notable solutions are a branch-and-cut algorithm developed by Guan et al. [42], acubic-time dynamic programming algorithm developedby Huang and Kucukyavuz [43], and later improved toquadratic time by Jiang and Guan [44]. All of them arepolynomial-time algorithms with respect to the num-ber of nodes on the scenario tree. In this section, wedemonstrate a polynomial time algorithm [44] using thedynamic programming technique to solve the stochasticpricing resource rental planning problem.

In order to develop a polynomial-time algorithm forSRRP, we need to take care of a few things. First, thegeneral formulation of SLSP includes multiple stochasticvariables, e.g., demand, production and inventory cost,and order lead time. In our case, the service demand isknown, and the order lead time represents the latencyfrom finishing the boot-up of the computational instanceto running of the application. Therefore, our formula-tion can be treated as a special instance of SLSP withdeterministic demand and zero lead time. This greatlysimplify the calculation. Second, given a positive initialstorage (constraint 16), we can construct an equivalentproblem without initial inventory by using ε to satisfythe demands emerged in the 1st, 2nd, ..., and n-th stagesuntil it is depleted. Finally, note that DRRP is a specialcase of SRPP with leaf node number equal to one. Arelaxation of the Wagner-Within property [45], calledthe semi-Wagner-Within property, becomes the key todevelop polynomial-time algorithm for SRRP. The semi-Wagner-Within property is stated as follows.

Proposition 1 (Semi-Wagner-Within Property [43]).There exists an optimal solution (α′, β′, χ′) of SRRP suchthat if α′

i,v > 0 for v ∈ V , then

β′i,π(v) + α′

i,v = D(i, τ(m)) −D(i, τ(π(v)))

for some m ∈ G(v).

Based on this proposition, we define an optimal valu-ation function f(v, w) for each node v ∈ V , such that thetotal computations completed in nodes from root to vequal to the service demand from root to w. We use g(v)to represent the feasible set of w for f(v, w). Before weestablish the backward formula for dynamic program-ming, we also need to establish a few sets for notationalbrevity. In particular, let Γ(v) be the set of v’s child, andH(v) be the set of nodes whose service demands canbe satisfied by computations conducted in v, and finally,we define Υ(v) such that Υ(v) = H(v) \ ∪x∈Γ(v)H(x).Moreover, we use (v) to represent the path from rootto v, and D0,v =

∑i∈(v) Di to represent the cumulative

service demands from the root node to each node in thescenario tree.

The binary variable, χi,v , gives us two choices for eachv ∈ V . Therefore, If we use f0(v, w) to represent thevaluation function when bid fails, and use f1(v, w) torepresent the case when bid succeeds, we can derivef(v, w) as follows.

f(v, w) = minf0(v, w), f1(v, w)

If bid fails, the value function f0(v, w) includes: (1)storage and network transfer costs incurred to nodesin Υ(v) triggered associated with prior computationactivities, and (2) costs for v’s descendants.

f0(v, w) =∑

k∈Υ(v)

(Cs(τ(k)) + Cio(τ(k)) · (D0,w −D0,k)

+∑

k∈Γ(v)

f(k, w)

Similarly, when bid succeeds, the value functionf1(v, w) includes three components: (1) computationalcosts on node v, (2) storage and network transfer costsincurred to nodes in Υ(v) associated with prior compu-tation activities, (3) costs for v’s descendants.

f1(v, w) =Cp(i, τ(v)) + mini∈H(v):i>w

C+f (τ(v)) · Φi

· (D0,j −D0,w) +∑

k∈Υ(v)

(Cs(τ(k))

+ Cio(τ(k)) · (D0,j −D0,k) +∑

k∈Γ(v)

f(k, j)

Given the backward recursion formulation for SRRP,we briefly demonstrate a dynamic programming algo-rithm runs in O(N2) time [44].

Initialization Phase

This is the author's version of an article that has been published in this journal. Changes were made to this version by the publisher prior to publication.The final version of record is available at http://dx.doi.org/10.1109/TCC.2015.2464799

Copyright (c) 2015 IEEE. Personal use is permitted. For any other purposes, permission must be obtained from the IEEE by emailing [email protected].

Page 13: REVISED MANUSCRIPT PREPARED BY HAN ZHAO JUNE 2015 1

REVISED MANUSCRIPT PREPARED BY HAN ZHAO JUNE 2015 13

1) For each node, construct sets Γ(v), H(v) and Υ(v)following breadth-first order.

2) For each node v, set η(v, j) = 1 if j ∈ H(v), j > w,and 0 otherwise.

3) Initialize∑

k∈Γ(v) f(k, j) for each pair of v and j, ifη(v, j) = 1, initialize to 0. Otherwise set to +∞.

4) Initialize∑

k∈Υ(v)(Cs(τ(k))+Cio(τ(k))·(D0,j−D0,k)for each pair of v and j similarly to step 3).

Backward Induction Phase

1) For each node w in the scenario tree, calculate andstore f0(v, w). When the calculation is done for everyk ∈ Γ(v), we obtain the result for

∑k∈Γ(v) f(k, w) for

each w.2) For each node w in the scenario tree, calculate

and store f1(v, w). Again, this is achieved throughbackward induction bottom-up.

3) Calculate and store f(v, w) for every pair of v andw.

The optimal solution is given by the result of the val-uation function of the root node. For the computationaleffectiveness, readers can also refer to [42] for a detailedcomputational experiments that comparing the branch-and-cut algorithm with the default CPLEX MILP solver.

4.2.6 Evaluation of Stochastic Pricing Resource Rental

Planning

In this section, we perform simulations to evaluate thesolution to SRRP model. The simulation setting is basedon realistic spot pricing history and application-usagescenario presented in Section 3.5. First, imagine an oraclewho knows all the future realizations of spot prices inadvance, and takes them as inputs to the DRRP model.We denote the cost generated by this method as the idealcase cost for fine-grained resource rental planning. Wethen compute the overpay percentages against the idealcase cost for all other approaches. The price distributionis drawn from the same representative data set describedin Section 4.1.2, paragraph 3. The results are plotted inFigure 13. Here, we use the prediction values obtainedfrom the approach described in Section 4.1 as the bidprices, because they are the best approximation valueswe can obtain using statistical analysis of past pricehistory. The cost derived by solving SRRP using forecastprices is labelled as “stochastic planning”, and the costof solving its DRRP counterpart and the cost of usingon-demand VMs are labelled as “predictive planning”and “on-demand-deterministic”, respectively. It is notsurprising to see that the deterministic planning schemeusing on-demand virtual instances yields the most over-pay. In addition, stochastic planning is more cost efficientthan predictive planning for all three VM types. This isbecause planning using price distributions is more adap-tive to the uncertain availability of spot resources thandeterministic planning, and the approximation errorsintroduced by bidding are “diluted” by fine-grained sce-nario division at each decision point. When consideringthe price distribution at every decision point, stochastic

planning better hedges against the risk of the unexpectedout-of-bid event compared to rental planning based onforecasting values in predictive planning. We also mimica common bid strategy that ASPs bid a fixed price equalto the expected mean price of the historical data, andcompare its cost derived by stochastic and predictiveplanning. The results shown on Figure 13 demonstratethat stochastic planning has slightly better advantage interms of cost saving. In addition, compared to fixed pricebidding, another advantage of the stochastic planningapproach lies in reliability with regard to probabilityinformation generated by the multistage scenario tree.

0

20

40

60

80

100

c1-medium m1-large m1-xlarge

Ove

rpay

Per

cent

age

(com

pare

to id

eal c

ase

cost

)

on-demand-deterministicpredictive-planningstochastic-planningfix-bid-deterministic

fix-bid-stochastic

Fig. 13. Cost comparison of predictive and stochastic

planning

Next, we investigate the impact of bid price approx-imation precision to the stochastic planning approachwith regard to cost reduction for VM type c1.medium.This evaluation is necessary because according to Sec-tion 4.2.1, the solution quality of stochastic planning

is closely related to the true valuation Cp(i, t), whichis inaccurate in nature with respect to the actual spotprice. Taking the cost derived by actual realization ofspot price as the baseline cost, we create artificial bidprices that are +/ − 2% to 10%1 deviated from theactual price realizations, and measure the cost deviationfrom the baseline cost introduced by the approximationerrors. The results converted to percent errors againstthe baseline cost are plotted in Figure 14. Clearly, theerrors increase as approximation becomes less accurate.We use the mean squared prediction error (MSPE) tomeasure the approximation errors. The MSPE of our bestapproximation achieved falls between that of 2% and4% deviation of the model. However, the actual percenterror using our approximation is −12% from the baselinecost. A possible explanation is that our approximationspresent a mixture of over- and under-estimations ofthe actual price realizations, thus are different fromthe pattern of the artificial approximated bid prices wecreated in the simulation. In conclusion, if one bidsaccording to the best approximation result in practice,

1. prices that are more than +/−10% from the actual prices are outof the actual price range

This is the author's version of an article that has been published in this journal. Changes were made to this version by the publisher prior to publication.The final version of record is available at http://dx.doi.org/10.1109/TCC.2015.2464799

Copyright (c) 2015 IEEE. Personal use is permitted. For any other purposes, permission must be obtained from the IEEE by emailing [email protected].

Page 14: REVISED MANUSCRIPT PREPARED BY HAN ZHAO JUNE 2015 1

REVISED MANUSCRIPT PREPARED BY HAN ZHAO JUNE 2015 14

the percentage error introduced by approximation isgenerally acceptable.

-20

-15

-10

-5

0

5

10

15

20

25

Per

cent

Err

or

-%10 -%8 -%6 -%4 -%2

%2 %4 %6 %8 %10

Fig. 14. Impact of approximation precision for SRRP

solution

5 FURTHER DISCUSSION

Both the deterministic and the stochastic models providegood estimates of how resources shall be utilized overtime for cloud ASPs. However, they come with non-trivial costs. As presented in Section 4.2.5, solving theoptimization problem represented by the scenario treeis heavy-weight and takes up tremendous amount ofcomputing resources. For DRRP, although calculating therelaxed form at each step can be done in polynomial timeusing the Branch-and-Bound technique, the total numberof nodes to be evaluated can become exponential to thenumber of integer variables. For SRRP, we described anO(N2) algorithm where N is the number of nodes onthe scenario tree. Since each decision point branches outmultiple future realizations with certain probabilities, thenumber of nodes grow exponentially as time progresses.In order to make real-time scheduling decisions, it iscritical to offload the computation to a separate schedul-ing module so as to avoid the interference with the costmodel. In addition, one can parallelize the searching overthe optimization domain using heterogeneous comput-ing units [46], and employ an approximation algorithmto speed up the computation [47].

Another interesting issue is to extend SRRP with otherstochastic variables, e.g., the service demand from endusers. In practice, the demand often follows some formof distribution which can be summarized over time. Thispaper presented a simplified model that focused on theresource access uncertainties in the cloud market. How-ever, an optimization model with multiple stochasticvariables is more accurate to model realistic schedulingscenario where the optimal solution is driven by multiplefactors.

6 CONCLUSION

In this paper, we investigated the problem of fine-grained resource rental planning in a cloud environment,

and developed solutions for both deterministic andstochastic resource pricing settings. Our optimizationmodels were based on a thorough rental cost analy-sis of elastic application deployment in cloud. Whenresource pricing is fixed, we observed that the costtradeoff between computing and storage emerges intime-slotted resource provision scheduling. Based on thisobservation, we formulated a deterministic optimizationmodel that effectively minimizes rental cost of VMswhile covering customer demand over certain planninghorizon. In addition, we took one step further to an-alyze the predictability of spot resource prices usingAmazon’s spot instance price trace, and proposed analternative stochastic optimization model that seeks tominimize the expected resource rental cost given thepresence of spot price uncertainty. Simulations based onrealistic settings clearly demonstrated the advantage ofthe stochastic optimization approach over the predictiveapproach in rental cost reduction. We also studied theimpact of various parameter settings on the performanceof both models. We believe the proposed fined-grainedapproaches offer effective means for resource rental plan-ning in practice.

ACKNOWLEDGMENTS

The authors would like to thank Ruiwei Jiang andDr. Yongpei Guan from the Computational StochasticOptimization Lab at the University of Florida for theirassistance and helpful comments to the dynamic pro-gramming algorithm presented in Section 4.2.5.

REFERENCES

[1] “AWS Case Studies,” Available:http://aws.amazon.com/solutions/case-studies/.

[2] “Market Trends: Platform as a Service, Worldwide, 2012-2016,2H12 Update,” ID: G00239236, 5 October 2012.

[3] Z. Gong, X. Gu, and J. Wilkes, “Press: Predictive elastic resourcescaling for cloud systems,” in 2010 International Conference onNetwork and Service Management (CNSM ’10), 2010, pp. 9–16.

[4] R. Buyya, R. Ranjan, and R. Calheiros, “Intercloud: Utility-oriented federation of cloud computing environments for scalingof application services,” in Algorithms and Architectures for ParallelProcessing, ser. Lecture Notes in Computer Science, 2010, vol. 6081,pp. 13–31.

[5] G. Feng, S. Garg, R. Buyya, and W. Li, “Revenue maximizationusing adaptive resource provisioning in cloud computing envi-ronments,” in Proceedings of the 2012 ACM/IEEE 13th InternationalConference on Grid Computing (GRID’12), 2012, pp. 192–200.

[6] S. K. Garg, C. Vecchiola, and R. Buyya, “Mandi: A marketexchange for trading utility and cloud computing services,” J.Supercomput., vol. 64, no. 3, pp. 1153–1174, 2013.

[7] H. Zhao, Z. Yu, S. Tiwari, X. Mao, K. Lee, D. Wolinsky, X. Li, andR. Figueiredo, “Cloudbay: Enabling an online resource marketplace for open clouds,” in Proceedings of the 2012 IEEE/ACM FifthInternational Conference on Utility and Cloud Computing (UCC’12),2012, pp. 135–142.

[8] S. Zaman and D. Grosu, “A combinatorial auction-based mech-anism for dynamic vm provisioning and allocation in clouds,”IEEE Transactions on Cloud Computing, vol. 1, no. 2, pp. 129–141,July 2013.

[9] E. Deelman, G. Singh, M. Livny, B. Berriman, and J. Good, “Thecost of doing science on the cloud: the montage example,” inProceedings of the 2008 ACM/IEEE conference on Supercomputing (SC’08), 2008.

This is the author's version of an article that has been published in this journal. Changes were made to this version by the publisher prior to publication.The final version of record is available at http://dx.doi.org/10.1109/TCC.2015.2464799

Copyright (c) 2015 IEEE. Personal use is permitted. For any other purposes, permission must be obtained from the IEEE by emailing [email protected].

Page 15: REVISED MANUSCRIPT PREPARED BY HAN ZHAO JUNE 2015 1

REVISED MANUSCRIPT PREPARED BY HAN ZHAO JUNE 2015 15

[10] H. Qian and D. Medhi, “Server operational cost optimizationfor cloud computing service providers over a time horizon,”in Proceedings of the 11th USENIX conference on Hot topics inmanagement of internet, cloud, and enterprise networks and services(Hot-ICE’11), 2011.

[11] B. Sharma, R. K. Thulasiram, P. Thulasiraman, S. K. Garg, andR. Buyya, “Pricing cloud compute commodities: A novel finan-cial economic model,” in Proceedings of the 2012 12th IEEE/ACMInternational Symposium on Cluster, Cloud and Grid Computing(CCGrid’12), 2012, pp. 451–457.

[12] H. Jin, X. Wang, S. Wu, S. Di, and X. Shi, “Towards optimizedfine-grained pricing of iaas cloud platform,” IEEE Transactions onCloud Computing, vol. PP, no. 99, 2014.

[13] V. T. Chakaravarthy, G. R. Parija, S. Roy, Y. Sabharwal, andA. Kumar, “Minimum cost resource allocation for meeting jobrequirements,” in 2011 IEEE International Parallel Distributed Pro-cessing Symposium (IPDPS ’11), 2011, pp. 14–23.

[14] Q. Zhang, E. Gurses, R. Boutaba, and J. Xiao, “Dynamic resourceallocation for spot markets in clouds,” in Proceedings of the 11thUSENIX conference on Hot topics in management of internet, cloud,and enterprise networks and services (Hot-ICE’11), 2011.

[15] N. Samaan, “A novel economic sharing model in a federationof selfish cloud providers,” IEEE Transactions on Parallel andDistributed Systems, vol. 25, pp. 12–21, 2014.

[16] P. Sharma, S. Lee, T. Guo, D. Irwin, and P. Shenoy, “Spotcheck: De-signing a derivative iaas cloud on the spot market,” in Proceedingsof the Tenth European Conference on Computer Systems (EuroSys’15),2015, pp. 16:1–16:15.

[17] W. Wang, D. Niu, B. Liang, and B. Li, “Dynamic cloud instanceacquisition via iaas cloud brokerage,” IEEE Transactions on Paralleland Distributed Systems, vol. 26, no. 6, pp. 1580–1593, June 2015.

[18] R.-H. Hwang, C.-N. Lee, Y.-R. Chen, and D.-J. Zhang-Jian, “Costoptimization of elasticity cloud resource subscription policy,”IEEE Transactions on Services Computing, vol. 7, no. 4, pp. 561–574,Oct 2014.

[19] M. Yao and C. Lin, “An online mechanism for dynamic instanceallocation in reserved instance marketplace,” in 23rd InternationalConference on Computer Communication and Networks (ICCCN’14),Aug 2014, pp. 1–8.

[20] M. Mazzucco and M. Dumas, “Achieving performance and avail-ability guarantees with spot instances,” in Proceedings of the 13thInternational Conference on High Performance Computing and Com-munications (HPCC’11), 2011.

[21] O. Agmon Ben-Yehuda, M. Ben-Yehuda, A. Schuster, andD. Tsafrir, “Deconstructing amazon ec2 spot instance pricing,” inIEEE Third International Conference on Cloud Computing Technologyand Science (CloudCom 2011), 2011, pp. 304–311.

[22] B. Javadi, R. K. Thulasiram, and R. Buyya, “Characterizing spotprice dynamics in public cloud environments,” Future Gener.Comput. Syst., vol. 29, no. 4, pp. 988–999, 2013.

[23] S. Chaisiri, B.-S. Lee, and D. Niyato, “Optimal virtual machineplacement across multiple cloud providers,” in IEEE Asia-PacificServices Computing Conference (APSCC ’09), 2009, pp. 103–110.

[24] Y. Song, M. Zafer, and K.-W. Lee, “Optimal bidding in spotinstance market,” in IEEE INFOCOM 2012, 2012, pp. 190–198.

[25] H. Xu and B. Li, “Dynamic cloud pricing for revenue maximiza-tion,” IEEE Transactions on Cloud Computing, vol. 1, no. 2, pp. 158–171, July 2013.

[26] A. Demberel, J. Chase, and S. Babu, “Reflective control for anelastic cloud application: an automated experiment workbench,”in Proceedings of the 2009 conference on Hot topics in cloud computing(HotCloud’09), 2009.

[27] Z. Ou, H. Zhuang, A. Lukyanenko, J. Nurminen, P. Hui,V. Mazalov, and A. Yla-Jaaski, “Is the same instance type createdequal? exploiting heterogeneity of public clouds,” IEEE Transac-tions on Cloud Computing, vol. 1, no. 2, pp. 201–214, July 2013.

[28] B. Farley, A. Juels, V. Varadarajan, T. Ristenpart, K. D. Bowers,and M. M. Swift, “More for your money: Exploiting performanceheterogeneity in public clouds,” in Proceedings of the Third ACMSymposium on Cloud Computing (SoCC ’12), 2012, pp. 1–14.

[29] M. Mao and M. Humphrey, “A performance study on the vmstartup time in the cloud,” in IEEE 5th International Conference onCloud Computing (CLOUD 2012), 2012, pp. 423–430.

[30] R. K. Ahuja, T. L. Magnanti, and J. B. Orlin, Network flows: theory,algorithms, and applications. Prentice-Hall, Inc., 1993.

[31] “IBM ILOG CPLEX optimizer [online],” Available: http://www-01.ibm.com/software/integration/optimization/cplex-optimizer/.

[32] “AIMMS Optimization Software,” Available:http://www.aimms.com/.

[33] G. B. Berriman, E. Deelman, G. Juve, M. Regelson, andP. Plavchan, “The application of cloud computing to astronomy:A study of cost and performance,” CoRR, 2010.

[34] J. C. Jacob, D. S. Katz, G. B. Berriman, J. C. Good, A. C. Laity,E. Deelman, C. Kesselman, G. Singh, M. Su, T. A. Prince, andR. Williams, “Montage: a grid portal and software toolkit forscience-grade astronomical image mosaicking,” Int. J. Comput. Sci.Eng., vol. 4, pp. 73–87, July 2009.

[35] “Cloud Exchange,” http://www.cloudexchange.org/.[36] A. Andrzejak, D. Kondo, and S. Yi, “Decision model for cloud

computing under sla constraints,” in Proceedings of the 2010 IEEEInternational Symposium on Modeling, Analysis and Simulation ofComputer and Telecommunication Systems (MASCOTS ’10), 2010, pp.257–266.

[37] “How to run MapReduce in Amazon EC2 spot market,”Available: http://huanliu.wordpress.com/2011/06/22/how-to-run-mapreduce-in-amazon-ec2-spot-market/.

[38] H. Zhao, M. Pan, X. Liu, X. Li, and Y. Fang, “Optimal resourcerental planning for elastic applications in cloud market,” in Pro-ceedings of the 2012 IEEE 26th International Parallel and DistributedProcessing Symposium (IPDPS ’12), 2012, pp. 808–819.

[39] G. E. P. Box and G. Jenkins, Time Series Analysis, Forecasting andControl. Holden-Day, Incorporated, 1990.

[40] “forecast package for R [online],” Available:http://robjhyndman.com/software/forecast/.

[41] J. R. Birge, “Decomposition and partitioning methods for mul-tistage stochastic linear programs,” Operations Research, vol. 33,no. 5, pp. 989–1007, 1985.

[42] Y. Guan, S. Ahmed, G. L. Nemhauser, and A. J. Miller, “Abranch-and-cut algorithm for the stochastic uncapacitated lot-sizing problem,” Mathematical Programming, vol. 105, pp. 55–84,2006.

[43] K. Huang and S. Kucukyavuz, “On stochastic lot-sizing problemswith random lead times,” Operations Research Letters, vol. 36, no. 3,pp. 303 – 308, 2008.

[44] R. Jiang and Y. Guan, “An o(n2)-time algorithm for the stochasticuncapacitated lot-sizing problem with random lead times,” Oper.Res. Lett., vol. 39, no. 1, pp. 74–77, 2011.

[45] H. M. Wagner and T. M. Whitin, “Dynamic version of the eco-nomic lot size model,” Manage. Sci., vol. 50, pp. 1770–1774, dec2004.

[46] A. Boukedjar, M. E. Lalami, and D. El-Baz, “Parallel branchand bound on a cpu-gpu system,” in Proceedings of the 201220th Euromicro International Conference on Parallel, Distributed andNetwork-based Processing (PDP ’12), 2012, pp. 392–398.

[47] R. Levi and C. Shi, “Approximation algorithms for the stochasticlot-sizing problem with order lead times,” Operations Research,vol. 61, no. 3, pp. 593–602, 2013.

Han Zhao (S’07-M’14) is a senior research en-gineer working at Qualcomm Research SiliconValley. He received his Ph.D. degree (Com-puter Science) from the Computer & Informa-tion Science & Engineering at University ofFlorida, the M.Sc. degree (Computer Science)from Oklahoma State University, and the B.E.degree (Software Engineering) from Jilin Uni-versity, China. His research interests includeparallel and heterogeneous computing on mo-bile platforms, and resource management and

scheduling in distributed systems.

This is the author's version of an article that has been published in this journal. Changes were made to this version by the publisher prior to publication.The final version of record is available at http://dx.doi.org/10.1109/TCC.2015.2464799

Copyright (c) 2015 IEEE. Personal use is permitted. For any other purposes, permission must be obtained from the IEEE by emailing [email protected].

Page 16: REVISED MANUSCRIPT PREPARED BY HAN ZHAO JUNE 2015 1

REVISED MANUSCRIPT PREPARED BY HAN ZHAO JUNE 2015 16

Miao Pan (S’07-M’12) received his BSc degreein Electrical Engineering from Dalian Universityof Technology, China, in 2004, MASc degree inelectrical and computer engineering from BeijingUniversity of Posts and Telecommunications,China, in 2007 and Ph.D. degree in Electricaland Computer Engineering from the Universityof Florida in 2012, respectively. He is now anAssistant Professor in the Department of Com-puter Science at Texas Southern University. Hisresearch interests include cognitive radio net-

works, cyber-physical systems, and cybersecurity.

Xinxin Liu is currently a Privacy Engineer atGoogle Inc. She received her Ph.D. from Com-puter & Information Science & Engineer De-partment at University of Florida, and her M.S.degree from Computer Science Department atOklahoma State University. Her research inter-ests include mobile networking, and privacy pre-serving techniques.

Xiaolin Li is an associate professor in Depart-ment of Electrical and Computer Engineering(ECE), University of Florida (UF). He received aPhD degree in Computer Engineering from Rut-gers University. His research interests includeParallel and Distributed Systems (PDS), Cyber-Physical Systems (CPS), and Security & Privacy(S&P). He is directing the Scalable SoftwareSystems Laboratory (S3Lab). He is a recipientof National Science Foundation CAREER Awardin 2010, Internet2 Innovative Application Award

in 2013, and best paper awards in ACM CAC 2013 and IEEE UbiSafe2007.

Yuguang ”Michael” Fang (F’2008) receivedBS/MS degree from Qufu Normal University,China, in 1987, and Ph.D. degrees from bothCase Western Reserve University and BostonUniversity in 1994 and 1997, respectively. Hejoined the Department of Electrical and Com-puter Engineering at University of Florida since2000. Dr. Fang received the US NSF FacultyEarly Career Award in 2001 and the US ONRYoung Investigator Award in 2002, and is a re-cipient of the Best Paper Award in IEEE Inter-

national Conference on Network Protocols in 2006. He also received a2010-2011 UF Doctoral Dissertation Advisor/Mentoring Award and IEEECommunications Society WTC Recognition Award. He served as theEditor-in-Chief of IEEE Wireless Communications and is currently serv-ing as the Editor-in-Chief of IEEE Transactions on Vehicular Technology.He is a Fellow of IEEE.

This is the author's version of an article that has been published in this journal. Changes were made to this version by the publisher prior to publication.The final version of record is available at http://dx.doi.org/10.1109/TCC.2015.2464799

Copyright (c) 2015 IEEE. Personal use is permitted. For any other purposes, permission must be obtained from the IEEE by emailing [email protected].