Abstract
Cloud based largescale online services are faced with regionally distributed stochastic demands for various resources. With multiple regional cloud data centers, a crucial problem that needs to be settled is how to properly place resources to satisfy massive stochastic demands from many different regions. For the general stochastic demands oriented cross region resource placement problem, the time complexity of existing optimal algorithm is linear to total amount of resources and thus may be inefficient when dealing with a large number of resources. To end this, we propose an efficient algorithm, named discrete function based unbound resource placement (DURP). Experiments show that in scenarios with general settings, DURP can averagely achieve at least 97% revenue of optimal solution, with reducing time by three orders of magnitude. Moreover, due to the generality of problem setting, it can be extended to get efficient solution for a broad range of similar problems under various scenarios with different constraints. Therefore, DURP can be used as an effective supplement to existing algorithm under timetense scheduling scenarios with large number of resources.
1. Introduction
Largescale online services (such as YouTube [1] and Facebook [2]) often face highly dynamic user demands from distributed physical locations. A proper online service can leverage cloud computing to lower cost and serve more users. Based on typical cloud platform like [3, 4], the target of resource scheduling in largescale online services can be viewed as placing given resources at geographically dispersed data centers and serving as many demands as possible. For a specific request, one prefers to be served in local data center rather than in remote one. This is most obviously because the locality of data centers needs to be considered to guarantee QoS (quality of service). Moreover, under scenarios like online scheduling, a relative high response time is often a must, and it is essential to recompute placement quickly and efficiently to handle high dynamic demands with time. Therefore, how to minimize operation cost and to find optimal placement efficiently in such scheduling scenarios is an impending need to meet in cloud platform.
For instance, the cloud based content distribution network can be viewed as an example that falls under above paradigm, where a number of geographically dispersed cloud data centers are selected to be close to end users. Under this scenario, user’s requests are preferred to be served by a local data center, and service provider would like to predistribute content replicas at each data center so as to meet as much content demand as possible in the most efficient way. Another example is cloud based media streaming, in which service provider faces the problem of where to place virtual machine instances, so as to satisfy timevarying bandwidth demands from users spreading across various geographical regions.
In above paradigm, online services are faced with stochastic demands which are represented by demand distribution for each resource type in each region. Since we do not suppose stochastic demands to follow a specific distribution, a variety of scenarios can be covered: demands with various patterns and distributions, for example, realistic demand patterns, extracted from a large number of traces in production servers [5], which contains several different kinds of variability, autocorrelation, and periodicity. Demands that vary across data centers, as in [6], and demands in different data centers may be correlated with each other. Demands vary across resources; for example, the demands change significantly across channels in media streaming services like YouTube [7].
Summarized from above scenarios, the general resource placement problem can be formulated as follows: given a global resource budget, how to satisfy as many requests as possible by placing resources optimally over regions. Since each request can be satisfied either by the data center in same region with high QoS (i.e., high revenue) or by the data center from a different region with low QoS (i.e., low revenue), algorithm’s aim is to maximize expected revenue of resources.
By considering stochasticity of demands, algorithm can be more efficient than prior mean demand based ones. Consider the scenario of placing resources in a system with two regions and one resource type. Demands from the first region have a deterministic demand of requests, and the demands from the second region have bursty demands of requests with probability and request with probability . The aim of algorithm is to maximize the expected number of satisfied requests (i.e., the revenue). Assuming that one resource can satisfy one request, then the algorithm using stochastic demand will place all resources in the first region with a revenue of . In comparison, the algorithm using demands mean will place resources in each region, yielding a revenue of , which approximates if ; that is, considering stochasticity in demands may significantly improve utilization of resources.
However, stochastic demands will significantly increase computation complexity. It is challenging to efficiently solve a resource allocation problem that combines combinatorial aspects and arbitrary stochastic demand distribution in timetense scheduling scenarios. To the best of our knowledge, only one SSP (successive shortest path) based optimal algorithm was proposed for a similar stochastic demand based problem [8], whose time complexity, however, is linear to total amount of resources and then may be inefficient when dealing with a large number of resources.
To reduce the computational complexity, one can efficiently optimize servicing revenue by utilizing the inner structure of the problem. We develop an efficient placement algorithm accordingly, suitable for timetense scheduling in largescale systems. Our paper mainly makes three contributions. We prove that the problem can be transformed to two subproblems, and the solutions to these subproblems can be represented as functions of demands and resources. We derive mathematical description of all necessary functions, to facilitate computation of optimal solution. We develop an efficient discrete function based resource placement algorithm (called DURP), which gets solution quickly by leveraging discrete functions to approximate continuous ones. Under the scenarios with general settings, we compare the effect and efficiency of DURP with commonly used mean demand based algorithm and the optimal SSP based algorithm. Our analysis and preliminary experiments indicate that DURP outperforms mean demand based algorithm under all scenarios and can averagely achieve at least 97% revenue of optimal SSP based algorithm, with time complexity reduced to nearly one thousandth of it. Therefore, it can be used as an effective supplement to existing algorithm in timetense scheduling scenarios. And due to the generality of problem settings, it can be extended to get efficient solution for a broad range of similar problems under various scenarios with different constraints.
2. Related Work
One part of related works was cloud based resource scheduling for multiple services [9–11]. Reference [9] handled the problem of scheduling multiple resources under budget constraint in one data center. The viewing behaviors of users in a multichannel VoD (video on demand) application were analyzed to get a queueing network and then a dynamic resource provisioning algorithm is provided to reduce cloud utilization cost. Reference [10] investigated the response time and resource cost minimization problem under three typical scenarios: singleservice, multiservice, and priorityservice scenarios. Queueing model based algorithms were developed to optimally allocate cloud resources for each service in all scenarios. Reference [11] proposed QoSaware resource elasticity (QRE) framework. Based on the assessment of the application behavior, QRE framework can help dynamic adjust cloud resources.
There was also a substantial research effort being made about similar problems of resource consolidation [12, 13]. Reference [12] investigated resource provisioning problem in shared Internet hosting platforms, which was similar to the scenarios in distributed cloud centers. The proposed algorithm overbooked cluster resources in a controlled fashion; thus, it could provide application isolation and performance guarantees at run time. Reference [13] treated virtual machine as “moldable” during consolidation and developed a genetic algorithm to minimize the overhead of transition between system states.
Other similar works were cloud based content delivery [14–18]. MetaCDN in [14] intelligently matches and places users’ content onto many storage clouds and exploits the difference in storage cloud to maximize utility functions like quality of service. Reference [15] studied the cost optimization problem in content multihoming scenario, where a content publisher uses multiple CDN to aggregate the diversity of individual CDN providers on features, performance, and commitment. The proposed algorithm can reduce publishing cost by 40%. Reference [16] proposed a hierarchical framework to solve the deployment problem in cloudoriented content delivery network. In the framework, inter and intracloud communication resources were simultaneously considered and the problem was transformed to replica placement and graph partitioning problem. Reference [17] handled the problem of efficiently moving the data from different geographical locations into a cloud for further processing. The two proposed online algorithms can efficiently find the optimal routing paths and the right data centers for processing. Reference [18] studied the cost minimization problem of content migration in cloud of clouds. An online heuristic algorithm is proposed to optimize the cost of migration and adapt to the changes of user access pattern.
Some related works in P2P (peertopeer) systems also investigated similar problems [19, 20]. Reference [19] addressed the problem of content placement in “distributed server networks” scenario of P2P systems, where the content placement strategy can help resolve similar problems in cloud related scenarios. Reference [20] investigated the relationship between the number of videos and peers, the storage capacity of each peer, and the resultant offloading of video server bandwidth. The conclusion can also help design cloud based VoD systems.
Most of existing works were carried out only based on mean demands of resource placement. However, a more realistic scenario is that resource demands from massive users are dynamic and stochastic. The main challenge posed by this paradigm is how to deal with an arbitrary multidimensional (highdimensionality) stochastic demand. A method of resource placement for similar problem is proposed in [8]. The main differences between their problem setting and ours are that their problem setting is for data centers with dedicated servers (with resource constraints in each region), while our setting is for cloud data center (with only a global resource budget). The typical scenario of their problem is placing resources over traditional data centers with limited resources. To solve the problem, they transformed the resource placement problem into mincost flow one, and the optimal solution can be obtained by a customized version of SSP (successive shortest path) algorithm. But under scenario with large number of resources, the SSP based algorithm is not efficient enough since its time complexity is linear to total amount of resources. Different from the SSP based idea, we propose an efficient algorithm by leveraging the special structure of our problem. The algorithm can achieve at least 97% revenue of optimal solution, and its time complexity is independent of the total amount of resources.
3. Problem Formulation
We consider a system consisting of regions indexed by . In each region, one can place multiple resources of different types indexed by . We denote by the amount of type resources placed in region , the set of resources placed in these regions is called a placement and denoted by , with as the total amount of type resources. There is no limit on the amount of resources in each region, which is consistent with the model of cloud computing. For a type request from region , if the request is assigned to a type resource, it is labelled as “satisfied.” If a type request from region is satisfied, it is assigned to either type resources located in region , that is, the request is satisfied locally, or A type resource located in a different region, that is, the request is satisfied remotely.
Let and denote the number of requests satisfied locally and remotely; then the revenue under placement is
Denote as the total number of satisfied requests; there is , and then revenue can be rewritten as where , , and are revenue weights. For stochastic demand, let be a random variable denoting the demand for type resource in region and let be a random variable denoting the demand for type resource in all regions. Their CDFs (cumulative distribution functions) are denoted by and , respectively. Given demand realization and , the revenue can be represented as For any arbitrary placement and stochastic demand , the expected revenue is Then given a global resource constraint , the aim of algorithm is to find the optimal placement that maximizes the expected revenue. Consider
4. Algorithm
Generally, the problem formulated by (5) can be solved by traversing all possible placements (Algorithm 1), where is typeplacement, which only presents the total amount of resources of each type. And a typeplacement can be concretized to a set of placements . We denote by and the set of placements and typeplacements under global constraint , respectively.

However, the traversing algorithm is of high complexity; for example, in a typical cloud based scenario, there is a very large data space to search. And in each iteration, the computation of is timeexpensive, and,for instance, needs to use the distributions with each one represented by data units (in some specific applications, it is possible that ). To find efficient algorithm, we need to decompose the problem firstly, which is as illustrated below.
Firstly, the problem to be solved by lines (3)–(5) in Algorithm 1 can be described as Subproblem 1.
Subproblem 1. Given a typeplacement , find the max expected revenue of all possible placements , which can be formulated as follows:
And the problem to be solved by lines (2)–(6) in Algorithm 1 can be described as Subproblem 2.
Subproblem 2. Given a global resource constraint , find the typeplacement whose solution to Subproblem 1 is the maximal one among all .
It can be easily observed that the solution of Subproblem 1 can contribute to solution of Subproblem 2, and Algorithm 1 is just a solution to Subproblem 2 using traversing search algorithm. To find efficient solution, we need to investigate the properties of these subproblems.
4.1. Efficient Solution to Subproblem 1
To investigate the properties of solution to Subproblem 1, we introduce some notations. Denote by type revenue of placement () the revenue of type resource in the placement; then the expected type revenue for (i.e., ) is
For placement , its expected revenue can be rewritten as the summation of all its expected type revenues. Consider
Given typeplacement , is constant for each . is only functions of with . Then for all , the maximal value of can be achieved independently of each other, which is as follows:
Therefore, we can get Subproblem 1.2.
Subproblem 1.2. Given a typeplacement and , find the max expected type revenue of all possible placements , which can be as follows: where is the amount of type resources in typeplacement . It is obvious that Subproblem 1 can be decomposed into Subproblem 1.2, which can also be solved by traversing search algorithm with high computation complexity. Fortunately, we are able to find properties of solutions after investigating the problem in continuous domain. These properties will be later utilized to devise efficient algorithms for the problem in discrete domain. To get the closed form of (10) in continuous domain, we first introduce Lemma 1.
Lemma 1. For any continuous nonnegative random variable with CDF and constant , it satisfies .
The proof of lemmas, corollaries, and theorems in the paper can be found in Appendix. Then the closed form of in continuous domain is
To investigate the properties of solutions to Subproblem 1.2, the following theorem is introduced first.
Theorem 2. For functions , with and , the derivative functions are continuous and monotonic decreasing functions, with . Then for constraint , the maximal value of is achieved when .
Note that in Theorem 2 the optimal may not be unique, since need not be strictly monotonically decreasing and there may be with ; thus, we only need to find one of the optimal solutions to achieve the maximal value of . Since in (5) is constant for a given , then according to Theorem 2, the solution to Subproblem 1.2 can be calculated as follows.
Corollary 3 (the efficient solution to Subproblem 1.2). Given typeplacement and given , if a placement satisfies , then is achieved. Here .
According to Corollary 3, by leveraging some functions, we can quickly calculate the solution to Subproblem 1.2; as a result, we can get the solution to Subproblem 1.
Additionally, for a given , according to Corollary 3 and the definition of as in (11), is a function of under given demand distribution, which is denoted by . Then the maximal expected revenue of solution to Subproblem 1 can be quickly calculated as follows:
4.2. Efficient Solution to Subproblem 2
For a given global resource constraint , Subproblem 2 can be rewritten as follows:
According to Theorem 2, the solution to Subproblem 1 can be as characterized below.
Corollary 4. Given , for a typeplacement , if it satisfies for any , then is achieved. Here and .
In Corollary 4, , , and are inverse function of , , and , respectively. By solving Subproblem 2, we can get the maximal expected revenue in original problem of (5) and the typeplacement ; then the corresponding optimal placement can be located by solving Subproblem 1 for typeplacement .
The above continuous functions can be approximated by discrete ones and the optimal placement for global resource constraint can be obtained as in Algorithm 2. The discrete functions are firstly calculated iteratively (lines (1)–(14)) and then the optimal solution is produced by calling their inverse functions (lines (15)–(18)). We denote the algorithm as discrete function based resource placement algorithm (DURP).
In our implementation of DURP, each of these discrete functions is recorded in hash map data structure, and its time complexity of querying is . And for discrete function , an absent is approximated proportionally by
where and are the nearest present values to with . By binary search algorithm, the time complexity of finding and within keys is . As in [8], the demand distributions from input can be precalculated in and are available in an external data base. As a result, the worse time complexity of codes in Algorithm 2 is (lines (1)–(3)), (lines (4)–(14)), and (lines (15)–(18)); one can easily calculate that the time complexity of DURP is no more than and less than when , where is the cycle count in Algorithm 2. Additionally, iterations in the algorithm can be easily parallelized to get further acceleration. If some iterations are executed in parallel (lines (1)–(3), (6)–(10), and (15)–(18), resp.), the time complexity is less than .

5. Experiments
In this section, we evaluate DURP algorithm to study the following subjects: comparing the effectiveness of DURP with SSP based algorithm in [8], which is denoted by SURP (SSP based unbounded resource placement) and checking the relationship of time complexity and effectiveness of DURP.
Similar to the experiment settings of prior works [8], we consider demands that follow Zipf distribution; that is, the probability of a single request to demand a type resource is where is a real number. Without loss of generality, we choose to be Poisson distribution with a rate of , where is the expected number of total requests and the expectation of demands from each region is equal.
First we compare the effect of proportional mean method, SURP, and DURP under different scenarios, where in method of proportional mean, the number of type resources in region is proportional to the mean demand:
From Figures 1, 2, and 3, the expected revenues of three methods are compared under surplus scenario (), balanced scenario (), and deficit scenario (), respectively. The expected revenue is drawn against Zipf parameters. The number of regions and the revenue parameters . The parameter settings are and and the cycle count of DURP is . Similar to previous works [8], the Zipf parameter is set to be wide enough and ranges from 0.7 to 1.4.
It is observed from Figures 1, 2, and 3 that DURP can outperform proportional mean based methods with different Zipf values; for example, the expected revenue of DURP (line marked with “”) is always larger than that of proportional mean based method (line marked with “*” ). And the effect of DURP is close to that of SURP; for example, the difference in expected revenue between DURP and SURP (distance between line marked with “” and line marked with “+”) is always within 100 in all three figures.
As shown in Figures 4, 5, and 6, the expected revenues of these three methods are compared under surplus (), balanced (), and deficit scenario (), respectively. The expected revenue is drawn against number of resource types (). The number of regions and the revenue parameters . The parameter settings are Zipf = 1.0 and and the cycle count of DURP is . The number of type resources ranges from 100 to 1000 to cover the result in different orders of magnitude of .
It is shown from Figures 4, 5, and 6 that DURP always outperforms proportional mean based methods with different number of resource types, since the expected revenue of DURP (marked with “”) is always larger than that of proportional mean based method (marked with “*”). Because the difference in expected revenue between DURP and SURP (between line marked with “” and “+”) changes little (always within 100) in all three figures, the effect of DURP is close to that of SURP with increasing number of resource types.
In brief, from Figures 1, 2, 3, 4, 5, and 6, we can see that DURP can outperform proportional mean based methods, and the effect of DURP is close to SURP in all scenarios. However, it is observed that, along with the increasing of available resources ( increases from 500 to 1500), the effect of mean based method (line marked with “*”) approaches that of optimal solution SURP (line marked with “+”). The underlying reason is that the number of unsatisfied demands decreases with more resources, which leads to the decreasing of room for optimization. Since resources cannot be surplus enough in most of real scenarios, DURP and SURP can still be used to gain more revenue in common scenarios.
Since the result of SURP is optimal, we then investigated the effect of DURP using the revenue ratio of DURP to SURP. In Figures 7 and 8, the revenue ratio is drawn against Zipf parameters with . The number of regions and the revenue parameters . In Figure 7, Zipf ranges from 0.7 to 1.4. We compared DURP and SURP using the revenue ratio of DURP to SURP, with and , under surplus scenario (), balanced scenario (), and deficit scenario (). In Figure 8, we compare DURP and SURP with and ranging from 100 to 1000, under surplus, balanced, and deficit scenarios. We can see that the effect of DURP does not change significantly along with the increasing of Zipf and number of resource types ().
In Figure 9, we investigate the time complexity of DURP using different expected numbers of total requests (), Zipf values (0.7 to 1.4), (100 to 1000), and available resources ( to with interval of ). For each pair of and , SURP and DURP are applied to get revenue ratio, with DURP’s cycle count ranging from 10 to 200. The average revenue ratio (of all ) for each under different is plotted in Figure 9. We can see that averagely DURP can achieve more than 97% revenue of optimal solution and can achieve more than 99% when .
In brief, the following is shown in above experiments.(1)DURP is lightly affected by the popularity distribution of resources (Zipf) and number of resource types ().(2)DURP is affected by the scarcity of resources. It is observed that it is better in surplus scenario or with more total available resources. By inspecting the data, we find that since the optimal solution is rounded to integers, the revenue under smaller is more affected by rounding.(3)In DURP, near optimal result can be calculated with much lower time complexity. The average effect of DURP can still achieve at least 97% of optimal solution in all considered scenarios. Note the time complexity of SURP and DURP is [8] and (as stated in Section 3), respectively. When and , the time complexity is reduced by nearly three orders of magnitude and the effect of DURP can still achieve 99% of optimal result.
6. Conclusion
In this paper, we propose a fast algorithm DURP for resource placement in cloud platform considering stochastic demands with multidimensional distribution. Our analysis and the preliminary experiments indicate that DURP can achieve at most 99% revenue of optimal solution, and compared with existing algorithms, its time complexity is reduced by nearly three orders of magnitude in our scenarios with general settings. Therefore, DURP can be an effective supplement to existing algorithms under timetense scheduling scenarios.
Our future interesting works may include more precise approximation of continuous functions using discrete ones and efficient algorithms to variant of resource placement problem with more constraints.
Appendix
Proof of Lemma 1. Note that for given constant , it has
Denote random variable and by and ; and ’s cumulative distribution function (CDF) then (A.1) can be rewritten as
According to [21], for every realvalued nonnegative random variable with probability density function , it has . Substituting by , we can get . Then Lemma 1 is proved.
Proof of Theorem 2. Denote . Suppose when maximal value of is achieved. Since both and are monotonic decreasing function, then there must exist and with and satisfy . Set ; since and , then it has ; that is, . It shows that for any not satisfying , there exists another that satisfies the equation and . Then Theorem 2 is proved.
Proof of Corollary 3. We define and as
For the following optimization problem
where is a constant for a given and , and is monotonic continuous function. According to Theorem 2, when , maximal value is achieved. We set for any and denote ; the solution to problem in (A.4) is
We denote ; can be written as follows:
where and . It is shown that there is a maximal value for any given in (A.4); thus, the maximal value is a function of and is denoted by . is also a function of and is denoted by . Consider
Therefore, for given typeplacement and , if and satisfies (A.6), is achieved since is achieved. Then Corollary 3 is proved.
Proof of Corollary 4. Firstly is expressed by
where is a small constant. Assuming that leads to and leads to , where , then .
Then of in (A.7) can be rewritten as
According to Corollary 3, maximization problem is written as
Since is a constant, and is monotonic continuous function. According to Theorem 2, when , is achieved. We set for any and denote ; then it has
And can be rewritten as a function of as follows:
Therefore, for given , if a and its satisfies formula above, is achieved. Then Corollary 4 is proved.
Conflict of Interests
The authors declare that there is no conflict of interests regarding the publication of this paper. The authors have no financial and personal relationships with other people or organizations that can inappropriately influence our work; there is no professional or other personal interest of any nature or kind in any product, service, and/or company that could be construed as influencing the position presented in or the review of this paper.
Acknowledgments
This paper is supported by the National Natural and Science Foundation of China (nos. 61003052 and 61103007), Natural Science Research of the Education Department of Henan Province (nos. 2010A520008, 13A413001, and 14A520018), Henan Provincial Key Scientific and Technological Plan (no. 102102210025), Program for New Century Excellent Talents of Ministry of Education of China (no. NCET120692), Doctor Foundation of Henan University of Technology (nos. 2012BS011 and 2013BS003), and Plan of Nature Science Fundamental Research in Henan University of Technology.