A multi-objective optimization for resource allocation of emergent demands in cloud computing

Cloud resource demands, especially some unclear and emergent resource demands, are growing rapidly with the development of cloud computing, big data and artificial intelligence. The traditional cloud resource allocation methods do not support the emergent mode in guaranteeing the timeliness and optimization of resource allocation. This paper proposes a resource allocation algorithm for emergent demands in cloud computing. After building the priority of resource allocation and the matching distances of resource performance and resource proportion to respond to emergent resource demands, a multi-objective optimization model of cloud resource allocation is established based on the minimum number of the physical servers used and the minimum matching distances of resource performance and resource proportion. Then, an improved evolutionary algorithm, RAA-PI-NSGAII, is presented to solve the multi-objective optimization model, which not only improves the quality and distribution uniformity of the solution set but also accelerates the solving speed. The experimental results show that our algorithm can not only allocate resources quickly and optimally for emergent demands but also balance the utilization of all kinds of resources.


Introduction
Cloud computing applies virtualization technology to divide massive physical resources into various virtual resources [1]. A large number of users can use these virtual resources on a cloud platform anytime and anywhere [2]. More and more applications are being deployed on cloud platforms, whose resource scales have become increasingly large with the application and development of cloud computing, big data and artificial intelligence. Cloud resource demands submitted to them also appear the characteristics of diversity, burst and emergency. Most existing methods of cloud resource allocation do not support the emergent mode, meaning that they cannot guarantee the timeliness and optimization of resource allocation. However, users pay more attention to the timeliness and optimization of their emergent resource demands, and cloud service providers are highly concerned with how to manage massive resources and improve resource utilization. An efficient resource allocation method is crucial to meet these goals. The process of resource allocation is a problem of virtual machine placement for finding the suitable physical servers upon which to place virtual machines (VMs). This process can not only satisfy resource demands of VMs but also improve the resource utilization of the cloud platform. To Find the optimal solution is also a problem. Some simple heuristic algorithms, such as Round Robin (RR) [3], Best Fit (BF) [4], and Min-Max [5], are applied in the resource allocation process of the small-scale cloud platforms. These algorithms are simple and easy, but they are also prone to waste resources, especially in large-scale cloud platforms.
The bin packing problem is one classical method of VM placement. The VM placement problem on physical servers is transformed into the bin packing problem of n objects packed into m boxes, which requires that all objects be placed in the minimum number of boxes. A dynamic bin packing method is proposed to reduce the total cost of cloud resource allocation by permanently closing the empty box [6]. An enhanced variable-sized packing particle swarm optimization algorithm (PSOLBP) is proposed to minimize the number of physical servers and to realize the load balance of physical servers, in which a levy flight algorithm is combined with a particle swarm optimization algorithm (PSO) to avoid the loss of particle dispersion when finding the local and global optimal solutions [7]. An online vector bin packing is used to build a multi-dimensional cloud resource dynamic allocation model (MDCRA), which uses a single weight algorithm and a double weight algorithm to maximize resource utilization, minimize the number of physical servers and energy [8]. The bin packing problem is classified as an NP-hard problem, which only solves the constraints of resource capacity and does not consider incompatible constraints.
Another classical method of cloud resource allocation is to model VM placement as a multi-objective optimization mathematical problem [9][10][11]. The main idea is to express a cloud resource allocation problem as a multi-objective mathematical function, and then to use a multi-objective evolutionary algorithm to solve it. An optimal VM placement method is proposed, which regards the minimum number of physical servers and the minimum times of VM migration as two objectives and uses a non-dominated sorting genetic algorithm with elite strategy (NSGA-II) to solve this multiobjective problem [12]. A task-oriented multi-objective scheduling method is presented, which takes into account multiple objectives, such as the completion time of tasks, cost and resource utilization, and uses the multi-objective ant colony optimization algorithm (MOSACO) to solve them [13]. A three-dimensional virtual resource scheduling method reduces energy consumption and minimizes service level agreement (SLA) violations from three aspects of virtual resource allocation, scheduling and optimization [14].
The cloud resource allocation is involved in costdriven [15,16], energy-saving [17,18], profit-driven [19], quality of service (QoS) assurance [20,21], utilizationimproving [22,23] and load balance methods [24,25]. A systematic resource allocation method based on the random optimization and Lyapunov optimization theories is proposed to ensure users' quality of experience (QoE) and minimize the cost of rented VMs. Considering the trade-off between resource utilization and application performance, a resource allocation algorithm is proposed to meet users' QoS requirements and maximize the resource utilization of a cloud platform [22]. A VM integration scheduling algorithm is proposed based on an active workload-prediction technology and a passive control technology, which uses an exponential smoothing method to predict future workload [26]. There also exist some cloud resource allocation methods for big data applications [27][28][29], scientific applications [30,31], video streaming [32], cloud manufacturing [33], mobile applications [34], and workflow [35,36].
Although some methods have been proposed for saving cost and energy, improving resource utilization and guaranteeing QoS in cloud computing, it is seldom studied how to allocate cloud resources quickly and optimally for emergent demands. A concept of task relaxation degree is proposed based on the deadline time and the execution time of a task, and the task whose relaxation degree is less than a threshold is regarded as the emergent task [37]. And a randomness aware scheduling method is proposed, in which the emergent tasks are executed preferentially on the existing free VMs or the newly added VMs. However, this method only sets some simple priority levels of tasks and does not consider the heterogeneous and diverse emergent resource demands. A machine startup-time-aware strategy is proposed to meet emergent tasks, where an emergent VM is provided and can scale up its CPU capacity dynamically [38]. The method of preparing VMs in advance is only suitable for a small amount of emergent resource demands. If a large number of VMs are prepared in advance, it can cause resource waste due to the idle time. In this paper, the emergent demand denotes the emergent resource demand, which is different from the common resource demand without the requirement of the deadline time of resource provision. The emergent demand should be allocated resources more preferentially than the common resource demand.
Although these methods are effective, most of them allocate resources fairly and do not preferentially satisfy the emergent resource demands. Using these methods will lead to poor effectiveness. An effective cloud resource allocation method should meet the following conditions for emergent resource demands. First, the emergent cloud resource demands should be satisfied preferentially. Second, the optimal cloud resources should be provided. Third, the physical servers should be used as little as possible, and the proportion between different types of resources (number of CPU cores: memory capacity: disk size) should be as uniform as possible to reduce resource waste and improve resource utilization.
To solve the above problems, this paper proposes a cloud resource allocation algorithm for emergent demands. The main contributions of this paper are as follows.
(1) We propose a novel priority of resource allocation based on users' priorities and emergent grades of resource demands, which guarantees the emergent resource demand to be allocated resources preferentially. (2) We propose a model of resource performance matching, which selects more suitable physical servers to provide resources with better performance for VM requests based on resource performance matching distance between VMs and physical servers. (3) We propose a model of resource proportion matching, which builds the resource proportion matching distance to ensure the balanced utilization among different types of resources of physical servers. (4) We propose a method RAA-PI-NSGAII to enhance the quality and distribution uniformity of the solution set and accelerate the solving speed by improving NSGA-II algorithm, which further ensure the timeliness and optimization of cloud resource allocation.
A list of the mathematical notations used in this paper is given in Table 1.

Cloud resource allocation process
Resource allocation and scheduling of a cloud platform generally consists of three steps, as shown in Fig. 1. The cloud platform allocates resources to create the requested VM on an appropriate physical server when a user applies for a VM. The cloud platform can scale out or scale in some VMs to ensure the performance of a virtual cluster or reduce the cost according to an auto-scaling strategy when the resource load of a running virtual cluster is too high or too low. One or multiple VMs can also be dynamically migrated to other physical servers to maintain the load balance of the whole cloud platform when a physical server is overloaded.
The first two forms involve in VM creation, which mainly selects the appropriate physical servers to allocate resources for the requested VMs. The final form involves VM migration, which selects virtual machines and migrates them to other appropriate physical servers. This paper mainly studies cloud resource allocation method for the first two forms.
Non-dominated sorting genetic algorithm with elite strategy (NSGA-II) The key of cloud resource allocation is to find the suitable physical servers to create VMs and improve resource utilization of a cloud platform. Especially, the timeliness and optimization of cloud resource allocation are more important for emergent demands. However, it is not feasible to find the optimal solution by enumerating all feasible solutions because there are a large number of heterogeneous physical servers and various VM requests in a cloud platform. The simple Round Robin (RR) algorithm uses a polling mechanism to select a suitable physical server to create a VM, and Best Fit (BF) algorithm deploys a VM to a physical server that satisfies the VM demand and has the least idle resource. However, these methods generally cause resource waste and resource mismatch because of randomness.
The NSGA-II is an effective multi-objective genetic algorithm [39] often used in solving the multi-objective problem of cloud resource allocation. Figure 2 shows the implementation process of NSGA-II algorithm. First, the population of size N and the iteration times G are initialized. Second, the initialized population is sorted using a non-domination, and all individuals of the population are assigned to a different non-dominant rank. Third, the objective values and the crowding distances of all individuals are calculated according to the following formula (1), where f k iþ1 , f k i − 1 , represents the objective values of the adjacent i − 1 and i + 1 individuals of the i individual on the dimension k.
Then, the excellent individuals are selected to construct a new parent population according to their nondominant ranks and crowding distances. If the nondominant rank of an individual is smaller than that of others, this individual will be selected. The individual with a higher crowding distance is selected if both the individuals have the same non-dominant rank. Then, the parent population goes through selection, crossover and mutation to generate the offspring population of size N. Subsequently, a population of size 2N is generated by combining the offspring population with the parent population. Then, the above process continues to be executed until the stopping condition is reached for this combined population.

A multi-objective optimization model for cloud resource allocation
We design the priority of resource allocation to respond to emergent demands, build the matching distance of  resource performance to realize resource optimization, and establish a matching distance of resource proportion to balance the utilization of all types of resources. Finally, we consider the benefits of cloud users and service providers and set up a multi-objective optimization model for cloud resource allocation with the goals of minimizing the number of the used physical servers, improving resource utilization and reducing resource fragmentation of the cloud platform.

Priority of resource allocation
A cloud platform generally sets users' priorities to sequentially allocate resources, which cannot respond to emergent demands quickly. Thus, we further propose another parameter: the emergent grade, which indicates an emergent degree of a user's resource demand. Thus, the priority of a user's resource allocation can be calculated by a user's priority and his emergent grade, which guarantees that the emergent resource demands can be satisfied preferentially. However, a user's priority and emergent grade need to be normalized before carrying out the calculation because their units are inconsistent. Supposing the priority of a cloud user is denoted as R = (R 1 , ..., R i , ..., R n ), the normalized user priority can be calculated by formula (2), where R min and R max represent the minimum and the maximum value of all users' priorities, respectively, where R i represents the priority of the i th user. All users' priorities will be set as zero if users' priorities need not be considered in the cloud resource allocation.
Similarly, supposing the emergent grade of users' resource demands is denoted as G = (G 1 , ..., G i , ..., G n ), the normalized emergent grade can be calculated by formula (3), where G min and G max represent the minimum and the maximum values of the emergent grades of all users' resource demands, respectively, where G i represents the emergent grade of the resource demand of the i th user.
Thus, the priority of a user's resource allocation can be calculated using the weighted average method according to formula (4), where α and β represent the weights of the normalized priority R ni and the emergent grade G ni , respectively.

Resource performance matching distance
To meet the emergent resource demands, it is necessary to match the optimal resources in addition to ensuring the timeliness of resource allocation, which means that a VM should be placed on a physical server, whose resource performance is more appropriate for the performance requirement of the VM. For instance, if a user requests a compute-intensive virtual machine, a compute-intensive physical server will be selected to allocate resources for this VM. Thus, we set up a resource performance matching distance between a VM and a physical server based on their resource performance vectors. The smaller the resource performance matching distance, the better the resource performance matching between them. Users' resource demands are expressed as a request queue V = < v 1 , ..., v i , ..., v n >, where v i represents the i th VM and n denotes the sequence number of VM requests. The resource demand of the VM v i is expressed where v ic , v im and v id denote the number of CPU cores, the memory capacity and the disk size requested by the VM v i , respectively. The available physical servers of a cloud platform are represented as a physical server group P = (p 1 , ..., p j , ...p n ). Each physical server has the total resource capacity p j = (p jc , p jm , p jd ) and the free resource capacity p j ðp The performance vector of a VM v i is expressed as vv i = (vv ic , vv im , vv id ) for a physical server p j . The elements in this vector can be calculated by the formulas.
Memory performance vector : Disk performance vector Similarly, the performance vector of a physical server is denoted as pv j = (pv jc , pv jm , pv jd ) . The elements in this vector can be calculated by the formula as follows. Then, we calculate the normalized performance vector nvv i = (nvv ic , nvv im , nvv id ) of the VM v i and the normalized performance vector npv j = (npv jc , npv jm , npv jd ) of the physical server p j according to their performance vectors vv i and npv j . Consequently, the optimal objective function-that is, the resource performance matching distance MD ij between the VM v i and the physical server p j -is established on their performance vectors. The smaller the distance, the better will be the resource performance matching between the VM and the physical server.
And the resource demands of all VMs placed on a physical server should be less than the free resource of this physical server p j . So the constraint should be considered as follows.
Resource proportion matching distance Physical servers are heterogeneous, and VM demands are different for all kinds of resources in cloud computing. When a VM is created on a physical server, it can lead to a varied proportion among different types of free resources of the physical server, such as the free number of CPU cores, memory capacity and disk size. When one type of resource has been exhausted, a physical server will no longer create a new VM despite there still remaining a large amount of other types of resources. For instance, if the CPU resource of a physical sever is exhausted, it cannot create VMs though it may have large memory capacity and disk size, which will result in resource fragment generation and resource waste. To reduce resource waste, it is necessary to consider the proportion between different types of resource demands of VMs and different types of free resources of physical servers. A VM should be created on the physical server whose resource proportion is closer to that of this VM. Thus, the proportion of different types of resources can always maintain uniformity on a physical server, which reduces the probability of resource fragment generation. Therefore, the resource allocation problem changes into a problem of finding a resource proportion reflection of the resource demands of VMs and free resources of physical servers. A physical server should be selected to allocate resources for this VM because its proportion among different types of free resources is closer to that among different types of requested resources of this VM, that is, if p jc : p jm : p jd is closer to v ic : v im : v id , where v ic , v im and v id denote the requested number of CPU cores, memory capacity and disk size of the VM v i and p jc , p jm and p jd denote the free number of CPU cores, memory capacity and disk size of the physical server p j , the physical server p j should be selected to allocate resources for the VM v i . The resource proportion matching distance between different types of resources is set up between a VM and a physical server by the following formula. The closer the resource proportion matching distance is, the fewer resource fragments and the greater the resource utilization there will be.
Similarly, the constraint should be considered as follows.
A multi-objective optimization model of resource allocation There are a large number of physical servers in a cloud platform, which generates a large number of VMs to provide resource services. These VMs always manifest with different performances regardless of whether the physical servers are heterogeneous or homogeneous. A good algorithm should ensure the fastest and optimal resource allocation for emergent demands. The process of resource allocation is to place a virtual machine to the appropriate physical server. If a VM v i is placed on a physical server p j , the mapping element x ij between this VM and this physical server should satisfy x ij = 1; otherwise, x ij = 0. The mapping matrix from the VM request queue V to the physical server group P may be expressed as follows.
X ¼ x 11 ::: x 1 j ::: x 1n ::: ::: ::: ::: ::: x i1 ::: x ij ::: x in ::: ::: ::: ::: ::: x m1 ::: x mj ::: The mapping from the VM queue to the physical server group can be expressed as follows. So, the number of the used physical servers can be calculated by summing all elements of the matrix X-that is, P m i¼1 x ij . Thus, a multi-objective optimal resource allocation model can be established based on the minimum number of the used physical servers, the minimum resource performance matching distance and the minimum resource proportion matching distance, as follows.
The constraints should satisfy the relation that the resource demands of all VMs placed on a physical server p j cannot exceed its free resources as follows.
S:T : And if one type of free resource capacity p f jh of a physical server p j cannot satisfy the resource demand v ih of any VM, the ratio of other type of free resource capacity p f jk to the total resource capacity p jk should be less than a threshold ε k as the formula (23), where the symbol h denotes one type of resource, such as CPU, and the sign k denotes another type of resource, such as memory or disk. Thus, three types of resources will be used evenly, which largely reduces resource fragments.
Thus, the resource allocation algorithm is transformed into the solution of a multi-objective mathematical model. This multi-objective mathematical problem is NP-hard because its solution is not uniquely definite value, that is, it is not single but multiple. These solutions can be obtained by using a multi-objective evolutionary algorithm, but they cannot be compared.

The multi-objective optimization algorithm RAA-PI-NSGAII
A multi-objective optimization mathematical problem can be solved by a multi-objective evolutionary algorithm. Moreover, the algorithm should accelerate the solution process and improve the quality of the solution set to ensure the timeliness and optimization of resource allocation for emergent demands. NSGA-II is a non-dominated sorting genetic algorithm that has been used to solve the multi-objective optimization problems and has achieved good effectiveness [40][41][42][43][44].
The traditional NSGA-II algorithm has three problems in solving the multi-objective optimization model of resource allocation, as follows. First, the computation time of the values of objective functions is too long to allocate resources in a timely manner; hence, it cannot meet emergent resource demands. Second, the individuals from the parent and offspring populations may be repetitive in the process of population evolution. After the parent and offspring individuals are merged, the repetitive individuals have non-dominant relationships and are assigned the same hierarchical rank. These individuals may be selected into the next-generation population because their crowding distances may be larger than those of the non-repetitive individuals, which will cause many repetitive solutions to enter into the optimal solution set. As shown in Fig. 3, the a and b points are the repetitive individuals, and their crowding distances are greater than the points h and i; consequently, they are preferentially selected to enter the next- generation population. Third, the distribution of the solution set is not uniform. As shown in Fig. 4, although the a individual is very close to the b individual, both of them may be retained because of their larger crowding distances. In contrast, both the f individual and the g individual may be eliminated, which results in an uneven population distribution. Obviously, the c individual and the d individual have the same situation, and a good selection is to retain one of them. Therefore, we propose a cloud resource allocation algorithm based on a parallel and improved NSGA-II algorithm (RAA-PI-NSGAII), which computes the fitness values of individuals concurrently, removes the repetitive individuals and selects the adjacent excellent individuals to improve the quality of the solution set, accelerates the solving speed, and optimizes the distribution uniformity of the solution set. Thus, the timeliness and optimization of resource allocation are further guaranteed for emergent demands.
The multi-objective optimization algorithm of cloud resource allocation RAA-PI-NSGAII improves the NSGA-II algorithm in the following respects.

Parallel computation and evaluation of the fitness function
The computation and evaluation time of the fitness values is very long due to too many individuals in the population. The multi-core processors calculate the fitness values of individuals and evaluate them in parallel, which can speed up the convergence rate of the proposed algorithm. We calculate and evaluate the fitness values (i.e., objective functions) of each individual as follows.
Optimal selection of adjacent individuals Some individuals remain after all individuals are sorted in a non-dominant order, and the repetitive individuals who cause the non-uniformity distribution of the solution set are removed. Consequently, we should further select excellent individuals to enter the next generation population. We calculate the Euclidean distance between two adjacent individuals to determine whether the distance is less than a threshold. If it is, the excellent individual is selected according to the following strategy.

Definition of threshold
Calculate the maximum Euclidean distance max(D rank(i) ) of two individuals of the non-dominant set and the threshold ε according to formula (27), where N is the population size.
Selection of adjacent excellent individuals The Euclidean distance d ij of two adjacent i and j individuals is first calculated after removing repetition in the non-dominant set. As shown in Fig. 5, if the distance d ij is less than the threshold ε, the individuals h and k adjacent to them are determined, and their centre point f is calculated. Then, the individual from the set of i and j that is closer to f is retained. As a result, the individual j is retained, and the individual i is removed. The implementation of the whole algorithm consists of two parts. The parameters are initialized, and the multi-objective optimization function of resource allocation is established in Algorithm 1. The improved NSGA-II algorithm is used to solve the multiobjective optimization function, as shown in Algorithm 2. The main steps of the implementation of the algorithm RAA-PI-NSGAII are as follows.
-Step 1: Construct a multi-objective optimization resource allocation model. -Step 2: Initialize the parameters of RAA-PI-NSGAII algorithm, such as the parent population S 1 , the offspring population Q 1 , crossover and mutation probability P c , cross distribution index I cd , mutation probability P m , mutation distribution index I md , maximum iteration times G and population size N. In theoretical analysis, the algorithm RAA-PI-NSGAII takes into account users' priorities and emergent grades to calculate the priority of resource allocation, which guarantees the rapid resource allocation for the urgent resource demands. Additionally, the resource performance matching distance depicts the distance between a VM performance vector and a physical server performance vector, which ensures more suitable resource allocation for urgent resource demands. Finally, the resource proportion matching distance makes the proportion among different types of resources of a VM request closer to that among different types of resources of a physical server, which reduces the resource fragment of a physical server.

Experimental setup
We use the cloud computing simulation software 'CloudSim' and a multi-objective algorithm framework 'Jmetal' to test and verify the effectiveness, repetitiveness removal, distribution uniformity and solving time of our algorithm. The simulation program is written in Java and deployed on a Lenovo Thinkpad notebook (8G memory, Intel Core i7 6500U).
Three types of resources (CPU, memory and disk) are considered in this experiment. A cloud datacenter composed of 400 physical servers is simulated using 'Cloudsim' software. There are four types of physical servers, and each type includes 100 physical servers. Table 2 shows the total and free number of CPU cores, memory capacity and disk size for each type of physical server. There exist five common specifications of VMs in Table 3. In this experiment, we assume five users applying for different types but having the same number of VMs. Users' priorities are positive integer numbers generated randomly within integer number set [1,5], with larger number corresponding to higher priorities. We use the emergent grades to express the degrees of emergent resource demands. The emergent grades of VM requests are also generated randomly within the integer number set [1,5]. Similarly, the greater the value, the higher the emergent degree is. The total numbers of VMs requested by users are set as the values 100, 200, 400, 600, 800, and 1000, respectively. The units of different types of resources differ, so the direct calculation of the original data will cause the proportion among them to be dominated by one type of resource. For instance, the proportion among free number of CPU cores, free memory capacity and free disk size is 48:192:1800 for a P1 type of physical server, which may cause the matching distance of resource proportion to be dominated by the disk. We divide the data of the disk size by 10 to prevent the domination of disk resource.
The population size, the crossover probability, the crossover distribution index and the mutation distribution index are set as 200, 0.85, 20 and 20, respectively, in the experiment on the RAA-PI-NSGAII algorithm. The mutation probability is set as the reciprocal of the number of variables. The maximum number of evaluations of fitness values and iterations are set as 20,000 and 100, respectively. We execute each algorithm 10 times and compute the average results.

Metrics
To verify the effectiveness and performance of the RAA-PI-NSGAII algorithm, we evaluate and compare it with other algorithms on these following metrics.

Number of the used physical servers
The physical servers should be used as little as possible when VMs are created according to the resource allocation algorithm. The fewer used physical servers there are, the more the idle physical servers can be closed, thereby reducing energy consumption and cost.

Matching distances of resource performance and resource proportion
The matching distances of resource performance and resource proportion can be used to evaluate the matching degree of the resource demands of VMs and the free resources of the physical servers. The smaller the distances, the better the virtual resource demands match with physical resources. Thus, the VMs will have better performance, and fewer resources are wasted.

Resource utilization
A good multi-dimensional resource allocation algorithm should maximize and homogenize each type of resource utilization.

Repetition rate of the solution set
The repetition rate of the solution set is defined as the ratio of the repetitive solutions to the total number of solutions. The smaller its value, the better the solution set is, which indicates that the algorithm has better effectiveness with regard to resource allocation.

Distribution uniformity of the solution set
The spacing metric (SP) is an effective index that can be used to evaluate the distribution uniformity of the solution set, as proposed by Schoot. The smaller the SP value, the better the distribution of the solution set is. SP is formulated as follows, where n is the number of solutions, d k is the distance between the individual k and its nearest individual h, and d is the average value of d k .
The distance d k of the adjacent individuals is defined as follows, where f k l is the value of the k th individual on the objective dimension l.

Experimental results and analysis
In the experiments, we recalculate the priorities of resource allocation according to users' priorities and emergent grades generated randomly. For example, 400 VM requests from 5 users have different emergent grades  and users' priorities. The 215th, 219th, 223th, 227th, 230th, 236th, 245th, 264th, 279th and 282th VM requests in the queue belong to the same user with the highest user priority and have the highest emergent grades. These VMs are preferentially allocated resources by the first to the 10th order in the queue, which ensures the timelessness of resource allocation for VMs with higher priorities. To verify the effectiveness of our proposed RAA-PI-NSGAII algorithm, we compare it with the RR, BF, NSGA-II and SPEA2 algorithms according to the number of the used physical servers, resource utilization, resource matching, repetitive solution removal, and solution distribution uniformity. The BF algorithm is a single-type resource allocation method. CPU is the allocated resource type in the BF algorithm experiment. A cloud platform receives various VM requests and then creates VMs on physical servers according to the solution of a resource allocation algorithm. Figure 6 shows the number of physical servers used for different VM requests. It can be observed that the BF algorithm uses the fewest physical servers. For instance, 600 VMs are created on 103 physical servers and 1000 VMs are created on 144 servers. The BF algorithm first creates a VM on a physical server that can meet the resource demand of this VM and has the fewest free resources. The RR algorithm uses the largest number of physical servers due to its polling mechanism. The multi-objective evolutionary algorithm SPEA2, NSGA-II, and our proposed RAA-PI-NSGAII algorithm use more physical servers than the BF algorithm but fewer than the RR algorithm. Since these three algorithms aim to use the fewest physical servers, the solving results are similar. Each algorithm uses almost the same number of physical servers for the same VM requests. Relatively, the RAA-PI-NSGAII algorithm uses fewer physical servers than the    Table 4 shows the experimental results of the different algorithms according to their resource performance and resource proportion matching. It can be seen that the MD and MP of the RR algorithm reach maximum values because it adopts a polling strategy and does not consider any resource matching. The BF algorithm places virtual machines on physical servers with the fewest CPU resources, so its MD value is slightly lower than that of RR algorithm. The multi-objective evolutionary algorithms SPEA2, NSGA-II and RAA-PI-NSGAII aim at achieving the minimum number of physical servers, the minimum matching distance of resource performance and the minimum matching distance of resource proportion, so their MD and MP values are smaller than those of the BF and RR algorithms. Among them, the MD and MP values obtained by the RAA-PI-NSGAII algorithm are smaller than those of the SPEA2 and NSGA-II algorithms, which demonstrates that the RAA-PI-NSGAII algorithm is more effective than other algorithms in regard to matching the optimal physical resources for VMs and reducing resource fragments. Figures 7, 8, 9 show the effectiveness of different algorithms in regard to improving resource utilization. It is noted that the curves of NSGA-II and RAA-PI-NSGAII methods are offset by 2 units along the Y-axis to make them clear. The BF algorithm deploys VMs on fewer servers, which can cause the resource load to grow too fast to maintain the stability of a cloud platform. The RR algorithm appears to have the lowest utilization of the CPU, memory and disk, but the use of these resources  increases much faster than that of other algorithms with the increase of the number of VM requests. Because the SPEA2, NSGA-II, and RAA-PI-NSGAII algorithms consider the resource proportion matching of different types of resources, their utilization of the CPU, memory and disk are always stable and slightly increase with the increase of the number of VM requests, which is beneficial to the stability and resource optimization of a cloud platform.
The repetitive individuals not only deteriorate the search efficiency due to the overlapped search space but also greatly influence the evaluation of the solution distribution. The repetition rates of the solution set of the SPEA2, NSGA-II and RAA-PI-NSGAII algorithms are compared in Table 5. The SPEA2 algorithm has the highest repetition rate, which is greater than 20% or even up to 27.20%. The NSGA-II algorithm has the second highest repetition rate, and its repetition rate is close to 25%. Our proposed RAA-PI-NSGAII algorithm greatly reduces the number of repetitive individuals and achieves a 1.36% repetitive ratio.
To validate the advantages of our algorithm, we calculate the SP values of three algorithms in Table 6. The average SP values of the RAA-PI-NSGAII algorithm are smaller than those of the NSGA-II algorithm, which shows that the RAA-PI-NSGAII algorithm improves the distribution uniformity of the solution set. However, we also find that SP values of the RAA-PI-NSGAII algorithm are obviously higher than those of the SPEA2 algorithm.
We randomly select a solution of each algorithm for further analysis. The distribution of the Pareto optimal solution set of the SPEA2, NSGA-II and RAA-PI-NSGAII algorithms are shown in Figs. 10, 11 and 12 for different VM requests. It can be seen that the solution distribution of the NSGA-II algorithm is not uniform. The solution is sparse or even zero in some regions, while the solution is dense and repeated in other regions. We can also observe that the SPEA2 algorithm has many repetitive solutions that stack together. Because the zero distance between the repetitive solutions greatly affects the distribution of the solution set, the SPEA2 algorithm achieves low SP values. The distribution of the solution set of the RAA-PI-NSGAII algorithm. is relatively uniform, but may not be dense, and there are still some sparse regions. This paper mainly focuses on reducing the solving time and improving the quality and distribution uniformity of the solution set. In the future, we will further use Hypervolume (HV) to evaluate the convergence and diversity of the obtained solution set.
We performed an experiment to obtain the solving time of each algorithm. The solving time of the BF and RR algorithms are both short, within 1 s, while those of the multi-objective evolutionary SPEA2, NSGA-II, RAA-PI-NSGAII algorithms are relatively long due to performing multiple generation evolution of the population. Table 7 compares the results of the RAA-PI-NSGAII, SPEA2 and NSGA-II algorithms. The NSGA-II algorithm is more effective than the SPEA2 algorithm. The NSGA-II algorithm takes 5 and 20 s less than the SPEA2 algorithm to perform 200 and 600 VM requests, respectively. We use 8, 32 and 128 threads to  solve the multi-objective problem based on the RAA-PI-NSGAII algorithm. Obviously, the solving time of the RAA-PI-NSGAII algorithm is greatly reduced compared to those of the SPEA2 and NSGA-II algorithms. The solving time of the RAA-PI-NSGAII algorithm using 8-thread parallel execution is 40% lower than those of the SPEA2 and NSGA-II algorithms and is lower by 30% using 32-thread and 128-thread parallel execution.

Conclusion
With the development of cloud computing, big data and artificial intelligence, cloud resource demands demonstrate the characteristics of diversity, burst and uncertainty. Undoubtedly, cloud platforms often encounter such emergent resource demands, which needs to be allocated resources quickly and optimally. This paper proposes a multi-objective optimization cloud resource allocation algorithm for emergent demands. The priority of resource allocation is first designed to respond to emergent demands, and resource performance and resource proportion matching distances are established to realize resource optimization and balanced utilization of all types of resources. Then, a multi-objective optimization algorithm of resource allocation is presented to guarantee the timeliness and optimization of resource allocation, in which a multi-objective mathematical model minimizes three objectives to optimize resource utilization and an improved NSGA-II algorithm accelerates the solving speed and improves the quality and distribution uniformity of the solution set. Experiments are performed to compare our proposed RAA-PI-NSGAII algorithm with the RR, BF, SPEA2 and NSGA-II algorithms. The results of this study verify the effectiveness of our algorithm to meet the emergent demands in cloud computing.