You are on page 1of 10

A New Game Theoretical Resource Allocation

Algorithm for Cloud Computing

Fei Teng and Frederic Magoules

Applied Mathematics and Systems Laboratory


Ecole Centrale Paris
92295 Chatenay-Malabry Cedex, France
fei.teng@ecp.fr

Abstract. Cloud computing and other computing paradigms share the similar
visions which aim to implement parallel computations on large distributed
resources. However, this cloud computing is more involved in purchasing and
consuming manners between providers and users than others. So how to allocate
resources reasonably to cater requirements from both sides attracts wide atten-
tions. Based on game theory, we introduce a new Bayesian Nash Equilibrium Al-
location algorithm to solve resource management problem in cloud computing.
This algorithm fully considers several criteria such as the heterogeneous distribu-
tion of resources, rational exchange behaviors of cloud users, incomplete common
information and dynamic successive allocation. Compared to former researches,
experimental results presented in this paper show that even though rivals infor-
mation is uncertain, cloud users can receive Nash equilibrium allocation solutions
by gambling stage by stage. Furthermore, the resource price evaluated by the al-
gorithm will converge to the optimal price at the end of the gambling sequence.

Keywords: cloud computing, resource allocation, game theory, Nash equilib-


rium.

1 Introduction
From 2007, the term cloud computing becomes one of the most buzz words in IT indus-
try, which implies computing is not only operated on local computers, but on centralized
facilities by third-party compute and storage utilities. It refers to both the applications
delivered as services over the Internet and system hardware and software in datacenter
as service provider [1]. Recently, heaps of industry projects have been started includ-
ing Amazon Elastic Compute Cloud, IBM Blue Cloud, and Microsoft Windows Azure.
Meanwhile, HP, Intel and Yahoo have announced the creation of a global, multi-data
center, open source cloud computing testbed for industry, research and education. The
father of grid computing, I. Foster, explains the ambiguous cloud in such a way A
large-scale of distributed computing paradigm that is driven by economies of scale,
in which a pool of abstracted virtualized, dynamically-scalable, managed computing
power, storage, platforms, and services are delivered on demand to external customers
over the Internet[2]. From this definition, we can conclude several key points which
differ cloud from other distributed computing paradigms, such as hardware virtualiza-
tion, dynamic provision, web service negotiation and economies of scale[3]. These new

R.-S. Chang et al. (Eds.): GPC 2010, LNCS 6104, pp. 321330, 2010.

c Springer-Verlag Berlin Heidelberg 2010
322 F. Teng and F. Magoules

characters inspire researchers and engineers to reconsider the resource allocation algo-
rithms on the cloud system.
In cloud computing, resource allocation refers to allocate CPUs and other network
resources among various cloud consumers. Global users and resources hold their own
supply and demand strategies, so market mechanism turns out to be appropriate to man-
age resource in such complex distributed environments[4]. Popcorn[5] utilizes virtual
currency for users submitting tasks to a centralized server, while Walras [6] achieves a
convergent distributed implementation of equilibrium theory, in which customers bid ac-
cording to their own price functions to match supply and demand. Besides, the Cloudbus
[7] provides a service brokering infrastructure and a core middleware for deploying ap-
plications in the datacenter to realize the vision of global cloud computing marketplace.
The mentioned frameworks above can support conceptual environments for grid or
cloud resource allocation, but the shortcomings come from lacking of overall equi-
librium utility and optimization from the point of view of consumers. Therefore we
introduce game theory to solve resource allocation problem in cloud environment. The
resource allocation strategies based on Nash equilibrium are inclined to analyze how
these selfish and rational users make decisions. For individual, the best choice depends
on others behaviors [8]. Khan and Ahmad [9] are committed to simple game theoretic
allocation scheme comparison with different design rationales: noncooperative, semi-
cooperative and cooperative. R.T. Maheswaran and J. Bredin [10] develop decentralized
negotiation strategies which, with appropriate relaxation, converge to Nash equilibrium.
B. An [11] presents a proportional resource allocation mechanism for multi-agent sys-
tem and gives game theoretical analysis. A. Galstyan [12] studies a minimalist decen-
tralized algorithm for resource allocation in grid environment focusing on scattered
distribution and robust performance.
However, when an auction is proceeding in a real market environment, one bidder
does not know how much others would like to pay for the computing resource. We
therefore seek to accomplish a new allocation algorithm named Bayesian Nash Equi-
librium Allocation (BNEA) in cloud system to address the above challenge. Meanwhile
we will combine new important features of cloud computing. For example, large-scale
users participate in the auction separately with imperfect information, and the selfish
but rational users dynamically bid for their sequential tasks. This algorithm not only
allows users to adjust next bids automatically, but also makes bidding price converge to
Nash equilibrium to realize Pareto efficient situations in the end.
The rest of the paper is organized as follows. Section 2 we derive mathematical the-
oretical results in the bid-proportion auction model without complete information. In
section 3, a new BNEA algorithm is given, which is applicably designed for multi-
user and multi-task cloud environment. Section 4 illustrates cloud computing simula-
tion framework and experimental scenario, while experimental results are provided and
analyzed. Conclusion will be offered in the last section.

2 Game Theoretical Resource Management

In cloud computing, it is rare that computational resources are allocated totally to a


single user. What we expect is that resources will be shared in the cloud datacenter.
A New Game Theoretical Resource Allocation Algorithm for Cloud Computing 323

In the text, we will focus discussion on bid proportion auction model where resources
are allocated to users in proportion to their bids, which is better fit for the large-scale
sharing resources problem.

2.1 Bayesian Nash Equilibrium


The bid-proportion auction model assumes K types of resources C = [C1 , C2 , . . . , CK ]
in computational cloud market, each resource offers a specific service corresponding to
a specific job type. There are N users competing for K resources to finish their jobs.
Each job is composed by a set of sequent subtasks qki , which stands for the task size
in job sequence. i th user bids for k th task at price bik . Total bids for k th task is
 N j
k = N i i
i=1 bk , while k = j=i bk is given as the sum of other bids except i th
i
users bk .
For i th user, it is given finite budget E i , and time and cost taken to complete k th
task are defined by
q i k q i (bik + ki )
tik = k i = k
Ck bk Ck bik
qki k q i (bik + ki )
eik = = k (1)
Ck ck
Smart customers in cloud market always wish to pay less for better service, so free mar-
ket aggravates competitions among different users. Game theory can offer the density
of the whole system, which is an equilibrium solution among all participants. Now we
clarify the optimization object that cloud customers want complete their tasks as fast as
possible with finite budgets. Particularly for i th user, it cant exceed given E i when it
attempts to minimize the total time taken to finish all tasks.
K
 K

min tik s.t. eik E i (2)
k=1 k=1

The Hamilton equation is built by introducing the Lagrangian


K
 K
L= tik + i ( eik E i ) (3)
k=1 k=1

Taking partial derivative with respect to bik , the fist-derivative condition is set to zero.
L qki ki i qki
i
= i 2
+ =0 (4)
bk Ck (bk ) Ck
i
We then have i = (bik )2 , so the relationship between any two bids is expressed as
 k
i
k
bk = bj i . Taking partial derivative with respect to i and substituting of bik by bi1
i i
j

using the relationship between two bids, we obtain



K
L q1i i i qk
i ki i i i
= (b 1 + 1 ) + ( i b1 + k ) E = 0 (5)
i C1 Ck 1
k=1
324 F. Teng and F. Magoules

Degenerating the above equation, i th user will bid for its k th task
k1 qji i i
qk i K qji
i
Ei j=1 Cj j C k k j=k+1 Cj j
bik =   (6)
k1 qji ji i
qk K qji
ji
j=1 Cj i
k
+ Ck + j=k+1 Cj i
k

, , i ) containing K parameters. We suppose


bik is a function fki (1i , , k , k+1
i
K
that every user holds its own bidding function B i , which decides the users bid price.
Bid bik is considered as a sample for B i . Here we take p(B i ) N (i , 2 ) distributed
normally for instance, with mean i and variance 2 . For these N independent users
B 1 B N , according to the normal distribution properties, their liner combination is
also normally distributed.
2
p() N (all , all )
N i
all = i=1 (7)
2
all = N 2
Under imperfect information scenario, each user knows well its own bidding func-
tion, that is to say i is known, while has no idea about others distribution parameters

j , j = i. all is estimated as all = k1 kj=1 j . Furthermore, k is one of sam-
ple distributing normally N (, 2 ) where is unknown and 2 is known. In probability
theory, Bayes theorem explains how the probability of a hypothesis given observed ev-
idence depends on its inverse, so the posteriori distribution can be calculated from the
priori p() and the likelihood function p(k | )

p(k |) p()
p(|k ) =  (8)
p(k |) p() d

Especially, the normal distribution is conjugate to itself, so we have p(|k )


N (k , k2 ). The posteriori hyperparameters are achieved by Bayesian learning
mechanism.  k
all
j
2
all
+ j=1
2
k = 1 k
k 1, , K (9)
2
all
+ 2

With the maximum likelihood prediction value of resource price, all unknown variables
are estimated as follows

ji = j i j k + 1, , K (10)

After substituting ki = k bik and introducing the following three parameters


k1 qji i K qji
i
ik = E i j=1 Cj j j=k+1 Cj j
i
qk
ki = (11)
Ck 
k1 qji  i K
ji
qji
ki = j=1 Cj j + j=k+1 Cj
A New Game Theoretical Resource Allocation Algorithm for Cloud Computing 325

We obtain the explicit function fki (k , ik , ki , ki ) of bik


 
i i i i i (ik ki k )2 4(ki )2 k
bk = fk (k , k , k , k ) = 2( i )2
1 + 1 + (ik ki k )2
k (12)
ik
k (0, ki
)

i
According to equation (12), ki stands for the remaining budget of the current task. If
k
the total bid k exceed the range, the user will quit auction and bid zero.

2.2 Numerial Analysis


In this section, we will analyze bidding strategies from mathematical expressions,
putting emphasis on the influences from budget, the number of competitors and bal-
ance of inter-sequence tasks.
Figure 1 firstly illustrates that the number of participated users has a huge impact on
bid price. With more and more users joining in the competition, the curve is softened,
while the participated bid range shrinks. For example, when there are two users in the
system, the i th user bid is approximately close to the total resource utilization, however,
when eight users try to access datacenter, each user gets very limited resource.
From equation (12), we can conclude that any bid is not only decided by the partic-
ipated users, but also by the whole tasks sequence. If future task load turns to heavier,
the current bid will decrease. The second sub figure displays a user under heavy stress
of others bids. It gives smaller bid than before when budget and auction participants
are unchanged, because it has to save more money for future tasks. The third sub figure
implies how the best response fluctuates as the user becomes wealthier. Growing budget
allows user to submit a larger positive bid, that is to say, it will have more rights to make
decisions. This result is well fit to market reality, which means a companys financial
capability will decide its market share.
In addition, observing the above three figures, we clarify external factors (number of
users, sum of other bids) affect bid function more strongly than internal factors (budget,
task size), because the change rates are steep in the former two pictures.
Returning to the choice of equilibrium strategy for all users, Figure 2 supplies us the
equilibrium solutions for dynamic bid system. The slope one means sum of all bids.
Obviously, in order to achieve optimum utilization, the bids sum on k th task should

5 5 6

4 4 5

4
f(k,k,k,k)

f(k,k,k,k)

f(k,k,k,k)

3 3
3
2 2
2
1 1 1

0 0 0
8 4 20
6 10 3 10 15 10
8 8 8
4 6 2 6 10 6
2 4 1 4 5 4
2 2 2
userNo 0 0 otherBids 0 0 budget 0 0
k
k k

Fig. 1. Bid tendency fluctuated by number of rivals, future bids and budget
326 F. Teng and F. Magoules

10

f(k,k,k,k)
6

0
8
6 100
80
4 60
2 40
20
userNo 0 0

k

Fig. 2. Equilibrium floated by number of users


equal k . So the intersection of k and f (k ) represents the only stable solution
among the set of possible bids. From Figure 2, we find how the final resource price
fluctuates by different number of users. The increasing amount of competitors uplifts
resource price and makes resource be scarcer, so the resource price is soaring. Once the
price is too high to exceed users ability, customers could not shoulder and will quit the
competitive bidding. The resource price will consequently decrease more quickly, and
equilibrium point will be archived earlier than before.

3 Resource Allocation in Cloud Computing

Combining unique features of cloud-based infrastructures and co-hosted virtualized ser-


vices on datacenter, we propose a new Bayesian Nash equilibrium Allocation (BNEA)
algorithm in cloud computing system.
The participants are generally classified to three categories: user, auctioneer and dat-
acenter. Users who are self-interested and rational bid in terms of their own demand and
price functions in the market. Auctioneer is the mid-person who takes charge of receiv-
ing the datacenter register information and collection of users task queues. Meanwhile,
it will try to cater users needs and make the system achieve the maximum utilization.
Datacenters integrate distributed hardware, database, storage devices, application soft-
ware and operating system to build a resource pool and virtualizes applicable computing
resources according to users requirements.
Algorithm 1 explains how the BNEA introduces game theory in cloud resource allo-
cation. Datacenter first initialize available service providers. Furthermore, it generates
a provision information and register in auctioneer. At the same time, cloud users, such
as business companies, research organizations or individual customers, queue their task
sequences in auctioneer. For simplifying gambling process in game, here we only con-
sider that all cloud users compete for the same type of job which consists of same set of
tasks in a given sequence. Next, auctioneer informs datacenter to create different kinds
of virtual resources according to users service requirements and then create several suc-
cessive auctions. In every auction stage, auctioneer should build contact between users
and resource. From auctions aspect, it firstly initializes the sum of bids, which stands
A New Game Theoretical Resource Allocation Algorithm for Cloud Computing 327

Algorithm 1. Bayesian Nash Equilibrium Allocation


Require: N 2
1: datacenter registers in auctioneer
2: cloud users submit tasks to auctioneer
3: auctioneer informs datacenter to virtualize K kinds of resources according to task types
4: auctioneer creates K auctions
5: for all auction k do
6: initialize resource scarcity k = 0
7: initialize bidding upper bound upBoundk =
8: repeat
9: bid for task k with the price bik
10: until all cloud users finish bidding 
11: auction k receive sum of bids N i
i=1 bk
12: for all cloud user i do
13: {bi1 , , bik1 } bik
1
k1
14: estimate all = k1 i=1 k1
15: Bayesian learn and estimate {k+1 , , K }
16: calculate {1i , , k1i
}, ki = k bik
17: estimate {i , ,
i
}, i = i
k+1 K k k
18: calculate coefficient set {ik , ki , ki }
19: build new bid function fki (k , ik , ki , ki ), and send it to auction k
i
20: update upBoundk = min( ki )
k
21: end for
22: receive all the bidding
N functions {fk1 , , fki , , fkN }
i
23: search for k = i=1 fk , k {0, upBoundk }
24: update {1 , , k1 } k
25: for all cloud user i do
bi
26: auction k send resource in kk proportion to cloud user i
27: end for
28: end for

for the resource scarcity. Besides, if the bound for the reasonable bid is too narrow, some
poor users will quit the gambling. After all the users finish bidding, the auction collects
them and calculates the sum as the resource initial price. As a game participant, cloud
user only knows its price function, as well as the common knowledge of incurred bid
sums. According to mathematics analysis in last section, the difficulty exists how cloud
user estimates the bid sums for future auctions under the incomplete information con-
dition. We use Bayesian learn mechanism to dynamically update price functions. Next,
holding all users price functions, auction could search the Nash equilibrium allocation
scheme by bisection method in the assigned bound. Finally, auction allocates resource in
balanced proportion which satisfies no one can benefit by changing its bid unilaterally.

4 Cloud Simulation Result


Building cloud experiment testbed on real infrastructure is so expensive and time con-
suming that it is impossible to evaluate the performance of various usage and resource
328 F. Teng and F. Magoules

scenarios in a repeatable and controllable manner [13]. We therefore utilize a gener-


alized simulation framework, Cloudsim [7], to emulate the cloud-based infrastructures
and application service. It extends from another popular grid simulator Gridsim [14],
which is widely used in research of economy driven resource management policies on
large scale distributed computing systems.
To model the resource datacenter, variation of CPU processors, storages, bandwidths,
operation systems, virtualization standards and machine locations are considered when
we initialize the heterogeneous computing resources configuration. To model cloud
consumers, application tasks are created, including all information related to task exe-
cution management details such as tasks processing requirements, expressed in MIPS,
disk I/O operations and the size of input files.
We choose eight users competing for the similar job. Each job is composed of 80 sub-
tasks that will be processed sequentially. All these users bid according to their economic
capabilities and priorities under constrained budgets. The priority can be signified by
bidding mean price which distribute uniformly from 10 $/s to 45 $/s. The bidding func-
tions follow normal distributions, variance parameters of which are taken 0.01, 0.1 and
1.0 respectively. All the users have no idea about others economic situations, but will
keep on estimating them from prior behaviors.
All these eight bidders behaviors under indulgent budgets are examined firstly. The
solid lines represent the situations where common knowledge are well known for all
the competitors. That is to say, each user holds other bids in hand, so it can adjust its
behavior exactly.
Figure 3 points out that the rich bidders would like to improve their current payment
to get a larger allocation to execute their jobs as fast as possible. Competition leads
equilibrium price rising, higher than the anticipated cost. That is why the equilibrium
price is higher than the mean price in the beginning. However, with available money for
current task decreasing consumers turn to be less aggressive. Finally, all bid prices will
converge to their original mean bids and equilibrium is achieved in the whole system.
When the common knowledge is incomplete, users experientially estimate others bid-
ding functions using those previous equilibrium prices. If the bidding fluctuate slightly
with variance equals 0.01, the BNEA algorithm has little difference in resource allo-
cations from the perfect model proposed by Bredin[15]. If users bid unstably, accurate
forecasting turns to be more difficult because of bidding fluctuation. Simulation results
show that resource allocation converges gradually to the optimal equilibrium allocation
as long as the reliefs are trained repeatedly in the sequential games.

80 80 80
1 = 10
70 2 = 15 70 70
3 = 20
4 = 25
60 5 = 30 60 60
6 = 35
7 = 40
equilibrium price

equilibrium price

equilibrium price

50 50 50
8 = 45
40 40 40

30 30 30

20 20 20

10 10 10

0 0 0
0 10 20 30 40 50 60 70 80 0 10 20 30 40 50 60 70 80 0 10 20 30 40 50 60 70 80
gambling sequence gambling sequence gambling sequence

Fig. 3. Bid prediction with variance = 0.01/0.1/1 under indulgent budget


A New Game Theoretical Resource Allocation Algorithm for Cloud Computing 329

50 50 60
1 = 10
45 2 = 15 45
3 = 20 50
40 4 = 25 40
5 = 30
35 6 = 35 35
40
7 = 40
equilibrium price

equilibrium price

equilibrium price
30 30
8 = 45
25 25 30

20 20
20
15 15

10 10
10
5 5

0 0 0
0 10 20 30 40 50 60 70 80 0 10 20 30 40 50 60 70 80 0 10 20 30 40 50 60 70 80
gambling sequence gambling sequence gambling sequence

Fig. 4. Bid prediction with variance = 0.01/0.1/1 under austere budget

When consumers funds are insufficient, they suffer the limitation of austere budgets.
One consequence is that all the bidders show more cautions at first, because they have
to save enough money to complete remaining tasks. Along with better understanding
about its rivals, each user eyes for the whole chess-board. Finally, the equilibrium re-
sponses will reach the original mean price. Figure 4 reveals that the equilibrium prices
fluctuate in the gambling games. Compared to Figure 3, if users are poor, bid prices es-
calate progressively till converges are achieved. Instability will bring similar influence
on estimation accuracy under austere budget condition.

5 Conclusion
This research investigates game theoretical scheme for cloud resource allocation. We
analyze the bid proportion model proposed by Bredin[15], and evolve the model from
perfect information to a stricter condition that concerns the lack of common knowledge
among large-scale distributed cloud users. By introducing Bayesian learning mecha-
nism, we derive that Nash equilibrium solution exists among all the possibilities prices,
which means no one can get a better benefit without damaging others.
In addition, we propose a general algorithm which is well suited to cloud comput-
ing scenario. Furthermore, the performance of the proposed approach is evaluated by
Cloudsim experimentation. Simulation results show that BNEA algorithm is effective
and easily implemented. By sequent gambling stage by stage, cloud users can learn
quickly from prior allocation results, and resource price converges to the optimal equi-
librium price. The conclusion demonstrates that the BNEA algorithm could satisfy het-
erogeneous demands of cloud consumers and is a potential feasible method for optimal
resource allocation in cloud computing.
In this proportion model resource price is fixed totally by bidders, so we should
reconsider that resource supplier participates in price setting. Besides, generalization
of price prediction mechanisms and response delay problems are some issues to be
addressed in the future.

References
1. Armbrust, M., Fox, A., Griffith, R.: Above the clouds: A berkeley view of cloud comput-
ing. Technical Report UCB/EECS-2009-28, EECS Department, University of California,
Berkeley (2009)
330 F. Teng and F. Magoules

2. Foster, I., Zhao, Y., Raicu, I., Lu, S.: Cloud computing and grid computing 360-degree com-
pared. In: Grid Computing Environments Workshop, pp. 110 (2008)
3. Teng, F., Magoules, F.: Future of Grids Resources Management. In: Fundamentals of Grid
Computing: Theory, Algorithms and Technologies, pp. 133153. Chapman & Hall/CRC,
Boca Raton (2009)
4. Tan, Z., Gurd, J.R.: Market-based grid resource allocation using a stable continuous dou-
ble auction. In: 8th IEEE/ACM International Conference on Grid Computing, pp. 283290
(2007)
5. Regev, O., Nisan, N.: The popcorn market an online market for computational resources.
In: Proceedings of 1st International Conference on Information and Computation Economies,
pp. 148157. ACM Press, New York (1998)
6. Qin, C., Shapley, L., Shimomura, K.: The walras core of an economy and its limit theorem.
Journal of Mathematical Economics 42(2), 180197 (2006)
7. Buyya, R., Ranjan, R., Calheiros, R.N.: Modeling and simulation of scalable cloud comput-
ing environments and the cloudsim toolkit: challenges and opportunities. In: Proceedings of
the 7th High Performance Computing and Simulation Conference, Leipzig, Germany, IEEE
Press, Los Alamitos (2009)
8. Li, Z.j., Cheng, C.t., Huang, F.x.: Utility-driven solution for optimal resource allocation in
computational grid. Computer Languages, Systems and Structures 35(4), 406421 (2009)
9. Khan, S., Ahmad, I.: Non-cooperative, semi-cooperative, and cooperative games-based grid
resource allocation. In: Parallel and Distributed Processing Symposium, vol. 0, p. 101 (2006)
10. Maheswaran, R.T., Basar, T.: Nash equilibrium and decentralized negotiation in auctioning
divisible resources. Group Decision and Negotiation 13(2003) (2003)
11. An, B., Miao, C., Shen, Z.: Market based resource allocation with incomplete information. In:
Proceedings of the 20th International Joint Conference on Artifical Intelligence, pp. 1193
1198. Morgan Kaufmann Publishers Inc., San Francisco (2007)
12. Galstyan, A., Kolar, S., Lerman, K.: Resource allocation games with changing resource ca-
pacities. In: Proceedings of the International Conference on Autonomous Agents and Multi-
Agent Systems, pp. 145152. ACM Press, New York (2002)
13. Gustedt, J., Jeannot, E., Quinson, M.: Experimental validation in large-scale systems: a sur-
vey of methodologies. Parallel Processing Letters 19, 399418 (2009)
14. Sulistio, A., Cibej, U., Venugopal, S., Robic, B., Buyya, R.: A toolkit for modelling and
simulating data grids: an extension to gridsim. Concurrency and Computation: Practice &
Experience 20(13), 15911609 (2008)
15. Bredin, J., Kotz, D., Rus, D., Maheswaran, R.T., Imer, C., Basar, T.: Computational markets
to regulate mobile-agent systems. Autonomous Agents and Multi-Agent Systems 6(3), 235
263 (2003)

You might also like