Keywords

1 Introduction

Cloud computing delivers a new promising paradigm through which users can gain on-demand access to cloud services on a pay-per-use way [1]. Infrastructure as a Service (IaaS) is such a form of cloud computing service, by which cloud providers deliver computing resources in the form of Virtual Machines (VMs) over the Internet to end users. The cloud providers, who maintain pools of massive computing resources (e.g., computation, network, and storage), can gain profits from users’ payment through economy of scale [2]. And generally a cloud provider supplies multiple classes of IaaS instances for fulfilling divergent users’ requirements. In this situation, efficient pricing mechanisms become necessary for cloud providers to price their services optimally to obtain higher profit.

However, it is a challenging task for a cloud provider to price their multiple classes of services in an optimal way, which is mainly because of two reasons. First, the users’ preferences are unknown. In the perspective of a cloud provider, which class of IaaS instance and how many instances a user will choose to buy is unknown. The total profit a provider can gain is partially determined by users’ choices. Second, the balance of demand and supply needs to be regulated by prices. Given the fixed total capacity of physical resources maintained by a cloud provider, the total requests from users may exceed the maximum capacity of the cloud if the price falls below a certain level. Conversely, if the price is too high, some resources will be idle. Thus, the price should be properly set.

In this paper, we propose two algorithms to solve the optimal pricing problem in cloud computing environments, where a cloud provider supplies multiple classes of instances with varying configurations. One of these two algorithms is an iterative algorithm based on the idea of Genetic Algorithm (GA). The pricing model based on this algorithm has superior profitability, but also has an obvious weakness, i.e., if the algorithm cannot converge very quickly, the cost of data communication will be high. Thus we propose another cost-effective pricing algorithm which is based on the idea of hill climbing. Although the profitability of this algorithm is a little lower than the Genetic based algorithm, the cost of data communication is nearly negligible. Based on the two proposed algorithms, a cloud provider can optimally pricing its multiple classes of IaaS instances according to current conditions in a public cloud service marketplace.

The rest of this paper is organized as follows. In Sect. 2 we discuss the related work. Section 3 gives an overview of the system model. Section 4 states the problem and its formulation. Section 5 presents our proposed two algorithms for the optimal IaaS pricing problem. Section 6 outlines the experimental results and Sect. 7 gives conclusion and future directions for this work.

2 Related Work

Pricing and bidding strategies about cloud services on Internet have been extensively investigated. Major research directions are as follows.

Profit-Optimization Pricing Strategy. There are pricing strategies studied in the perspective of profit or social welfare optimization [3]. Two solutions have been proposed to determine optimal policies for pricing cloud bandwidth reservations in public clouds [4], aiming at maximizing the total profit made by all the tenants and the cloud provider under the presence of demand uncertainty.

Cost-Saving Bidding and Auction. Auction-based resource trading is already adopted by cloud platforms such as Amazon EC2 [5]. But what prices should users bid is far from trivial. A nonlinear optimization problem is solved to minimize the cost of users in biding resources [6]. Besides, different pricing models may cause varying cost to users. Poola et al. [7] propose that users can reduce their costs by using spot instances rather than on-demand ones.

Compared with these works, the primary contribution of our work lies in that we address the optimal pricing problem from the perspective of cloud providers in the presence of multiple classes of IaaS instances, and our work can be used as a complementary mechanism to current pricing models used in public clouds.

3 The Cloud Platform

We consider a cloud computing platform with a pay-per-use model, in which there are a group of users who buy the IaaS cloud services in the form of VMs to run their jobs. As the same with other public cloud platforms such as Amazon EC2, there are multiple classes of VM instances with different physical resource configurations (e.g., c4.2xlarge, c4.4xlarge and c4.8xlarge). Generally, the price of a higher-performance VM instance is more expensive than a lower one. When purchasing IaaS instances from the cloud platform, an end user can choose an instance type (e.g., c4.2xlarge), platform (e.g., Unix or Windows) and so on.

Here we only consider the situation where each user is job-oriented, which means each user has a job that needs to be finished in time. We denote the number of users currently in the cloud platform as N and the number of types of VMs supported by the cloud platform as U. To keep the discussion simple, we assume that each user has a single job to run in the cloud platform.

A cloud provider usually owns a fixed number of physical machines on which it can host the IaaS instances required by users, and running these machines would incur cost. Since different classes of IaaS instances have divergent configurations and running cost, they may bring varying profitability. Thus, based on the up-to-date market situation, the provider needs to dynamically determine the prices of multiple classes of IaaS instances to maximize its own profit. From now on, in this paper we use the vector \({{\varvec{p}}}=\{p_1, ... , p_{U}\}\) to denote a price setting for the U classes of IaaS instances supplied by the cloud provider.

4 Problem Statement

In this section, we first describe the user’s model used in this paper, and then formulate the pricing problem of multiclass IaaS instances for a cloud provider.

4.1 User Model

As stated above, an end user can choose its favorite IaaS class to run its job. Here we assume each user is self-motivated and utility pursuing, thus it will choose an optimal class and quantity to maximize its own utility. The utility of a user can be calculated as the difference between the revenue obtained by completing a job and the cost for buying VMs to run the job. Currently we only consider batch type jobs, for which response time, i.e., job execution time, is a main QoS consideration. For a user i, its utility function is represented as:

$$\begin{aligned} {f_i(T_u)}-cost_u \end{aligned}$$
(1)

Here \(T_u\) is the response time of the job submitted by user i if he chooses to use instance type u (\(u \in \{1,2,\cdots ,U\}\)), and \({f_i(T_u)}\) indicates user i’s utility from using instance type u. As generally assumed, the function \(f_i\) is a differentiable and decreasing function of T. In fact many functions can satisfy this property and users can choose any utility functions which can represent their own preference. When the prices of U classes of instances are presented to users, the optimal VM class \(u^*\) for user i can be solved by:

$$\begin{aligned} u^*=\mathop {\arg \max }_{ \;u\in U}({f_i(T_u)}-cost_u) \end{aligned}$$
(2)

where \(T_u\) can be estimated by sampling and prediction methods such as task-level benchmarking or regression [8], and \(cost_u\) is the payoff to the provider.

4.2 The Pricing Problem

Apparently, a user’s choice as well its final payment on buying IaaS instances is influenced by current price settings. From the perspective of the cloud provider, given a fixed group of users, the provider’s profit for operating the cloud is the difference between the users’ payment and the cost for running the cloud. A provider needs to find an optimal pricing setting properly to maximize its profit. While to calculate precisely its cost for running the cloud is a complicated problem, which is beyond the discussion of this paper, here we assume each type of VM instance has a fixed unit cost \(K_u\). And this value can be estimated by cloud provider from the long-running history of operating the cloud. Given these concerns, the objective of a cloud provider to optimize its total profit can be formulated as:

Maximize

$$\begin{aligned} {\begin{matrix} \sum _{u=1}^{U}{p_u(t)}{\sum _{i=1}^{N}{x_{iu}y_{iu}T_{iu}}} -\sum _{u=1}^{U}{K_u}{\sum _{i=1}^{N}{x_{iu}y_{iu}T_{iu}}} \end{matrix}} \end{aligned}$$
(3)

Subject to

$$\begin{aligned} \forall y_{iu}\in \{0,1\}. \end{aligned}$$

Here, \(p_u(t)\) denotes the price for the class of \(VM_u\) instances set by the cloud provider and the value of \(y_{iu}\) denotes whether the user i chooses the class of \(VM_u\) or not under current price settings. The term \(y_{iu}=1\) means user i chooses \(VM_u\) and \(x_{iu}\) is the quantity of \(VM_u\) it demands. The term \(T_{iu}\) denotes the time duration from the time type u instances are launched by user i until they are terminated, i.e., the execution time of its job.

Fig. 1.
figure 1

The interactions between the cloud provider and end users

But the main problem is that a cloud provider doesn’t know the profit function of each user and thus it cannot obtain the optimal prices by this way. Since jobs are submitted online and the users’ decisions are influenced by current price settings, in this paper we propose an iterative pricing model. In this model, the cloud provider periodically updates the price settings with the aim of improving its profit, according the feedbacks returned by the users in last pricing round, as shown in Fig. 1. The feedback from a user is in fact its choice of the class of VMs as well as the quantity it demands. A new pricing process can be started when the IaaS market conditions have changes, such as there are new job arrivals or more resources are becoming available. The price updating process continues until a convergence is reached. In next section we present two algorithms for implementing the iterative pricing process.

5 Iterative Pricing Algorithms

In this section, we present two algorithms for iteratively updating the prices of multiple classes of VMs to improve a cloud provider’s profit.

5.1 Genetic Based Iterative Pricing Algorithm

In this subsection, we introduce a Genetic based algorithm (GAIP for short) which can obtain the near-optimal pricing strategies in acceptable iterations. The basic idea of our proposed Genetic based iterative pricing algorithm is to start an evolutionary process as a cloud provider begins to update its IaaS prices, use the best solution in current evolutionary generation as the pricing strategy in current pricing round, and evolve a new generation when the next pricing round begins, until a convergence is reached.

To apply the genetic evolution process, a specific setting of prices for all the U classes of VMs, i.e., \({{\varvec{p}}}=\{p_1, ... , p_{U}\}\), is encoded into a chromosome. The length of a chromosome is equal to the number of VM classes and the \(u^{th}\) gene represents the price for class \(VM_u\). During each generation, we use the objective function (3) to calculate the fitness value of a chromosome. But a remaining question is, for a specific chromosome in current generation, without knowing each user’s profit function, how a cloud provider can know the user’s choices on that price settings encoded in a chromosome to calculate its fitness value. To deal with this problem, in our algorithm the cloud provider collects users’ choices by sending the price settings in all the candidate chromosomes in current population to users, and then calculates each candidate chromosome’s fitness value based on users’ feedbacks, according to function (3).

The evolutionary process stops when the fitness value of the best solution so far is not changing any more for a number of generations. This means the optimal pricing strategy is reached and the price settings keeps stable at this point, as well as the user’s choices in purchasing VMs. Another stop** criteria, which defines the maximum iteration rounds, is also used to prevent the pricing algorithm from running infinitely.

5.2 Hill Climbing Based Iterative Pricing Algorithm

Although the above Genetic based algorithm can achieve superior profitability, it has an obvious weakness, which is, if it cannot converge very quickly, the cost of data communication will be high. This is because in every generation a cloud provider needs to generate a population of prices and ask each user to give feedback on them. Thus we present another cost-effective algorithm which is based on the idea of hill climbing (HCIP for short).

figure a

In HCIP, in every iteration, only one set of prices is generated and the objective value of this price setting is calculated according to (3), based on users’ feedbacks. During the price updating process, at the beginning, for every class of VM instances, we use the half of the historical price upper bound as its initial price. Without loss of generality, the price of a VM class with a higher configuration, which has the a higher computing capability, is always higher than a VM class with a lower configuration. Thus we use different updating step sizes to raise their prices. And the iterative step size increases with the growing rate of objective function value proportionally.

When the fitness value stops increasing, a smaller adjustment will be adopted instead of using the previous iterative step. The iterative price updating process stops until the objective function value does not grow any more. That means the pricing updating process reaches convergence, and the price settings as well as users’ choices on VM will remain stable. Algorithm 1 details the procedure of the hill climbing based iterative pricing process described above.

6 Experimental Results

In this section, the performance evaluation of the proposed two iterative pricing algorithms is presented. We have conducted extensive simulation experiments based on synthetic datasets to examine the performance of our algorithms. We use simulation approach because it enables us to perform repeatable experiments, and the cost incurred by performing experiments on real cloud infrastructure would be extremely high. We compare the profitability of different pricing models under the identical trading market conditions.

We take the number of vCPUs of different VMs as the main configuration parameter, referring to Amazon EC2. Without loss of generality, the proportion of computing capability between different classes of instances is not strictly equal to the ratio of VM configuration.

We consider each submitted job is a batch type job whose execution time on a standard VM follows a exponential distribution where \(\lambda \) (the parameter of exponential distribution) is 15 h. This value is generated according to the historical data from our real-world cloud computing platform. The number of users is 100. We have done simulations with different number of classes of VMs to evaluate the two algorithm’s profitability. In order to avoid bias results due to randomness, we repeat these simulations many times.

From these simulations, we find that the average profit made by the HCIP is only less than the Genetic based algorithm by 6 %. As an example, Table 1 shows the comparison of profitability of these two proposed algorithms under two selected group of simulations: the first has four classes of instances, and the second has eight types of instances. Besides, the simulation results indicate that the difference of profitability between these two algorithms is still not enlarged with the expansion of the user’s group scale. As we have discussed in Sect. 5.2, the Genetic based algorithm needs much more data communication than HCIP and the data communication cost for them is not in a same order of magnitude. Thus we can conclude that the HCIP is more cost-effective, but not sacrificing too much profit compared with the Genetic based pricing algorithm.

Table 1. Comparison between two proposed algorithms under different circumstances

Then, we compare the profitability of these two algorithms with other three fixed-pricing schemes, in which the prices of different VM classes are proportionally distributed to their hardware configurations. We obtain these prices based on the VM prices in real-world cloud platform such as Amazon EC2. Figure 2 shows the total profit of different pricing strategies, and the profitability of the two proposed algorithms is better than others. The average profit of our two algorithms is higher than the average of the other three by 21 % and 15 %, respectively.

Fig. 2.
figure 2

The profit obtained by different pricing strategies

7 Conclusions and Future Work

This paper proposes an iterative pricing model to solve the problem of pricing multiple classes of VMs optimally from the perspective of cloud providers. Due to lack of centralized controller and privacy conservation of users, cloud providers can only price their IaaS instances based on the feedback from users and iteratively update the price settings. In particular, we propose two algorithms to implement the iterative pricing process: one is Genetic based, which can achieve near-optimal pricing strategies, and the other one is based on the idea of hill climbing, which is more cost-effective. Through extensive experiments and simulations, we show that the proposed two pricing algorithms can achieve advanced profitability in pricing multiple classes of IaaS instances in cloud environments.

For the future, we plan to combine our pricing model with the Lyapunov stability theory to guarantee the stability of the cloud system and analyze how an optimal pricing strategy can be developed in that condition.