Professional Documents
Culture Documents
Dispatcher
Requests
R
e
q
u
e
s
t
q
u
e
u
e
VM repository
Dispatcher
Requests
App
1
App
M
App
2
R
e
q
u
e
s
t
q
u
e
u
e
VM repository
Dispatcher
Requests
R
e
q
u
e
s
t
q
u
e
u
e
VM repository
and
is denoted as
()
. Specially, when
= ,
()
and
be the number
of initially reserved class- VMs at
.
Suppose that there are types of multimedia applications.
For each application, different classes of VMs have different
processing speed. Let
may be from
two different users, the inter-arrival time can be modeled
as an exponential random variable [5]. Therefore, the initial
arrivals of type- application requests at
follow a Poisson
distribution with an average of
()
to
=1
()
can be formulated as
()
=1
()
()
.
For type- application at
, let
()
and
()
denote
the number of allocated class- VMs in the reservation scheme
and the on-demand scheme, respectively. We will propose the
optimal resource allocation scheme to determine the optimal
workload assignment
()
()
and
()
=1
=1
=1
()
=1
=1
=1
()
, i.e.
()
=
()
+
()
.
450
At
,
(
()
+
()
)
class- VMs work together as
the class- virtual cluster to process type- requests with the
service rate of
(
()
+
()
()
=
(
()
+
()
=1
(
()
+
()
()
+
()
()
()
< (
()
+
()
is
given by
()
=1
()
(
()
+
()
()
()
.
Since the workload can be dynamically redirected to other
sites for service, we have to consider the transmission delay.
Let
()
= {
()
()
. If
requests from the furthest data center can be satised, other
requests demands will be satised. Thus, the transferring time
()
is given by
()
= max{
()
()
}.
Based on the above analysis, the service response time
()
can be formulated as
()
=
()
+
()
=1
()
(
()
+
()
()
()
+ max{
()
()
}.
At each data center, the total number of allocated class-
VMs in the reservation scheme should be no more than the
number of initially reserved class- VMs. The constraints can
be formulated as
=1
()
.
Based on the above analysis, we can formulate the optimal
resource allocation problem in multi-site cloud as follows.
Minimize
{
()
,
()
,
()
=1
=1
=1
()
=1
=1
=1
()
subject to
=1
()
(
()
+
()
()
()
+max{
()
()
()
()
< (
()
+
()
=1
()
= 1,
=1
()
,
(1)
where
=
(
1
+
()
and
()
=
(
1
+
()
, where
()
and
()
in
the reservation and on-demand schemes, respectively. If the
request is served at local site (i.e. at
=
1
()
and
()
=
1
()
. The unit
cost represents the cost-performance ratio by using one class-
VM instance to serve one type- application request. In the
greedy algorithm, we are seeking to place requests on VMs
with the minimum unit cost to achieve the most economic
expenditure. The proposed greedy algorithm is presented in
Algorithm 1.
Algorithm 1 Greedy Algorithm in Multi-site Cloud
1: for each
do
2: Initialize
()
,
()
} and set
()
=
{
()
1
, . . . ,
()
}, in which
()
=
()
represents
the unprocessed type- application requests.
3: Sort unit cost set in ascending order.
4: repeat
5: Select the minimum
()
( = or ).
6: if
()
()
) as long as
1
()
()
+
()
and
()
=
()
and
()
=
()
.
8: else if
()
until
1
()
()
+
()
is satised. Update
()
=
()
+
()
.
10: end if
11: until all requests have been processed.
12: end for
13: Calculate the total resource cost
()
=1
=1
=1
()
=1
=1
=1
()
=
()
()
.
451
0
500
1000
1500
2000
2500
3000
3500
4000
4500
5000
1 2 3 4 5 6 7
M
e
a
n
r
e
q
u
e
s
t
a
r
r
i
v
a
l
r
a
t
e
(
r
e
q
u
e
s
t
s
/
s
)
Time slot
Data Center 1
Data Center 2
Data Center 3
Fig. 2. Mean request arrival rate at
each data center.
0
10
20
30
40
50
60
1 2 3 4 5 6 7
R
e
s
o
u
r
c
e
c
o
s
t
(
d
o
l
l
a
r
s
)
Time slot
Greedy algorithm
Optimal resource allocation scheme
Fig. 3. Comparison of resource cost
between optimal resource allocation
scheme and greedy algorithm.
V. EXPERIMENTAL EVALUATION
A. Parameter Settings
We perform simulations to evaluate the proposed optimal
resource allocation scheme. Amazon EC2 [7] is one of the
most popular clouds allowing application providers to deploy
services. To make our evaluation convincible, we simulate on
three geographically distributed Amazon data centers, in which
data center 1 (
1
) is located at Asia Pacic region Tokyo, data
center 2 (
2
) is located at EU region Ireland, and data center
3 (
3
) is located at US region East Virginia. Three classes
of VM instances are tested, including small capacity, large
capacity, and extra large capacity. The detailed VM instance
conguration and price rates can be found from [7]. The
application providers supply three multimedia applications.
The service rates of different VMs are relative to the number of
Amazon EC2 compute units, which can be referred to [8]. The
service response time requirements are ={0.4s, 0.6s, 0.8s}.
The arrivals of users requests vary with time.
B. Experimental Results
We rst compare the resource cost between the proposed
optimal resource allocation scheme, in which the VMs and
workload assignment are optimized by solving the resource
optimization problem (1), and the proposed greedy algorithm
in multi-site cloud. The optimal resource allocation scheme
is the global optimal solution but slow to execute, while the
greedy algorithm is sub-optimal but lightweight and efcient.
The mean request arrival rate in each data center is shown
in Fig. 2. The corresponding resource cost between the op-
timal resource allocation scheme and the greedy algorithm
is compared in Fig. 3. From Fig. 3, we can see that the
optimal resource allocation scheme can achieve a lower cost
compared to the greedy algorithm under the same workload.
The greedy algorithm only considers the current minimal unit
cost, while the optimal scheme searches the whole feasible
region to reach the global optimum. In Fig. 3, the maximal
difference of resource cost between the two schemes are 4.2
dollars at the 4th time slot.
We also evaluate the performance of workload balancing. At
the 4th time slot in Fig. 2,
1
and
2
have light workload,
while
3
reaches a peak of 4000 requests/s. By applying the
proposed optimal resource allocation scheme, the workload is
balanced as shown in Fig. 4. From Fig. 4, we can nd that
Fig. 4. Workload assignment in
multi-site cloud at the 4th time slot.
3,000 4,000 5,000 6,000 7,000 7,500
10
20
30
40
50
60
Mean request arrival rate (requests/s)
R
e
s
o
u
r
c
e
c
o
s
t
(
d
o
l
l
a
r
s
)
Optimal resource allocation scheme
Greedy algorithm
Isolated approach [4]
Fig. 5. Comparison of resource
cost among optimal resource alloca-
tion scheme, greedy algorithm, and
isolated approach in [4]
1
and
2
process 100% of their local requests and help
3
to serve 30% and 17% of requests, respectively. In such way,
3
can redirect workload to other two data centers to avoid
the local congestion.
We compare the resource cost among the proposed optimal
resource allocation scheme, the greedy algorithm, and the
isolated approach in our previous work [4]. The isolated
approach in [4] optimizes VM allocation in each data center
to minimize the resource cost, without considering the global
workload balancing. Fig. 5 shows the comparison result when
the request arrival rate increases from 3000 to 7500 requests/s.
From Fig. 5, we can nd that the proposed optimal resource
allocation scheme achieves a lower resource cost compared to
the greedy algorithm and the isolated approach in [4].
VI. CONCLUSION
In this paper, we study the optimal resource allocation prob-
lem for multimedia application providers. Based on the SaaS
architecture and the resource allocation model, we propose
the optimal resource allocation scheme in multi-site cloud. In
the proposed scheme, we jointly optimize the global workload
assignment and the local VM allocation to achieve the minimal
resource cost under the service response time requirements.
Moreover, we propose a greedy algorithm to efciently allo-
cate resources in a practical way. The experimental results
demonstrate that the proposed optimal resource allocation
scheme can effectively achieve the minimal resource cost for
multimedia application providers.
REFERENCES
[1] X. Nan, Y. He, and L. Guan, Optimal resource allocation for multi-
media cloud based on queuing model, in Proc. of IEEE Workshop on
Multimedia Signal Processing (MMSP), pp. 16, 2011.
[2] S. Chaisiri, B. Lee, and D. Niyato, Optimal virtual machine placement
across multiple cloud providers, in Proc. of IEEE Services Computing
Conference, pp. 103110, 2009.
[3] K. Bouyoucef, I. Limam-Bedhiaf, and O. Cherkaoui, Optimal allocation
approach of virtual servers in cloud computing, in Proc. of IEEE Next
Generation Internet, pp. 16, 2010.
[4] X. Nan, Y. He, and L. Guan, Optimal allocation of virtual machines
for cloud-based multimedia applications, in Proc. of IEEE Workshop on
Multimedia Signal Processing, pp. 175180, 2012.
[5] D. Cross and C. Harris, Fundamentals of queuing theory, John Wily
and Sons, 1998.
[6] J. Karlof, Integer programming: theory and practice. CRC Press, 2006.
[7] Amazon ec2. [Online]. Available: http://aws.amazon.com/ec2/
[8] Amazon ec2 benchmark. [Online]. Available: http://www.phoronix.com/
452