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

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.


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][7][8][9][10][11][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][8][9][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][8][9][10][11][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][23][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 Section 2, 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.

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][5][6][7][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][7][8][9][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  * , where  is the number of VMs and  is the number of hosts.

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 that  is the number of VMs that should be allocated,  is the number of hosts in cloud data center, the search space of heuristic algorithm is   , 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: where  is the dimension which denotes kinds of resources, such as CPU, disk, memory, and bandwidth and  denotes the number of hosts in cloud data center.   is the utilization for host  and the resource , best  is the best utilization for    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: objection: min  constraints: where   ℎ = 1 denotes virtual machine VM allocated to node ℎ;   ℎ = 0 denotes VM not allocated to node ℎ.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: In expression ( 4 , respectively, denotes the capacity of these resources for VM .If there are multiple VMs allocated on node ℎ, the total resources demand of VMs should be smaller than the capacity of node ℎ.

Allocation Algorithm Design and Implement Based on PSO
It has been successful to apply PSO in many applications and research areas [22,[24][25][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.

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][23][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 best and best locations.Acceleration is weighted by a random term, with separate random numbers being generated for acceleration toward best and best 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.Consider

Particles Definition.
Suppose that  is the number of VMs that should be allocated and  is the number of hosts in cloud data center.The position vector of particles is defined as    = (  1 ,   2 , ...,    , ...,    ), where  is the iteration number,  denotes the th possible solution, and  is the serial number of VM.For example, if    = (  1 ,   2 ,   3 ) = (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    will transfer to a  *  (0,1)-matrix    : If VM is allocated to node ℎ at iteration ,   ℎ = 1; if not,   ℎ = 0.One VM can be allocated to only one node, so there is a limitation for   ℎ as below: Suppose that the probability that VM is allocated to node ℎ is 0.5 at iteration  + 1; then ( +1 ℎ = 1) = ( +1 ℎ = 0) = 0.5.  and   , 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  1 and  2 .According to the Bayesian formula, we can get the following: In (8), the probabilities of personal and global best should be better than average probability, so 0.5 <   < 1, 0.5 <   < 1.To avoid falling into local optimal solution, let   <   ; then 0.5 <   <   < 1.In our paper, we set the parameters as   = 0.8,   = 0.7, and  1 = 0.9,  2 = 0.7.
The positions of particles are updated as follows: According the objective of VMs allocation, the fitness function is defined as a total Euclidean distance  as seen in formula (1).

Algorithm Description.
A flowchart of the energy efficient allocation algorithm based on PSO is shown in Figure 2. In this algorithm, there are four main steps which are explained as follows.
(1) Initialize particles: generate  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  particles constituted a swarm.
(2) Evaluate fitness for each particle: initialize the particle's best and best 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 , while ∑  ℎ=1   ℎ > 1, it has been allocated to more than one node; while ∑  ℎ=1   ℎ = 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.

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  = 2, best 1 = 0.5, and 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 Table 2.
Each 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.

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 Figure 3, 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.

Analysis of Resources Utilization.
The resources utilizations are plotted in Figures 4 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.
The usage of the physical nodes was also investigated with these three algorithms.The results are shown in Figure 6.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.

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.

Figure 2 :
Figure 2: Flowchart of the energy efficient allocation algorithm based on PSO.

Figure 3 :
Figure 3: Comparison of the total Euclidean distance.

Figure 6 :
Figure 6: Comparison of usage of the physical nodes.

Table 1 :
Parameters and the mean of parameters.
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 best  = (best  1 , best  2 , ..., best   , ..., best   ) is the best value obtained so far by any particle.

Table 2 :
Parameters for physical nodes.