Abstract

The cloud platform provides various services to users. More and more cloud centers provide infrastructure as the main way of operating. To improve the utilization rate of the cloud center and to decrease the operating cost, the cloud center provides services according to requirements of users by sharding the resources with virtualization. Considering both QoS for users and cost saving for cloud computing providers, we try to maximize performance and minimize energy cost as well. In this paper, we propose a distributed parallel genetic algorithm (DPGA) of placement strategy for virtual machines deployment on cloud platform. It executes the genetic algorithm parallelly and distributedly on several selected physical hosts in the first stage. Then it continues to execute the genetic algorithm of the second stage with solutions obtained from the first stage as the initial population. The solution calculated by the genetic algorithm of the second stage is the optimal one of the proposed approach. The experimental results show that the proposed placement strategy of VM deployment can ensure QoS for users and it is more effective and more energy efficient than other placement strategies on the cloud platform.

1. Introduction

Cloud computing is at the forefront of information technology. The internal system of cloud computing can be seen as a collection of a set of services [1], including infrastructure layer (IaaS), platform layer (PaaS), and application layer (SaaS). With the development of cloud computing, more and more cloud centers provide IaaS as the main way of operating. In order to improve the utilization rate of cloud center and to decrease the operating costs, virtualization technology has been applied to the cloud computing [24]. It provides services as required to users by sharding the resources with virtualization. But the distribution of virtual machines (VMs) will become sparser on cloud center with creating and closing the VMs. The placement problem of VMs has attracted more and more attention and became a research hotspot in cloud computing area quickly. It can be regarded as packing problem and has been proved as a NP-completeness problem [5].

Most of early researches were focused on increasing resources utilization rate in considering the system performance. With the increase of cloud center scale, energy saving has attracted significant attention in both industry and academia area. In order to reduce operating costs by saving energy, the concept of green cloud is proposed. Most researches are focused on VMs consolidation with living migration technology to reduce energy costs. If we take the energy costs into consideration as a parameter in the VMs deployment process, it can effectively reduce live migration frequency for decreasing the energy costs in maintenance of cloud center.

Genetic algorithm has been appreciated by academic circles as a solution of the VMs placement problem because of its speediness and adaptability advantages. Furthermore, parallel genetic algorithm can be used to solve the relatively complex problems. Even so, the genetic algorithm probably terminates before it gets a good enough solution in the case that there are a large number of servers in cloud platform and users need to deploy a certain number of VMs. The traditional parallel genetic algorithm is executed on single physical host, but Amdahl’s law [6] showed that the performance of parallel program executed on single physical host is not much better than serial program. The researches [7, 8] showed that we can get a better performance of parallel program by enlarging the scale of problem. Therefore, we propose a new distributed parallel genetic algorithm (DPGA) of placement strategy which is executed on several physical hosts for the large-scale VMs deployment problem. This algorithm can get a better and more accurate solution by increasing the iterative times. Comparing with the deployment process, the time cost of deployment strategy is relatively less. Therefore, we did not take the time cost in consideration in DPGA. We define the initial population of the DPGA as initial total population and the initial population of algorithm executing on each selected host as initial subpopulation. We assign the performance per watt as fitness value. In order to ensure the coverage of the solution space, we choose initial subpopulation from solution space dispersedly and averagely. It executes the first stage genetic algorithm on several selected physical hosts to choose initial subpopulation and get several solutions. Then it collects the solutions calculated by the first stage of DPGA and puts them into the second stage as initial population. Finally, we get a relatively satisfied solution from the second stage of DPGA.

2. Relevant Work

The proposed question refers to finding the target hosts to place the VMs. In this paper, relevant knowledge of DVFS will be used in the standard for evaluating the solution in considering of minimizing energy costs and ensuring performance as well. This subject has not been widely studied in the field related to placement strategy for VMs deployment. However, many researches are focused on the placement of applications and services in the cloud environment [915], and many researchers have been working on data placement in the cloud center [1619].

There are also some researches focused on the similar problems. von Laszewski et al. have presented a scheduling algorithm to allocate virtual machines in a DVFS-enabled cluster [20]. The proposed algorithm was focused on scheduling virtual machines in a compute cluster to reduce power consumption via the technique of DVFS (dynamic voltage and frequency scaling). It dynamically adjusts the CPU frequencies and voltages of the compute nodes in a cluster without degrading the virtual machine performance beyond unacceptable levels. Recent studies have revealed that the network elements consume 10–20% of the total power in the data center. VMPlanner [21] optimized both virtual machine placement and traffic flow routing so as to turn off as many unneeded network elements as possible for network power reduction in the virtualization-based data centers. It took the advantage of the flexibility provided by dynamic VM migration and programmable flow-based routing to optimize network power consumption while satisfying network traffic demands. Ge et al. have presented distributed performance-directed DVS (dynamic voltage scaling) scheduling strategies for use in scalable power-aware HPC (high-performance computing) clusters [22]. It uses DVS technology in high-performance microprocessors to reduce power consumption during parallel application runs in the case that peak CPU performance is not necessary due to load imbalance, communication delays, and so forth. VMPACS [23] is a multiobjective ant colony system algorithm for the virtual machine placement problem. The purpose of VMPACS is to efficiently obtain a nondominated Pareto set that simultaneously minimizes total resource wastage and power consumption. MILP [24] proposed a holistic approach for a large-scale cloud system where the cloud services are provisioned by several data centers interconnected over the backbone network. It is a mixed integer linear programming formulation that aims at virtualizing the backbone topology and placing the VMs in inter- and intradata centers with the objective of jointly optimized network delay and energy saving. OVMP [25] is an optimal virtual machine placement algorithm to provision the resources offered by multiple cloud providers. It is based on an IaaS model which leverages virtualization technologies that can minimize the total cost of resource in each plan for hosting virtual machines in a multiple cloud provider environment under future demand and price uncertainty. The tradeoff between the advance reservation of resources and the allocation of on-demand resources is adjusted to be optimal. It makes a decision based on the optimal solution of stochastic integer programming (SIP) to rent resources from cloud providers. Jing Tai Piao proposed a network-aware virtual machine placement and migration approach for data intensive applications in cloud computing environments to minimize the data transfer time consumption [26]. It places the VMs on physical machines with consideration of the network conditions between the physical machines and the data storage. It also considers the scenario in which instable network condition changed the data access behaviors and deteriorated the application performance. It migrates the VM to other physical machines in order to deal with this scenario.

3. Distributed Parallel Genetic Algorithm of VMs Placement

There are physical hosts in the cloud platform and users need VMs with  Hz CPU and  M RAM. We assume that the physical hosts in cloud center are DVFS [27] enabled and the cloud center can satisfy requirements of users; namely, is big enough for . We assume that and the physical hosts are in the same network environment. Solution space is recorded as follows: . We need to find physical hosts to satisfy the requirements of users to place the VMs. The solution vector is as follows: . Remaining available CPU resource of physical host is as follows: . is the CPU utilization rate of . The parameter is the CPU frequency of . Remaining available memory resource of physical host is as follows: . is the total memory size of . is the used memory size of . is the reserved memory size of the system. can be a member of solutions only if and .

From the view of users, cloud center should select the physical hosts with more remaining resources to load the VMs with the objective of improving the QoS. From the view of cloud operators, cloud center should improve the utilization rates of resources and decrease the energy costs that aim at reducing the operating costs. Taken together, we assign the performance per watt to evaluation standard, namely, maximizing performance as well as minimizing energy costs. As shown in Figure 1, the idea of DPGA is divided into two stages. In the first stage, genetic algorithm is executed in parallel on selected physical hosts. We select initial populations dispersedly and averagely by a certain step size in solution space for these physical hosts. Selection process chooses the solution vectors according to the probability which is proportional to the fitness value. Then the algorithm crosses the selected solution vectors and mutates the crossed solution vectors in the direction conducive to the fitness value. After crossover and mutation process, the algorithm iterates the first stage until it meets the iterative terminal conditions. In the second stage, the algorithm collects the solutions obtained from each selected physical host in the first stage, and then it executes the genetic algorithm again as in the first stage with collected solutions as initial population.

3.1. Initial Population Generation in the First Stage

Instead of random way, we assign the initial population for higher coverage rate in the initial population generating process. Initial vector set as jump volume among the vector members. We select initial vectors as initial solution vectors and set as jump volume among the initial solutions. We set as jump volume among the initial solutions of the selected physical hosts. To ensure the algorithm executing correctly, in this paper, we assume that . In physical host , the vector member of initial solution vector is as follows:

Number is the serial number of the physical host which is selected to execute the first stage algorithm. Number is the solution vector serial number of the physical host . Number is the vector member serial number of the solution vector .

For instance, we set , , and . The initial population is showed in Table 1.

3.2. Fitness Calculation

We assign the performance per watt as fitness value. The performance increment of physical host is recorded as . is the CPU frequency increment of physical host and is the VM work time. The energy consumption increment of physical host is recorded as . The VCPU frequencies of placement VMs are  Hz, so , . The relationship among energy, voltage, and frequency in CMOS circuits [27] is related by where is energy consumption, is CPU circuit switching capacity, is CPU frequency, is CPU voltage, is a factor which depends on technology, and is CPU threshold voltage. By formula (2), we can get the relationship between voltage and frequency as follows:

We can also get the energy consumption increment of physical host as follows:

It updates the dynamically and temporarily after calculation. The updated only works in the process of the fitness value calculation for current solution vector. The fitness value of the algorithm is the ratio of the incremental performance and incremental power consumption after deploying the VMs according to the solution vector. Thus, the fitness value of the solution vector in the proposed VM placement strategy can be expressed as follows:

3.3. Selection, Crossover, and Mutation in the First Stage

Selecting operations choose the solution vectors according to the probability in the direction proportional to the fitness value. The selected solution vectors with higher fitness value will get more opportunities to be inherited by succeeding generation. The selection probability of solution vector is as follows:

The selection probability area of solution vector between 0 and 1 is as follows:

Then selection process generates random numbers between 0 and 1. It selects solution vectors according to random numbers which appear in probability area.

In crossover process, we use the multipoint crossover method with self-adaptive crossover rate [28]. We set the initial crossover rate with 1. Firstly, crossover process calculates the crossover rate for the solution vectors of current generation. We record as the crossover rate of previous generation solution vectors.

The average fitness value of current generation solution vectors is as follows:

is the fitness value of the current generation solution vector. The average fitness value of previous generation solution vectors is as follows:

is the fitness value of the previous generation solution vector. The crossover rate of the current generation solution vectors is as follows:

We assume that is the largest fitness value of the solution vectors. Crossover process uses the random mating strategy for mating the population. For each pair of mating solution vectors, we assume that is the bigger fitness value of the two solution vectors. The crossover rate of this pair of mating solution vectors is as follows:

If this pair of mating solution vectors needs to be crossed according to crossover rate , crossover process generates random numbers of 0 or 1. The position will be the crossover point if the random number is 1. The process crosses this pair of mating solution vectors according to the crossover points.

We use the multipoint mutation method with self-adaptive mutation rate [28] as in the crossover process. Firstly, the mutation process calculates the mutation rate for the solution vectors. We assume that is the largest fitness value of the solution vectors. is the fitness value of solution vector . The mutation rate of is as follows:

Then the mutation process sets the mutation points for according to mutation rate . If the mutation process sets the point as a mutation point, it records the related number with 1; otherwise it records the related number with 0. The solution vector is an incorrect solution after crossover if the number of a physical host that appears in solution vector is bigger than the number of VMs that can be loaded in this physical host. In this case, we set - mutation points (set the related number with 1) randomly on the position of the physical host in solution vector. For example, there are two solution vectors ( , , , , , , , , , ) and ( , , , , , , , , , ), the crossover point is 8, and then the solution vectors after crossover are ( , , , , , , , , , ) and ( , , , , , , , , , ). The solution vector ( , , , , , , , , , ) is an incorrect solution if the remaining available resources of only can load one VM. So we set as mutation point.

After determining the mutation points, the mutation process continues to mutate the mutation points. In initial population generation process, we take the coverage of the solution space into consideration, so the mutation process mutates the mutation point with the scope of . As for , the mutation interval is as follows:

Because of the indeterminacy of the mutation points, mutation process mutates the mutation points according to the sequence of the mutation points. According to the nonmutation points (the relevant position of random number is 0), mutation process updates the information of members in mutation interval and deletes the members of mutation interval if the remaining resources of relevant physical hosts cannot satisfy the requirement of users. The number of alternative mutation physical hosts after updating the mutation interval is . The alternative mutation physical hosts are expressed as . If , the mutation process randomly selects a mutation physical host that can satisfy the requirements of users from solution space. If , the mutation process selects a physical host from mutation interval proportional to the benefit of the fitness value to mutate the mutation point.

If physical host loads the VM, the performance per watt is as follows:

The selection probability of alternative mutation physical host is as follows:

The probability area of alternative mutation physical host between 0 and 1 is as follows:

Then mutation process generates a random number between 0 and 1. It selects an alternative physical host according to the probability area in which the random number appeared. After mutating the mutation point, mutation process sets the relevant position number of solution vector with 0.

3.4. Iteration and Termination in the First Stage

After the mutation process, the algorithm judges whether it reaches the iterative termination conditions of the first stage of DPGA. If so, the algorithm stops iteration in the first stage; otherwise it continues the iteration. The solution vector with the maximum fitness value is the optimal solution vector in the first stage. The iterative termination conditions of the first stage are as follows.(1)Iterative times attain the preset maximum iterative times in the first stage. We set the maximum iterative times in the first stage with . The value of is related to and .(2)The difference between the largest fitness value and the average fitness value is less than a certain ratio of the average fitness value. We set the difference ratio of the second termination condition of the first stage with . We record the largest fitness value of the solution vectors as . Thus, the first stage of the algorithm will terminate if it satisfies the following formula: (3)The optimized proportion of the average fitness values between two adjacent generation populations is less than the preset ratio. We set the optimized proportion of the third termination condition of the first stage with σ. Thus, the first stage of the algorithm will terminate if it satisfies the following formula:

3.5. Genetic Algorithm in the Second Stage

After completing the iteration in the first stage of DPGA, the algorithm collects the solution vectors obtained from the first stage as the initial population in the second stage. The selection process in the second stage chooses the solution vectors in the same way as in the first stage. We also use the multipoint crossover method with self-adaptive crossover rate as in the first stage.

The average fitness value of current generation solution vectors in the second stage is as follows:

is the fitness value of the current generation solution vector in the second stage. The average fitness value of previous generation solution vectors in the second stage is as follows:

is the fitness value of the previous generation solution vector in the second stage. The crossover rate of the current generation solution vectors in the second stage is as follows:

is the crossover rate of the previous generation solution vectors in the second stage. is the fitness value of the current generation solution vector in the second stage. is the fitness value of the previous generation solution vector in the second stage. The crossover rate of the pair of the mating solution vectors in the second stage is as follows:

is the largest fitness value of the solution vectors in the second stage. is the bigger fitness value of the pair of the mating solution vectors in the second stage.

The mutation process uses the multipoint mutation method with self-adaptive mutation rate and confirms the mutation points as the way it used in the first stage. The mutation rate of in the second stage is as follows:

is the largest fitness value of the solution vectors in the second stage. is the fitness value of solution vector in the second stage. After confirming the mutation points in the second stage, being different from the process in the first stage, it mutates the mutation points with the scope of the whole solution space. Because of the indeterminacy of the mutation points, mutation process mutates the mutation points according to the sequence of the mutation points. Firstly, according to the nonmutation points, mutation process updates the information of all solution space members and deletes the members of mutation interval if the remaining resources of relevant physical hosts cannot satisfy the requirement of users. Then the mutation process mutates the mutation points in the same way as in the first stage.

After the mutation process in the second stage, the algorithm judges whether it reaches the iterative termination conditions of the second stage of DPGA. If so, the algorithm stops iteration in the second stage; otherwise it continues the iteration. The solution vector with the maximum fitness value is the optimal solution vector. The iterative termination conditions of the second stage are as follows.(1)Iterative times attain the preset maximum iterative times in the second stage. Because the solution vectors obtained from the first stage are relative optimal solutions, we decrease the maximum iterative times accordingly in the second stage. We set the maximum iterative times in the second stage with .(2)The difference between the largest fitness value and the average fitness value is less than a certain ratio of the average fitness value. As the result of the fact that the solution vectors obtained from the first stage are relative optimal solutions, we decrease the difference ratio accordingly in the second stage. We set the different ratio of the second termination condition of the second stage with . We record the largest fitness value of the solution vectors as . Thus, the second stage of the algorithm will terminate if it satisfies the following formula: (3)The optimized proportion of the average fitness values between two adjacent generation populations is less than the preset ratio. We decrease the optimized proportion accordingly in the second stage in consequence of the fact that the solution vectors obtained from the first stage are relative optimal solutions. We set the optimized proportion of the third termination condition of the second stage with . The second stage of the algorithm will terminate if it satisfies the following formula:

4. Evaluation

In order to simulate a dynamic cloud platform, we utilize a cloud simulator named CloudSim toolkit [29], version 3.0.3. The CloudSim framework can create different kinds of entities and remove data center entities at run time. The CloudSim framework can also calculate the status information of entities such as resource utilization and power consumption during the simulation period. We choose 6 kinds of host models as shown in Table 2 for CloudSim platform in the experiments.

According to Table 3, we need to create power model classes for each kind of host models to calculate the power consumption of the hosts in CloudSim platform [30].

In the experiments, DPGA needs some parameters of the hosts. The CloudSim platform does not provide the parameters , , and of the hosts which should have been obtained from the hardware providers. Therefore we need to calculate the approximate values of the parameters. Firstly, we pick up two groups of core voltage and core frequency for each kind of host model, and then we calculate their power consumption by the CloudSim platform. Finally, we utilize the matlab [31] to solve the multiple equations established by formula (2) according to the information of Table 4. The values of parameters are showed in Table 4.

The class PowerHost of the CloudSim platform does not contain the member variables of , , and . We create a new class which extends the class PowerHost by adding the member variables of , , and so that the entities in the experiments can record the information of parameters for DPGA. In the experiments, a data center consisting of hosts is created. These hosts are averagely composed of the above 6 kinds of host models. Then the data center creates VMs according to Table 5 averagely with the full utilization model as the original loads of the data center.

In the experiments, the data center creates VMs according to Table 6 averagely as the requirements of users with full utilization model.

4.1. Performance per Watt with Different Original Loads

In this experiment, we set the hosts number of the data center and the VMs number as the requirements of users. We adjust the VMs number as the original loads from 0 to 5000 and allocate these VMs to the hosts randomly. It represents different load levels of the data center. All idle hosts are switched to Sleep state. The experiment is designed for verifying the efficiency of DPGA in performance per watt of a cloud center under different original loads. In this scenario, we compare performance per watt of DPGA with ST (static threshold) which sets the utilization threshold to 0.9, IQR (interquartile range) which sets the safety parameter to 1.5, LR (local regression) which sets the safety parameter to 1.2, LRR (local regression robust) which sets the safety parameter to 1.2, and MAD (median absolute deviation) which sets the safety parameter to 2.5 [30]. As illustrated in Figure 2, DPGA placement strategy for VMs deployment under different original loads gets higher performance per watt than other placement strategies. Further, when , namely, the data center under an approximate idle state, performance per watt of DPGA placement strategy increases rapidly. When , namely, the data center under a low loading state, performance per watt of DPGA placement strategy increases at a relatively flat rate. When , namely, the data center under a moderate loading state, performance per watt of DPGA placement strategy is relatively stable. When , namely, the data center under an overloading state, performance per watt of DPGA placement strategy begins to decline gradually. This is because the hosts under the state from idle to load or under the overload states consume more power than the hosts under the state of a certain load. In conclusion, DPGA has a better performance per watt and is relatively more stable because DPGA placement strategy is the heuristic approach. It takes the performance per watt as evaluation standard and tends towards stability by two step iterations.

4.2. Performance per Watt with Different User Requests

In this experiment, we set the hosts number of the data center and the VMs number as the original loads. Then we allocate these VMs to the hosts randomly. We adjust the VMs number as the requirements of users from 10 to 50. All idle hosts are switched to Sleep state. The experiment is designed for verifying the efficiency of DPGA in performance per watt of a cloud center with different requirements of users. In this scenario, we compare performance per watt of DPGA with ST, IQR, LR, LRR, and MAD that take the same parameters as the experiment in Section 4.1. As illustrated in Figure 3, DPGA placement strategy for VMs deployment with different requirements of users gets higher performance per watt than other placement strategies. Further, with the increase of the requirements of users, DPGA placement strategy for VMs deployment gets more stable performance per watt than other placement strategies.

4.3. Performance per Watt with Different State of Idle Hosts

In this experiment, we set the hosts number of the data center and the VMs number as the requirements of users. We adjust the VMs number as the original loads from 0 to 5000 and allocate these VMs to the hosts randomly. It represents different load levels of the data center. There are two policies to be formulated for idle hosts. The first policy is On/Off policy, wherein all idle hosts are switched off. The second policy is On/Sleep policy, wherein all idle hosts are switched to Sleep state. The experiment is designed for verifying the efficiency of DPGA in performance per watt of a cloud center with different policies for idle hosts. In this scenario, we compare performance per watt of DPGA with On/Off policy for idle hosts and DPGA with On/Sleep policy for idle hosts. As illustrated in Figure 4, DPGA placement strategy for VMs deployment with On/Sleep policy gets higher performance per watt than DPGA placement strategy with On/Off policy when the data center is under an approximate idle state. DPGA placement strategy for VMs deployment with On/Sleep policy gets approximately the same performance per watt as DPGA placement strategy with On/Off policy when the data center is under a loading state. This is because the idle hosts at Sleep state consume certain power while the turned-off idle hosts do not consume any power. Therefore DPGA placement strategy for VMs deployment is more suitable for the cloud center under a loading state.

4.4. Actual and Theoretical Values of Performance per Watt

In this experiment, we set the hosts number of the data center and the VMs number as the requirements of users. We adjust the VMs number as the original loads from 500 to 5000 and allocate these VMs to the hosts randomly. It represents different load levels of the data center. All idle hosts are switched to Sleep state. In this scenario, we compare actual performance per watt of DPGA with theoretical performance per watt of DPGA calculated by formula (5). As illustrated in Figure 5, theoretical performance per watt is higher than actual performance per watt when the data center is under a low loading state. Theoretical performance per watt is approximately the same as actual performance per watt when the data center is under a moderate loading state. Theoretical performance per watt is lower than actual performance per watt when the data center is under an overloading state. This is because the hosts under a moderate loading state can calculate a relatively more accurate value of power consumption by DVFS formula than the hosts under a low loading state or an overloading state. In conclusion, DPGA placement strategy for VMs deployment is more suitable for the cloud center under a moderate loading state.

5. Conclusion

In this paper, we present the design, implementation, and evaluation of a distributed parallel genetic algorithm of virtual machine placement strategy on cloud platform. The algorithm is divided into two stages to get a better and more accurate solution. We assign the performance per watt as evaluation standard. We use the multipoint crossover method with self-adaptive crossover rate and the multipoint mutation method with self-adaptive mutation rate in the proposed approach. DPGA executes the first stage genetic algorithm with selected initial subpopulation and puts the solutions obtained into the second stage genetic algorithm as initial population. Then it finally gets a relatively optimal solution from the second stage. The experimental results show that our approach is an efficient, stable, and effective placement strategy for VM deployment.

To further improve the performance of placement strategy for VM deployment, there are also many problems that need to be solved in the future. The number of parallel executions in the first stage should be related to the size of solution space and the number of deployment VMs . We plan to assign the value of according to and . In population initialization process, we select initial subpopulation from solution space dispersedly and averagely. In crossover and mutation process, we use the multipoint crossover method with self-adaptive crossover rate and the multipoint mutation method with self-adaptive mutation rate. We plan to optimize the algorithm in detail. In the judgment of iterative termination conditions, the maximum iteration times should be related to the size of solution space and the number of deployment VMs . We plan to assign the maximum iteration times according to and . There are also two open questions on the termination of the two stages. One is to determine the difference ratio between the largest fitness value and average fitness value, and the other one is to determine the optimized proportion of the average fitness values between two adjacent generation populations. In this paper, to ensure that the algorithm is executed correctly, we assume that . In order to execute the algorithm efficiently in the case of , we plan to combine our approach with other methods. Our approach is appropriate for the case that all physical hosts of solution space are in a fast LAN and in the same network environment. We plan to extend our approach to WAN and different network environment. Our approach uses the parallel genetic algorithm. We plan to use other heuristic algorithms such as ant colony algorithm, bee colony algorithm, and particle swarm optimization to implement placement strategy of VMs deployment and compare their performance.

Conflict of Interests

The authors declare that there is no conflict of interests regarding the publication of this paper. There is no direct financial relation that might lead to a conflict of interests for any of the authors.