# Energy Efficient Multiresource Allocation of Virtual Machine Based on PSO in Cloud Data Center

Authors: An-ping Xiong; Chun-xiang Xu
Journal: Mathematical Problems in Engineering
 (2014)

---

## Abstract

Presently, massive energy consumption in cloud data center tends to be an escalating threat to the environment. To reduce energy consumption in cloud data center, an energy efficient virtual machine allocation algorithm is proposed in this paper based on a proposed energy efficient multiresource allocation model and the particle swarm optimization (PSO) method. In this algorithm, the fitness function of PSO is defined as the total Euclidean distance to determine the optimal point between resource utilization and energy consumption. This algorithm can avoid falling into local optima which is common in traditional heuristic algorithms. Compared to traditional heuristic algorithms MBFD and MBFH, our algorithm shows significantly energy savings in cloud data center and also makes the utilization of system resources reasonable at the same time.


---

## Body

## 1. Introduction

With the fast development of cloud computing [1, 2], energy consumption is significantly increasing along with the explosive growth of cloud data center. Many reports have shown that computers consume more than 8% of the total energy produced [3], which becomes an escalating threat to the environment. In this situation, high-level energy efficiency in cloud data center is widely studied to reduce energy consumption by researchers all over the world.There are two reasons which resulted in high energy consumption in cloud data center: one is rapid increasing of computers as well as the number of cloud users, which results in a significant amount of energy consumed by cloud data center due to their massive sizes [4, 5]; another reason is that resources allocation is not reasonable in cloud computing. Resources (such as CPU, disk, memory, and bandwidth) allocation becomes a key problem which needs to be resolved, as unreasonable resources allocation can cause more energy consumption in cloud data center [6–12]. Because resources allocation algorithm with high energy efficiency can greatly reduce the energy consumption, it has been widely studied in the field of cloud computing.There are three broad goals in the problem of energy efficient resources studies [3]: (1) reduce in quality of service reasonable and minimize energy consumption; (2) given a total energy, maximize the performance; (3) make the performance and energy objectives simultaneously met. To be of practical importance, resources allocation in cloud data center is not only to reduce energy consumption but also to satisfy Quality of Service requirements or Service Level Agreements [12]. In cloud data center, virtualization technology plays an important role to satisfy the requirements of both energy and Quality of Service. Several servers are allowed to be consolidated to one physical node as virtual machine (VMs) by virtualization. This technology can greatly enhance the utilization of resources in applications [13, 14]. VMs allocation in cloud data center is generally viewed as a multidimensional bin packing problem with variable bin sizes and prices. The problem of determining optimal VMs allocations is NP-complete [15], and getting optimal resolution of VMs allocations is often computationally infeasible when the cloud computing has multiple hosts and customers [16].A lot of researches have been done in energy efficient VMs allocations in cloud data center [7–12, 17, 18]. Many heuristics policies such as Best Fit [12, 17], Best Fit Decrease (BFD) [7–10], and Modified Best Fit Decreasing (MBFD) [11] have been studied to find the approximate resolution for VMs allocations. Beloglazov et al. modified the Best Fit Decrease (BFD) algorithm and suggested a Modified Best Fit Decreasing (MBFD) algorithms [12, 19]. The solution which produces the least increase of energy consumption was found after VMs were sorted in decreasing order of their current CPU utilizations. This algorithm is implemented at heterogeneous hosts and VMs. However, the algorithms above only consider the energy efficiency of the CPU, rather than other resources such as disk, memory, and bandwidth. Once multiple resources in cloud data center are considered, the multidimensional bin packing problem tends to be more complicated. When resource requirements of VMs increase quickly, it is necessary to preserve free resources for hosts for preventing SLA violation. To satisfy the Quality of Service, some researchers set an upper utilization threshold for hosts and keep the total utilization of CPU below this threshold [12, 19]. Srikantaiah et al. study the relationship between energy consumption and resource utilization which focuses on two kinds of resource: CPU and disk, while a modified best fit heuristic algorithm [20, 21] (hereafter referred to as MBFH) is utilized for allocation. Note that here VMs are not sorted in decreasing order of current utilization in this MBFH. While keeping performance requirements satisfied, the authors analyse the utilizations of CPU and storage to minimize energy consumption in heterogeneous data center. As a result, the authors find the optimal balance between resource utilization and energy metrics reside around 50% on the CPU and 70% storage usage [20]. Inspired by the experimental results, the goal of energy conservation can be achieved via keeping the utilization of resource in an optimal utilization level. To minimize the total energy consumption, the number of active nodes should be reduced and the idle nodes should be turned off.Although the traditional heuristic algorithms may find a solution for VMs allocations for energy efficiency, they are easy to fall into local optimal solutions [7–12]. Other choices to solve the multidimensional bin packing problem include genetic algorithm (GA) and particle swarm optimization (PSO) algorithm. GA is adaptive heuristic search algorithm premised on the evolutionary ideas of natural selection and genetic [22, 23], while particle swarm optimization (PSO) is a population based stochastic optimization technique developed by Eberhart and Kennedy in 1995, inspired by social behaviour of bird flocking or fish schooling [22–24]. However, many studies illustrated that PSO algorithm is able to get the better solution than GA in distributed system and grid computing [25, 26]. The PSO algorithm also converges faster than GA [25]. So particle swarm optimization is a feasible algorithm to optimize the multiresources energy efficient allocations in cloud data center.In this paper, we focus on the virtual machine (VM) with multiresources allocation in cloud data center. A multiresource energy efficiency VMs allocation model is proposed. Based on the model and the particle swarm optimization (PSO), a multiresource energy efficiency based on particle swarm optimization (MREE-PSO) algorithm is designed and applied to VMs allocation for energy efficiency in cloud data center. This algorithm can be divided into three parts: (1) particles are generated by FF (First Fit) algorithm; (2) the trust function of individual optimal solution and the global optimal solution of particles were defined to guide particle evolution; (3) the fitness function of PSO is defined as the total Euclidean distance which represents the optimal balance between resource utilization and energy consumption. This algorithm can deal with multiresources energy efficient allocations in cloud data center. It avoids falling into local optimal solution which is the disadvantage of traditional heuristic algorithm simulation. Compared to two important traditional heuristic algorithms MBFD [11, 12, 19] and MBFH [20, 21], the MREE-PSO algorithm shows closer to the optical solution for the efficiency of system, and it also makes the utilization of system resources reasonable in cloud data center. The main contribution of this study: (1) PSO is introduced in VM allocation algorithms; (2) a multiresource energy efficiency VMs allocation model is proposed; (3) competitive analysis of dynamic VM allocation algorithms is shown.The remainder of this paper is structured as follows. In Section2, we review the related works about energy efficient VMs allocation. In Section 3, we provide a multiresource energy efficiency model. In Section 4, an energy efficient VMs allocation algorithm is designed based on particle swarm optimization (PSO). Section 5 provides the experimental simulation and evaluation with software tools CloudSim. Section 5 concludes the paper.


## 2. Related Works

Energy efficiency which is addressed by several researchers recently is one of the most important research issues. Such as the work of Ahmad about energy efficiency, system performance and energy consumption were firstly simultaneously optimized by game theoretical methodologies in large scale computing systems [3]. Then, a lot of researches have been done in energy efficiency models [4–8]. Energy efficiency is a mix of research issues related to large scale computing systems especially cloud computing.In cloud data center, one of the most crucial research problems is the energy efficiency of cloud computing [6–10]. Some hardware and software technologies have been developed to reduce energy consumption to a certain degree in cloud data center, for example, energy efficient computer monitors, low-power CPUs, scheduling and resource allocation, task consolidation, and so on.Virtualization technologies are a key component within task consolidation approach [13, 14]. Virtualization, in cloud computing, refers to the act of creating a virtual machine (VM). The main objection of virtualization technologies is improving the utilization of resources. In cloud data center, several servers are allowed to be consolidated to one physical node as virtual machine (VMs) by virtualization; several virtual machines (VMs) are also run on a single physical node.Many works have been developed in energy efficient VMs allocations recently. among these works, the researches of Srikantaiah et al. [20] and Beloglazov et al. [11, 12, 19] focus on traditional heuristic algorithms in energy efficient virtual machines (VMs) allocations.Srikantaiah et al. have studied the relationship between energy consumption and resource utilization which focuses on CPU and disk to minimize energy consumption. In this work, the authors explored the impact of workload consolidation on the energy-per-transaction depending on both the CPU and disk utilization. A modified best fit heuristic algorithm (MBFH) [20] was been proposed to achieve energy efficient virtual machines (VMs) allocation. The algorithm contains two steps: (1) find the optimal balance between resource utilization and energy metrics residing around 50% on the CPU and 70% storage usage; (2) the Euclidean distance between the current selection and the optimal point within each server was been used in the energy efficient resource allocation [20].Beloglazov et al. modified the Best Fit Decrease (BFD) algorithm and suggested a Modified Best Fit Decreasing (MBFD) algorithm [11, 12, 19]. In this work, the authors sort all virtual machines (VMs) in decreasing order of their current CPU utilizations and allocate each virtual machine (VM) to a physical node which provides the least increase of energy consumption. The Flowchart for the algorithm is shown in Figure 1. In MBFD algorithm, all VMs are sorted in decreasing order of current utilization. Then each VM is allocated to a host that provides the least increase of power consumption due to this allocation. The complexity of MBFD algorithm is n
*
m, where n is the number of VMs and m is the number of hosts.Figure 1
Flowchart of modified Best Fit Decreasing (MBFD) algorithm.


## 3. Multiresources Energy Efficient Allocation Model

In cloud data center, multiresources allocation problem can be described as a multidimensional bin packing problem with variable bin sizes and prices. Suppose thatN is the number of VMs that should be allocated, M is the number of hosts in cloud data center, the search space of heuristic algorithm is M
N, and the problem of computing optimal VMs allocations is NP-complete [15].The aim of allocation is to find the optimal energy efficient solution. Inspired by the study of Srikantaiah et al. [20], the consolidation status of multiresources significantly impacts the energy efficiency of the whole data center. Keeping the utilization of each resource in an optimal utilization level can achieve optimal energy conservation. Here, we define a total Euclidean distance δ as follows:
(1)
δ
=
∑
i
=
1
n
∑
j
=
1
d
(
u
j
i
-
u
best
i
)
2
,
where d is the dimension which denotes kinds of resources, such as CPU, disk, memory, and bandwidth and n denotes the number of hosts in cloud data center. u
j
i is the utilization for host j and the resource i, u
best
i is the best utilization for u
j
i energy efficient, and each kind of resource has its best value of utilization, such as 50% CPU and 70% storage usage, which is an important experimental result from the study of Beloglazov et al. [11, 12, 19].The total Euclidean distanceδ denotes the optimal balance between multiresources utilization and energy consumption. Minimizing the total Euclidean distance δ will get optimal energy efficiency in the whole system. In this situation, the multiresources energy efficiency model is described as follows:
(2)
objection:
min
⁡
δ
constraints:
x
h
j
=
0
(3)
∑
h
x
h
j
=
1
,
∀
j
,
where x
h
j
=
1 denotes virtual machine VMj allocated to node h; x
h
j
=
0 denotes VMj not allocated to node h
. And the expression (3) denotes that each VM can be allocated to only one node.In order to satisfy the limitations, each resource must satisfy the following inequality constraints as follows:(4)
∑
j
r
j
CPU
*
x
h
j
≤
c
h
CPU
,
∑
j
r
j
RAM
*
x
h
j
≤
c
h
RAM
∑
j
r
j
BW
*
x
h
j
≤
c
h
BW
,
∑
j
r
j
DISK
*
x
h
j
≤
c
h
DISK
.In expression (4), r
j
CPU
,
r
j
RAM
,
r
j
BW
,
r
j
DISK denotes the demand of CPU, memory, bandwidth, and disk for VM j, respectively; likewise, c
h
CPU
,
c
h
RAM
,
c
h
BW
,
c
h
DISK, respectively, denotes the capacity of these resources for VM j. If there are multiple VMs allocated on node h, the total resources demand of VMs should be smaller than the capacity of node h.


## 4. Allocation Algorithm Design and Implement Based on PSO

It has been successful to apply PSO in many applications and research areas [22, 24–26]. The particles of PSO constitute a swarm moving around in the search space looking for the best solution.In this section, we design and implement a MREE-PSO algorithm to reduce energy consumption for virtual machine allocation, and this algorithm can deal with multiple resources in cloud data center.


### 4.1. Particle Swarm Optimization (PSO) Algorithm

Particle swarm optimization (PSO) is a population developed by Eberhart and Kennedy in 1995 based on stochastic optimization technique [22–24]. Social behavior of organisms motivated them to look into the effect of collaboration of species onto achieving their goals as a group, such as fish schooling and bird flocking. PSO has been widely applied in many applications and research areas in past several years. Compared with other methods such as GA, it is proved that PSO gets better results in a cheaper and faster way.In PSO, the potential solutions are called particles which fly through the solution space by following the current optimum particles. Particles keep part of their previous state because they have memory. All particles preserve their individuality in any case, although they share the same point in belief space with no restriction. PSO algorithm evolves the position of each particle in problem space using (5). Each particle has an initial random velocity, and particle’s movement is influenced by two randomly weighted factors: individuality and sociality. Individuality is defined as the tendency to return to the particle’s best previous position and sociality is defined as the tendency to move towards the neighborhood’s best previous position. At each time step, the particle swarm optimization changes the velocity of each particle toward its pbest and gbest locations. Acceleration is weighted by a random term, with separate random numbers being generated for acceleration toward pbest and gbest locations. Additionally, particle swarm optimization is an approach which can be used for specific applications focused on a specific requirement. Particle swarm optimization is widely used because there are few parameters to adjust. The parameters and their mean of parameters are shown in Table 1.Table 1
Parameters and the mean of parameters.
Parameters
Mean of parameters
v
i
t
Velocity of particlei at iteration t
x
i
t
Position of particlei at iteration t
w
Inertia weight
c
1, c
2
Acceleration coefficients
ψ
1, ψ
2
Random number between 0 and 1
p
best
i
Best position of particlei
gbest
Best position of entire particles in a populationConsider(5)
v
i
t
+
1
=
w
·
v
i
t
+
c
1
·
ψ
1
·
(
p
best
i
-
x
i
t
)
+
c
2
·
ψ
2
·
(
g
best
-
x
i
t
)
x
i
t
+
1
=
x
i
t
+
v
i
t
.


### 4.2. Particles Definition

Suppose thatn is the number of VMs that should be allocated and m is the number of hosts in cloud data center. The position vector of particles is defined as X
i
t
=
(
x
i
1
t
,
x
i
2
t
,
.
.
.
,
x
i
j
t
,
.
.
.
,
x
i
m
t
), where t is the iteration number, i denotes the ith possible solution, and j is the serial number of VM. For example, if X
i
t
=
(
x
i
1
t
,
x
i
2
t
,
x
i
3
t
)
=
(
1,2
,
1
), it means that VM 1,2,3 is, respectively, allocated to node 1,2,1. While particles are updating, the position vector of particles X
i
t will transfer to a m
*
n (0,1)-matrix X
X
i
t:
(6)
X
X
l
t
=
[
s
11
t
s
12
t
⋯
s
1
h
t
⋯
s
1
n
t
s
21
t
s
22
t
⋯
s
2
h
t
⋯
s
2
n
t
⋮
⋮
⋮
⋮
s
j
1
t
s
j
2
t
⋯
s
j
h
t
⋯
s
j
n
t
⋮
⋮
⋮
⋮
s
m
1
t
s
m
2
t
⋯
s
m
h
t
⋯
s
m
n
t
]
.If VMj is allocated to node h at iteration t, s
j
h
t
=
1; if not, s
j
h
t
=
0. One VM can be allocated to only one node, so there is a limitation for s
j
h
tas below:
(7)
∑
h
=
1
n
s
j
h
t
=
1
,
∀
j
∈
{
1,2
,
.
.
.
,
m
}
.


### 4.3. Position Update

At iterationt of our MREE-PSO algorithm, P
best
l
t
=
(
p
best
l
1
t
,
p
best
l
2
t
,
.
.
.
,
p
best
l
j
t
,
.
.
.
,
p
best
l
m
t
) is the personal best of particle l. Each particle keeps track of its coordinates in the solution space which are associated with the best solution (fitness) that has achieved so far by that particle. And G
best
t
=
(
g
best
1
t
,
g
best
2
t
,
.
.
.
,
g
best
j
t
,
.
.
.
,
g
best
m
t
) is the best value obtained so far by any particle.Suppose that the probability that VMj is allocated to node h is 0.5 at iteration t
+
1; then P
(
s
j
h
t
+
1
=
1
)
=
P
(
s
j
h
t
+
1
=
0
)
=
0.5. p
p and p
g, respectively, represents the fitness of personal and global best. That means the probability of finding the best solution. For easy description, we can introduce two parameters k
1and k
2. According to the Bayesian formula, we can get the following:
(8)
P
(
s
j
h
t
+
1
=
1
∣
p
best
j
h
t
=
1
,
g
best
j
h
t
=
1
)
=
p
p
*
p
g
p
p
*
p
g
+
(
1
-
p
p
)
(
1
-
p
g
)
=
k
1
P
(
s
j
h
t
+
1
=
0
∣
p
best
j
h
t
=
1
,
g
best
j
h
t
=
1
)
=
(
1
-
p
p
)
*
(
1
-
p
g
)
p
p
*
p
g
+
(
1
-
p
p
)
(
1
-
p
g
)
=
1
-
k
1
P
(
s
j
h
t
+
1
=
1
∣
p
best
j
h
t
=
1
,
g
best
j
h
t
=
0
)
=
p
p
*
(
1
-
p
g
)
p
p
*
(
1
-
p
g
)
+
p
p
*
(
1
-
p
g
)
=
k
2
P
(
s
j
h
t
+
1
=
0
∣
p
best
j
h
t
=
1
,
g
best
j
h
t
=
0
)
=
p
g
*
(
1
-
p
p
)
p
p
*
(
1
-
p
g
)
+
p
g
*
(
1
-
p
p
)
=
1
-
k
2
.In (8), the probabilities of personal and global best should be better than average probability, so 0.5
<
p
p
<
1, 0.5
<
p
g
<
1. To avoid falling into local optimal solution, let p
g
<
p
p; then 0.5
<
p
g
<
p
p
<
1. In our paper, we set the parameters as p
p
=
0.8, p
g
=
0.7, and k
1
=
0.9, k
2
=
0.7.The positions of particles are updated as follows:r = rand ();
if (p
best
j
h
t
=
1 and g
best
j
h
t
=
1) then
if (r
<
k
1) s
j
h
t
+
1
=
1 else s
j
h
t
+
1
=
0;
else if (p
best
j
h
t
=
0 and g
best
j
h
t
=
0) then
if (r
<
1
-
k
1) s
j
h
t
+
1
=
0 else s
j
h
t
+
1
=
1;
else if (p
best
j
h
t
=
1 and g
best
j
h
t
=
0) then
if (r
<
k
2) s
j
h
t
+
1
=
1 else s
j
h
t
+
1
=
0;
else
if (r
<
1
-
k
2) s
j
h
t
+
1
=
1 else s
j
h
t
+
1
=
0;According the objective of VMs allocation, the fitness function is defined as a total Euclidean distanceδ as seen in formula (1).


### 4.4. Algorithm Description

A flowchart of the energy efficient allocation algorithm based on PSO is shown in Figure2. In this algorithm, there are four main steps which are explained as follows.(1)
Initialize particles: generateN sequences of VMs at random. For each sequence, the VM is allocated to the node by First Fit algorithm which can supply the resources at the first time. Get N particles constituted a swarm.
(2)
Evaluate fitness for each particle: initialize the particle’spbest and gbest position to its initial position.
(3)
Update velocities and positions of particles: if all particles meet the constrains along with formulas (4) and (7), then update the particles. Otherwise, all particles cannot be updated. For VM j, while ∑
h
=
1
n
s
j
h
t
>
1, it has been allocated to more than one node; while ∑
h
=
1
n
s
j
h
t
=
0, it has not been allocated to any node.
(4)
If the iteration number is larger than the maximum, stop; otherwise, go to the second step.Figure 2
Flowchart of the energy efficient allocation algorithm based on PSO.


## 4.1. Particle Swarm Optimization (PSO) Algorithm

Particle swarm optimization (PSO) is a population developed by Eberhart and Kennedy in 1995 based on stochastic optimization technique [22–24]. Social behavior of organisms motivated them to look into the effect of collaboration of species onto achieving their goals as a group, such as fish schooling and bird flocking. PSO has been widely applied in many applications and research areas in past several years. Compared with other methods such as GA, it is proved that PSO gets better results in a cheaper and faster way.In PSO, the potential solutions are called particles which fly through the solution space by following the current optimum particles. Particles keep part of their previous state because they have memory. All particles preserve their individuality in any case, although they share the same point in belief space with no restriction. PSO algorithm evolves the position of each particle in problem space using (5). Each particle has an initial random velocity, and particle’s movement is influenced by two randomly weighted factors: individuality and sociality. Individuality is defined as the tendency to return to the particle’s best previous position and sociality is defined as the tendency to move towards the neighborhood’s best previous position. At each time step, the particle swarm optimization changes the velocity of each particle toward its pbest and gbest locations. Acceleration is weighted by a random term, with separate random numbers being generated for acceleration toward pbest and gbest locations. Additionally, particle swarm optimization is an approach which can be used for specific applications focused on a specific requirement. Particle swarm optimization is widely used because there are few parameters to adjust. The parameters and their mean of parameters are shown in Table 1.Table 1
Parameters and the mean of parameters.
Parameters
Mean of parameters
v
i
t
Velocity of particlei at iteration t
x
i
t
Position of particlei at iteration t
w
Inertia weight
c
1, c
2
Acceleration coefficients
ψ
1, ψ
2
Random number between 0 and 1
p
best
i
Best position of particlei
gbest
Best position of entire particles in a populationConsider(5)
v
i
t
+
1
=
w
·
v
i
t
+
c
1
·
ψ
1
·
(
p
best
i
-
x
i
t
)
+
c
2
·
ψ
2
·
(
g
best
-
x
i
t
)
x
i
t
+
1
=
x
i
t
+
v
i
t
.


## 4.2. Particles Definition

Suppose thatn is the number of VMs that should be allocated and m is the number of hosts in cloud data center. The position vector of particles is defined as X
i
t
=
(
x
i
1
t
,
x
i
2
t
,
.
.
.
,
x
i
j
t
,
.
.
.
,
x
i
m
t
), where t is the iteration number, i denotes the ith possible solution, and j is the serial number of VM. For example, if X
i
t
=
(
x
i
1
t
,
x
i
2
t
,
x
i
3
t
)
=
(
1,2
,
1
), it means that VM 1,2,3 is, respectively, allocated to node 1,2,1. While particles are updating, the position vector of particles X
i
t will transfer to a m
*
n (0,1)-matrix X
X
i
t:
(6)
X
X
l
t
=
[
s
11
t
s
12
t
⋯
s
1
h
t
⋯
s
1
n
t
s
21
t
s
22
t
⋯
s
2
h
t
⋯
s
2
n
t
⋮
⋮
⋮
⋮
s
j
1
t
s
j
2
t
⋯
s
j
h
t
⋯
s
j
n
t
⋮
⋮
⋮
⋮
s
m
1
t
s
m
2
t
⋯
s
m
h
t
⋯
s
m
n
t
]
.If VMj is allocated to node h at iteration t, s
j
h
t
=
1; if not, s
j
h
t
=
0. One VM can be allocated to only one node, so there is a limitation for s
j
h
tas below:
(7)
∑
h
=
1
n
s
j
h
t
=
1
,
∀
j
∈
{
1,2
,
.
.
.
,
m
}
.


## 4.3. Position Update

At iterationt of our MREE-PSO algorithm, P
best
l
t
=
(
p
best
l
1
t
,
p
best
l
2
t
,
.
.
.
,
p
best
l
j
t
,
.
.
.
,
p
best
l
m
t
) is the personal best of particle l. Each particle keeps track of its coordinates in the solution space which are associated with the best solution (fitness) that has achieved so far by that particle. And G
best
t
=
(
g
best
1
t
,
g
best
2
t
,
.
.
.
,
g
best
j
t
,
.
.
.
,
g
best
m
t
) is the best value obtained so far by any particle.Suppose that the probability that VMj is allocated to node h is 0.5 at iteration t
+
1; then P
(
s
j
h
t
+
1
=
1
)
=
P
(
s
j
h
t
+
1
=
0
)
=
0.5. p
p and p
g, respectively, represents the fitness of personal and global best. That means the probability of finding the best solution. For easy description, we can introduce two parameters k
1and k
2. According to the Bayesian formula, we can get the following:
(8)
P
(
s
j
h
t
+
1
=
1
∣
p
best
j
h
t
=
1
,
g
best
j
h
t
=
1
)
=
p
p
*
p
g
p
p
*
p
g
+
(
1
-
p
p
)
(
1
-
p
g
)
=
k
1
P
(
s
j
h
t
+
1
=
0
∣
p
best
j
h
t
=
1
,
g
best
j
h
t
=
1
)
=
(
1
-
p
p
)
*
(
1
-
p
g
)
p
p
*
p
g
+
(
1
-
p
p
)
(
1
-
p
g
)
=
1
-
k
1
P
(
s
j
h
t
+
1
=
1
∣
p
best
j
h
t
=
1
,
g
best
j
h
t
=
0
)
=
p
p
*
(
1
-
p
g
)
p
p
*
(
1
-
p
g
)
+
p
p
*
(
1
-
p
g
)
=
k
2
P
(
s
j
h
t
+
1
=
0
∣
p
best
j
h
t
=
1
,
g
best
j
h
t
=
0
)
=
p
g
*
(
1
-
p
p
)
p
p
*
(
1
-
p
g
)
+
p
g
*
(
1
-
p
p
)
=
1
-
k
2
.In (8), the probabilities of personal and global best should be better than average probability, so 0.5
<
p
p
<
1, 0.5
<
p
g
<
1. To avoid falling into local optimal solution, let p
g
<
p
p; then 0.5
<
p
g
<
p
p
<
1. In our paper, we set the parameters as p
p
=
0.8, p
g
=
0.7, and k
1
=
0.9, k
2
=
0.7.The positions of particles are updated as follows:r = rand ();
if (p
best
j
h
t
=
1 and g
best
j
h
t
=
1) then
if (r
<
k
1) s
j
h
t
+
1
=
1 else s
j
h
t
+
1
=
0;
else if (p
best
j
h
t
=
0 and g
best
j
h
t
=
0) then
if (r
<
1
-
k
1) s
j
h
t
+
1
=
0 else s
j
h
t
+
1
=
1;
else if (p
best
j
h
t
=
1 and g
best
j
h
t
=
0) then
if (r
<
k
2) s
j
h
t
+
1
=
1 else s
j
h
t
+
1
=
0;
else
if (r
<
1
-
k
2) s
j
h
t
+
1
=
1 else s
j
h
t
+
1
=
0;According the objective of VMs allocation, the fitness function is defined as a total Euclidean distanceδ as seen in formula (1).


## 4.4. Algorithm Description

A flowchart of the energy efficient allocation algorithm based on PSO is shown in Figure2. In this algorithm, there are four main steps which are explained as follows.(1)
Initialize particles: generateN sequences of VMs at random. For each sequence, the VM is allocated to the node by First Fit algorithm which can supply the resources at the first time. Get N particles constituted a swarm.
(2)
Evaluate fitness for each particle: initialize the particle’spbest and gbest position to its initial position.
(3)
Update velocities and positions of particles: if all particles meet the constrains along with formulas (4) and (7), then update the particles. Otherwise, all particles cannot be updated. For VM j, while ∑
h
=
1
n
s
j
h
t
>
1, it has been allocated to more than one node; while ∑
h
=
1
n
s
j
h
t
=
0, it has not been allocated to any node.
(4)
If the iteration number is larger than the maximum, stop; otherwise, go to the second step.Figure 2
Flowchart of the energy efficient allocation algorithm based on PSO.


## 5. Simulation and Performance Tests

### 5.1. Environment and Setting

The energy efficient multiresources virtual machine allocation algorithm (MREE-PSO) has been evaluated by simulation using CloudSim toolkit [27] which supports user-defined policies for allocation of hosts to virtual machine and policies for allocation of host resources to virtual machine. CloudSim [27] is a framework for modeling and simulation of cloud computing infrastructures and services. It has been wildly used to evaluate algorithms, applications, and policies before actual development of cloud products.The following steps are required in the process of this experiment: parameters setting, programming in CloudSim, and performance evaluating. We evaluated the performance of our MREE-PSO with two important traditional heuristic algorithms: MBFD [11, 12, 19] and MBFH [20, 21] method in the same data center.We simulate a data center that comprises 100 heterogeneous physical nodes. Half of these physical nodes are HP ProLiant ML110 G4 servers, and the others are HP ProLiant ML110 G5 servers. Each node is characterized by the CPU performance defined in Millions Instructions Per Second (MIPS), the MIPS of the HP ProLiant ML110 G4 and G5 server is 1860 and 2260, respectively. The storages of two kinds of servers are 640 GB and 1000 GB. The number of VMs ranges from 10 to 100. As seen in formula (1), let d
=
2, u
best
1
=
0.5, and u
best
2
=
0.7 in our simulations.In order to test the energy efficiency of the proposed algorithm in complicated environment, the simulated data center comprises different number of physical nodes. The nodes are modeled to have four classes of parameters as shown in Table2.Table 2
Parameters for physical nodes.
Serial number
CPU(MIPS)
RAM(MB)
BW(MBPS)
DISK(GB)
1
600
2048
1000
1000
2
600
2048
2000
250
3
600
4096
1000
250
4
800
4096
1000
250Each parameter of virtual machine is initialized at random within a certain range according to the reference [20]: CPU (60~150), DISK (100~200), RAM (40~200), and BW (30~100). We assume that the size of the group of particle is 20 and the maximum iteration number is 30. Repeat each simulation 10 times and get the average values.


### 5.2. Analysis of the Total Euclidean Distance

In this simulation, the total Euclidean distance is calculated by formula (1). To achieve an optimal energy conservation in cloud data center, the best value of utilization of each kind of resource should be set. Srikantaiah et al. [20] found the optimal balance between resource utilization and energy metrics residing around 50% on the CPU and 70% storage usage [10]. Based on this important result, we focus on the kinds of resource: CPU and disk. Our MREE-PSO algorithm was performed using two important traditional heuristic algorithms MBFD [11, 12, 19] and MBFH [20, 21] method for comparison.As shown in Figure3, the total Euclidean distance increases with the number of virtual machines. However, the total Euclidean distance is lower for MREE-PSO; it also increases more slowly with increasing the number of virtual machines. Especially, while the number of virtual machines increases from 50 to 100, the total Euclidean distance of MREE-PSO does not increase too much. It is seen that the total Euclidean distance varies almost linearly for the traditional heuristic algorithms: MBFD [11, 12, 19] and MBFH [20, 21] method. The total Euclidean distance denotes the energy consumption, so the energy efficiency of MREE-PSO is always higher than MBFD [11, 12, 19] and MBFH [20, 21] with the same number of virtual machines.Figure 3
Comparison of the total Euclidean distance.


### 5.3. Analysis of Resources Utilization

The resources utilizations are plotted in Figures4 and 5. In each case, the resources utilizations of MREE-PSO are better than MBFD [11, 12, 19] and MBFH [20, 21] method. While the number of virtual machines increases from 10 to 40, the utilizations of CPU and disk are kept in a low level. But form 40 to 100, the resources utilizations of our method increase a lot with increasing number of virtual machines. When the number of virtual machines arrives at 100, the utilizations of CPU and disk, respectively, can increase to 45% and 65%. They are closed to the best value of utilization which is the optimal balance between resource utilization and energy consumption found by Srikantaiah et al. [20]. This will be helpful to enhance the energy efficiency of cloud data center.Figure 4
Comparison of CPU utilization.Figure 5
Comparison of disk utilization.The usage of the physical nodes was also investigated with these three algorithms. The results are shown in Figure6. It is seen that usage of the physical nodes increases more slowly for MREE-PSO than for MBFD [11, 12, 19] and MBFH [20, 21]. The usage of the physical nodes of MREE-PSO is always less than MBFD [11, 12, 19] and MBFH [20, 21] with the same number of virtual machines. Even the number of virtual machines arrives at 100; only 18 physical nodes are allocated for virtual machines. Thus, our method has a better energy efficiency than MBFD and MBFH which is important for cloud data center.Figure 6
Comparison of usage of the physical nodes.


## 5.1. Environment and Setting

The energy efficient multiresources virtual machine allocation algorithm (MREE-PSO) has been evaluated by simulation using CloudSim toolkit [27] which supports user-defined policies for allocation of hosts to virtual machine and policies for allocation of host resources to virtual machine. CloudSim [27] is a framework for modeling and simulation of cloud computing infrastructures and services. It has been wildly used to evaluate algorithms, applications, and policies before actual development of cloud products.The following steps are required in the process of this experiment: parameters setting, programming in CloudSim, and performance evaluating. We evaluated the performance of our MREE-PSO with two important traditional heuristic algorithms: MBFD [11, 12, 19] and MBFH [20, 21] method in the same data center.We simulate a data center that comprises 100 heterogeneous physical nodes. Half of these physical nodes are HP ProLiant ML110 G4 servers, and the others are HP ProLiant ML110 G5 servers. Each node is characterized by the CPU performance defined in Millions Instructions Per Second (MIPS), the MIPS of the HP ProLiant ML110 G4 and G5 server is 1860 and 2260, respectively. The storages of two kinds of servers are 640 GB and 1000 GB. The number of VMs ranges from 10 to 100. As seen in formula (1), let d
=
2, u
best
1
=
0.5, and u
best
2
=
0.7 in our simulations.In order to test the energy efficiency of the proposed algorithm in complicated environment, the simulated data center comprises different number of physical nodes. The nodes are modeled to have four classes of parameters as shown in Table2.Table 2
Parameters for physical nodes.
Serial number
CPU(MIPS)
RAM(MB)
BW(MBPS)
DISK(GB)
1
600
2048
1000
1000
2
600
2048
2000
250
3
600
4096
1000
250
4
800
4096
1000
250Each parameter of virtual machine is initialized at random within a certain range according to the reference [20]: CPU (60~150), DISK (100~200), RAM (40~200), and BW (30~100). We assume that the size of the group of particle is 20 and the maximum iteration number is 30. Repeat each simulation 10 times and get the average values.


## 5.2. Analysis of the Total Euclidean Distance

In this simulation, the total Euclidean distance is calculated by formula (1). To achieve an optimal energy conservation in cloud data center, the best value of utilization of each kind of resource should be set. Srikantaiah et al. [20] found the optimal balance between resource utilization and energy metrics residing around 50% on the CPU and 70% storage usage [10]. Based on this important result, we focus on the kinds of resource: CPU and disk. Our MREE-PSO algorithm was performed using two important traditional heuristic algorithms MBFD [11, 12, 19] and MBFH [20, 21] method for comparison.As shown in Figure3, the total Euclidean distance increases with the number of virtual machines. However, the total Euclidean distance is lower for MREE-PSO; it also increases more slowly with increasing the number of virtual machines. Especially, while the number of virtual machines increases from 50 to 100, the total Euclidean distance of MREE-PSO does not increase too much. It is seen that the total Euclidean distance varies almost linearly for the traditional heuristic algorithms: MBFD [11, 12, 19] and MBFH [20, 21] method. The total Euclidean distance denotes the energy consumption, so the energy efficiency of MREE-PSO is always higher than MBFD [11, 12, 19] and MBFH [20, 21] with the same number of virtual machines.Figure 3
Comparison of the total Euclidean distance.


## 5.3. Analysis of Resources Utilization

The resources utilizations are plotted in Figures4 and 5. In each case, the resources utilizations of MREE-PSO are better than MBFD [11, 12, 19] and MBFH [20, 21] method. While the number of virtual machines increases from 10 to 40, the utilizations of CPU and disk are kept in a low level. But form 40 to 100, the resources utilizations of our method increase a lot with increasing number of virtual machines. When the number of virtual machines arrives at 100, the utilizations of CPU and disk, respectively, can increase to 45% and 65%. They are closed to the best value of utilization which is the optimal balance between resource utilization and energy consumption found by Srikantaiah et al. [20]. This will be helpful to enhance the energy efficiency of cloud data center.Figure 4
Comparison of CPU utilization.Figure 5
Comparison of disk utilization.The usage of the physical nodes was also investigated with these three algorithms. The results are shown in Figure6. It is seen that usage of the physical nodes increases more slowly for MREE-PSO than for MBFD [11, 12, 19] and MBFH [20, 21]. The usage of the physical nodes of MREE-PSO is always less than MBFD [11, 12, 19] and MBFH [20, 21] with the same number of virtual machines. Even the number of virtual machines arrives at 100; only 18 physical nodes are allocated for virtual machines. Thus, our method has a better energy efficiency than MBFD and MBFH which is important for cloud data center.Figure 6
Comparison of usage of the physical nodes.


## 6. Conclusion

In cloud data center, the allocation of virtual machines with multiple resources plays an important role in improving the energy efficiency and performance of cloud computing. It will reduce the energy consumption of the cloud data center. The virtual machine allocation algorithm with multiple resources based on PSO described in this paper effectively improves energy efficiency. But the methods discussed here only considered the CPU and disk resources. Other resources such as network and memory should also be considered in the future research. The migration algorithm of virtual machines with multiple resources also should be introduced into the management of cloud data center in the future research.



---

*Source: 816518-2014-06-12.xml*