A virtual machine deployment planning method based on multi-colony ant colony algorithm
Through multiple ant colony algorithms and heuristic pheromone update mechanisms, the virtual machine deployment scheme is optimized, which solves the problem of slow convergence speed of the existing ant colony algorithm and achieves efficient load balancing and execution time optimization of the cloud data center.
Patent Information
- Application Number
- CN202311752423.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-19
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2043-12-19
AI Technical Summary
Existing server load balancing methods based on the ant colony algorithm have slow convergence speeds and low overall efficiency, and fail to effectively solve the load balancing challenges in cloud data center resource allocation.
Using a variety of ant colony algorithms, by constructing time populations and load balancing populations, combined with greedy algorithms and heuristic pheromone update mechanisms, the virtual machine deployment plan is optimized, and server resources are dynamically selected to achieve dual optimization of load balancing and execution time.
It improves the overall efficiency of virtual machine deployment, can quickly find optimized deployment solutions when server resources are limited, significantly improves the optimization effect of load balancing and execution time, and reduces the quality and difficulty of solutions.
Smart Images

Figure CN117785381B
Abstract
Description
Technical Field
[0001] The present application relates to the technical field related to virtual machine deployment optimization in cloud computing, and in particular to a virtual machine deployment planning method based on a multi-swarm ant colony algorithm. Background Art
[0002] Virtual machines are generated based on specific operating systems and resource requirements specified by customers, including CPU, memory, etc. Virtual machines are deployed on physical servers and used as hosts for applications to meet the diverse needs of customers. At the same time, virtualization enables multiple virtual machines to be executed on a single physical server at the same time. Cloud data centers deploy many virtual machines to provide services to users, utilizing various virtualization platforms. However, this leads to the heterogeneity of cloud infrastructure and the inconsistency of user demand specifications, making it challenging to achieve load balancing during resource allocation in cloud data centers. Therefore, the problem of virtual machine placement aimed at achieving load balancing has always been a key research issue in cloud resource scheduling. On the other hand, before users can use the services provided by the cloud platform, they will sign a service level agreement (SLA) with the cloud service provider. The SLA will clearly list the user's requirements, including execution time, cost, system stability, and system security. By combining these requirements with practical considerations, cloud computing mainly considers several key aspects, so the execution time of the entire server system is also a common optimization target to ensure the quality of service.
[0003] In the prior art, a server load balancing method based on an ant colony algorithm is proposed, in which each ant only locally updates the pheromone after building its own result set. However, this method results in a slow convergence speed of the algorithm.
[0004] In summary, based on the above problems, no effective solution has been found in the prior art.
[0005] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention
[0006] In view of the above-mentioned shortcomings and deficiencies of the prior art, the present application provides a virtual machine deployment planning method based on a multi-colony ant colony algorithm to solve the problems of slow convergence speed and low overall efficiency of the existing server load balancing algorithm based on the ant colony algorithm.
[0007] The present application provides a virtual machine deployment planning method based on a multi-swarm ant colony algorithm, including:
[0008] Build a list of virtual machines and servers based on the dataset;
[0009] Initialize the pheromone between the virtual machine and the server, and calculate the target value of the server cluster through a greedy algorithm; the target value includes a time target value and a load balancing target value;
[0010] Iterate the different populations in the server cluster respectively, and obtain multiple virtual machine deployment schemes by constructing the individuals in each round of iteration; the virtual machine deployment scheme includes the deployment position of each virtual machine in the virtual machine list and the target value of the server cluster; the server cluster includes a time population and a load balancing population;
[0011] Initialize the Archive solution set to store all virtual machine deployment solutions generated in each round of iteration until the current population iteration ends.
[0012] In one embodiment of the present invention, the virtual machine list includes multiple virtual machines, the CPU and memory required for the operation of each virtual machine; the server list includes multiple servers, the CPU and memory that each server can provide; a single server carries multiple virtual machines, and a single virtual machine is only deployed to one server; when the CPU or memory of the server is full, it will no longer continue to carry the virtual machine.
[0013] In one embodiment of the present invention, the different populations in the server cluster are iterated respectively, and multiple virtual machine deployment schemes are obtained by constructing individuals in each round of iteration, specifically including:
[0014] Iterating the time population and the load balancing population respectively, and constructing individuals in each round of iteration to obtain multiple virtual machine deployment solutions;
[0015] When each individual completes the construction of the virtual machine deployment plan, it performs a local update of the pheromone;
[0016] When all individuals have completed construction and one iteration, the pheromone is globally updated and the next iteration is executed until the iteration termination condition is reached; the termination condition is that the target values of several different and feasible virtual machine deployment solutions do not match each other.
[0017] In one embodiment of the present invention, the time population and the load balancing population are iterated respectively, and individuals in each round of iteration are constructed to obtain multiple virtual machine deployment schemes, specifically including:
[0018] In each round of iteration of the time population and the load balance population, initializing an independent heuristic information matrix of any individual;
[0019] According to the pheromone and the heuristic information matrix, the virtual machine to be deployed currently is deployed to a server with remaining resources until the individual completes the deployment of all virtual machines in the virtual machine list.
[0020] In one embodiment of the present invention, the different populations correspond to different heuristic information matrix needles;
[0021] When it is the time population:
[0022]
[0023] Among them, η 1 (i,j) k is the heuristic information value of the temporal population, ET k is the processing time of individual k in the current process of constructing the solution;
[0024] When it is the load balancing population:
[0025]
[0026] Among them, η 2 (i,j) k is the heuristic information value of the load balancing population, Uc ki , Ur ki and They represent the CPU usage of the jth server, the average CPU usage of all servers, the memory usage of the jth server, and the average memory usage of all servers after the i-th virtual machine is deployed to the j-th server during the current solution construction process of individual k; when the i-th virtual machine is deployed to the j-th server, the smaller the difference between the CPU and memory usage of server j and the average CPU and memory usage of all servers, the greater the heuristic information value.
[0027] In one embodiment of the present invention, when the target individual selects a server for deployment for the current virtual machine, a judgment is made for all servers in the server list:
[0028] If the CPU or memory of the current server is not fully occupied, or the CPU or memory of the current server does not exceed the limit after hosting the current virtual machine, it is determined that the current server meets the deployment conditions;
[0029] If the CPU or memory of the current server is fully occupied, or the CPU or memory of the current server exceeds the limit after hosting the current virtual machine, it is determined that the current server does not meet the deployment conditions.
[0030] In one embodiment of the present invention, when the target individual selects a server for deployment of the current virtual machine, the step of selecting the server includes:
[0031] Generate a random number q∈[0,1], if q≤q0, select the target server for deployment from the servers that meet the deployment conditions according to the target formula; if q>q0, select the target server for deployment from the servers that meet the deployment conditions through the roulette method, q0 is the parameter.
[0032] In one embodiment of the present invention, the target formula is:
[0033] argmax{[τ(i,j) α ]×[η(i,j) β ]};
[0034] Among them, τ(i,j) represents the pheromone between virtual machine i and server j, η(i,j) represents the heuristic information value between virtual machine i and server j, and α and β are parameters;
[0035] The formula for the roulette method is:
[0036]
[0037] Where p(i,j) is the probability that virtual machine i is deployed to server j, and N is the total number of virtual machines.
[0038] In one embodiment of the present invention, the pheromone between the initialization virtual machine and the server is calculated by a greedy algorithm to obtain a target value of the server cluster, which specifically includes:
[0039] In the time population, τ0 colonyT ij =greedyET; where τ0 colonyT ij is the pheromone of the initialized time ant colony, greedyET is the greedy time target value;
[0040] In the load-balanced population, τ0 colonyL ij =greedyLB; where τ0 colonyL ij is the pheromone of the initialized load balancing ant colony, and greedyLB is the greedy load balancing target value.
[0041] In one embodiment of the present invention, the pheromone is locally updated or globally updated according to different preset rules, wherein:
[0042] The preset rule formula for locally updating the pheromone is:
[0043] τ(i,j)=(1-ρ)×τ(i,j)+ρ×τ0;
[0044] Among them, ρ is the local renewal volatility factor of pheromone, τ0 is the initial value of population pheromone;
[0045] The rule formula for globally updating the pheromone is:
[0046] τ col (i,j)=(1-ε)×τ col (i,j)+ε×△τ(i,j);
[0047] Among them, ε is the volatility factor of the global update of pheromone, and △τ(i,j) is the pheromone released by the globally updated individual between virtual machine i and server j.
[0048] The above technical solution of the present application has the following advantages compared with the prior art:
[0049] The present application provides a virtual machine deployment planning method based on a multi-colony ant colony algorithm. Based on the characteristics of the virtual machine problem, dynamic heuristic information and a unique pheromone calculation method are designed, and the deployable locations of different virtual machines are determined in combination with the remaining resources of the server. The multi-colony ant colony algorithm can be used to obtain an overall deployment plan under the constraint of limited server resources, so as to achieve the two goals of simultaneously optimizing the execution time of the server cluster and the load balancing degree of the server cluster, and finally obtain a set of non-dominated solutions with low solution difficulty and high solution quality.
[0050] In the application process of the ant colony algorithm, unique pheromones and heuristic information designed for the problem are used to effectively guide the time population and load balance population to construct solutions. The overall efficiency is high, and the effect is particularly significant in large-scale data sets. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] In order to make the content of the present invention more clearly understood, the present invention is further described in detail below according to specific embodiments of the present invention in conjunction with the accompanying drawings, wherein:
[0052] Figure 1 A flowchart of a virtual machine deployment planning method based on a multi-colony ant colony algorithm provided in an embodiment of the present application is shown;
[0053] Figure 2 A schematic diagram of the construction and solution process of the virtual machine deployment planning method based on the multi-colony ant colony algorithm provided in an embodiment of the present application is shown;
[0054] Figure 3A comparison diagram of the solution results of the method of the present application and the four algorithms in the examples based on a small-scale example provided in the embodiment of the present application is shown;
[0055] Figure 4 A comparison diagram of the solution results of the method of the present application and the four algorithms in the examples based on a medium-scale example provided in an embodiment of the present application is shown;
[0056] Figure 5 A comparison diagram of the solution results distribution of the method of the present application based on a large-scale example provided in an embodiment of the present application and the four algorithms in the example is shown. DETAILED DESCRIPTION
[0057] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the drawings in the present application only serve the purpose of explanation and description and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn in real proportion. The flowchart used in this application shows the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowchart can be implemented out of sequence, and the steps without logical context can be reversed in order or implemented simultaneously. In addition, those skilled in the art, under the guidance of the content of the present application, can add one or more other operations to the flowchart, or remove one or more operations from the flowchart.
[0058] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0059] In order to enable those skilled in the art to use the contents of this application, the following implementation method is given in combination with the specific application scenario "Virtual machine deployment planning based on multi-colony ant colony algorithm". For those skilled in the art, the general principles defined here can be applied to other embodiments and application scenarios without departing from the spirit and scope of this application.
[0060] The following method of the embodiment of the present application can be applied to any scenario that requires virtual machine deployment planning based on a multi-colony ant colony algorithm. The embodiment of the present application is not limited to the specific application scenario. Any solution of virtual machine deployment planning based on a multi-colony ant colony algorithm provided by the embodiment of the present application is within the scope of protection of this application.
[0061] To facilitate the understanding of the present application, the technical solution provided by the present application is described in detail below in conjunction with specific embodiments.
[0062] The present application provides a virtual machine deployment planning method based on a multi-group ant colony algorithm to solve the problems of slow convergence speed and low overall efficiency of the existing server load balancing algorithm based on the ant colony algorithm.
[0063] See also Figure 1 , Figure 1 A flowchart of a virtual machine deployment planning method based on a multi-colony ant colony algorithm provided in this application, the steps of the method include:
[0064] S101: construct a virtual machine list and a server list according to the data set.
[0065] In some possible implementations, the virtual machine list includes multiple virtual machines and the CPU and memory required for the operation of each virtual machine; the server list includes multiple servers and the CPU and memory that each server can provide; a single server carries multiple virtual machines, and a single virtual machine is only deployed to one server; when the CPU or memory of the server is full, it will no longer continue to carry the virtual machine.
[0066] For example, Figure 2 As shown in the figure, it shows the process of each virtual machine in the virtual machine list being deployed to the server step by step. Figure 2 In the example, when you need to find a server for a virtual machine to deploy, there are multiple options, and you can choose server 1 to server 3. In actual situations, there are more virtual machines that need to be deployed, and there are more servers to choose from. It is necessary to consider selecting a suitable server for each virtual machine under the constraint that the server is not overloaded, so as to achieve the overall load balance and execution time of the server cluster at the same time. The optimization goal of the above problem model is defined as:
[0067]
[0068] In formula (1), ET is the execution time of the server that processes the virtual machine for the longest time. LD is the load balance of the entire server cluster, which is obtained by calculating the variance of the resource utilization of all servers. M is the number of servers in the server cluster. Uc i , Ur i , Ut i and Uui They represent the CPU memory currently occupied by server i, the cumulative time required to process virtual machines, and its overall resource utilization. i ,Cr i Respectively represent the upper limit of CPU and memory usage of server i. j , Rr j and Rt j are the CPU requirement, memory requirement and occupied time of virtual machine j respectively. ij It is used to judge whether virtual machine j is deployed on server i.
[0069]
[0070] In formula (2), P ij If it is 1, it means that virtual machine i is deployed on server j; if it is 0, it means that the deployment is not realized. In addition, the problem model includes certain constraints, which can be written as:
[0071]
[0072] In formula (3), q i Indicates the deployment of virtual machines on server i. If q i If it is not 0, the server i is not empty. j is the CPU occupied by virtual machine j, Cc i Represents the total CPU resources of server i; Rr j Indicates the memory occupied by virtual machine j, Cr i Represents the total memory resource of server i. The CPU and memory requirements of all virtual machines hosted by each server must not exceed the upper limit of the virtual machine.
[0073] S102: Initialize pheromones between virtual machines and servers, and calculate target values of the server cluster using a greedy algorithm; the target values include a time target value and a load balancing target value.
[0074] Exemplarily, the present application is based on the ant colony algorithm and can solve a variety of virtual machine deployment schemes under the above constraints, each scheme including the deployment location of each virtual machine in the virtual machine list and two target values (i.e., the server cluster execution time and the load balancing degree of the server cluster).
[0075] In some possible implementations, the pheromone between the initialization virtual machine and the server is calculated by a greedy algorithm to obtain a target value of the server cluster, specifically including:
[0076] In the time population, τ0 colonyT ij =greedyET; where τ0colonyT ij is the pheromone of the initialized time ant colony, greedyET is the greedy time target value;
[0077] In the load-balanced population, τ0 colonyL ij =greedyLB; where τ0 colonyL ij is the pheromone of the initialized load balancing ant colony, and greedyLB is the target value of the greedy load balancing degree.
[0078] S103: Iterate the different populations in the server cluster respectively, and obtain multiple virtual machine deployment schemes by constructing the individuals in each round of iteration; the virtual machine deployment scheme includes the deployment position of each virtual machine in the virtual machine list and the target value of the server cluster; the server cluster includes a time population and a load balancing population.
[0079] In some possible implementations, in step S103, the different populations in the server cluster are iterated respectively, and multiple virtual machine deployment solutions are obtained by constructing individuals in each round of iteration, specifically including:
[0080] Iterating the time population and the load balancing population respectively, and constructing individuals in each round of iteration to obtain multiple virtual machine deployment solutions;
[0081] When each individual completes the construction of the virtual machine deployment plan, it performs a local update of the pheromone;
[0082] When all individuals have completed construction and one iteration, the pheromone is globally updated and the next iteration is executed until the iteration termination condition is reached; the termination condition is that the target values of several different and feasible virtual machine deployment solutions do not match each other.
[0083] Exemplarily, each population performs its own iteration to obtain a virtual machine deployment plan. In each round of iteration of each of the two populations, there are 5 individuals, and each individual is continuously constructed and improved to eventually become a complete virtual machine deployment plan. For any individual k, initialize its independent heuristic information matrix. Under the guidance of pheromone τ and heuristic information η, the virtual machine to be deployed is deployed to the server with remaining resources until individual k completes the deployment of all virtual machines in the virtual machine list. After each individual completes the construction of the solution, the pheromone is locally updated. Among them, pheromone τ and heuristic information η are related to the load balancing degree and processing time of the server cluster, and heuristic information η is related to the real-time deployment situation;
[0084] After all individuals have been constructed and an iteration is completed, the pheromone is globally updated and the next round of iteration is executed until the iteration termination condition is reached, and a set of non-dominated solutions is obtained, that is, several different and feasible virtual machine deployment schemes, and the objective values of all schemes do not dominate each other.
[0085] Among them, when any individual k is building a solution, the servers on which the i-th virtual machine can be deployed include all servers except the servers whose CPU or memory is already fully occupied and the servers whose resource usage will exceed the limit after deploying the virtual machine.
[0086] In some possible implementations, the time population and the load balancing population are iterated respectively, and individuals in each round of iteration are constructed to obtain multiple virtual machine deployment solutions, specifically including:
[0087] In each round of iteration of the time population and the load balance population, initializing an independent heuristic information matrix of any individual;
[0088] According to the pheromone and the heuristic information matrix, the virtual machine to be deployed currently is deployed to a server with remaining resources until the individual completes the deployment of all virtual machines in the virtual machine list.
[0089] Exemplarily, each individual has an independent heuristic information matrix in each iteration. The heuristic information between virtual machine i and server j has two designs for different populations.
[0090] In some possible implementations, the different populations correspond to different heuristic information matrix needles;
[0091] When it is the time population:
[0092]
[0093] In formula (4), η 1 (i,j) k is the heuristic information value of the temporal population, ET k is the processing time of individual k in the current process of constructing the solution;
[0094] When it is the load balancing population:
[0095]
[0096] In formula (5), η 2 (i,j) k is the heuristic information value of the load balancing population, Uc ki , Ur ki and They represent the CPU usage of the jth server, the average CPU usage of all servers, the memory usage of the jth server, and the average memory usage of all servers after the i-th virtual machine is deployed to the j-th server during the current solution construction process of individual k; when the i-th virtual machine is deployed to the j-th server, the smaller the difference between the CPU and memory usage of server j and the average CPU and memory usage of all servers, the greater the heuristic information value.
[0097] In some possible implementations, when the target individual selects a server for deployment of the current virtual machine, a judgment is made for all servers in the server list:
[0098] If the CPU or memory of the current server is not fully occupied, or the CPU or memory of the current server does not exceed the limit after hosting the current virtual machine, it is determined that the current server meets the deployment conditions;
[0099] If the CPU or memory of the current server is fully occupied, or the CPU or memory of the current server exceeds the limit after hosting the current virtual machine, it is determined that the current server does not meet the deployment conditions.
[0100] For example, when individual k is looking for a server to deploy the i-th virtual machine, a judgment is made on all servers in the server list: if the CPU or memory of a server is already fully occupied, it is determined that the server does not meet the deployment conditions; if the CPU or memory of a server exceeds the limit after hosting the current i-th virtual machine, it is also determined that the server does not meet the deployment conditions.
[0101] For example, based on Figure 2 As shown in the solution construction process, when individual k is constructing the solution, it first looks for a server for the first virtual machine in the virtual machine list to deploy it, and so on. At each step, it looks for a suitable server for each virtual machine to deploy it under the guidance of pheromones and heuristic information until each virtual machine is successfully deployed.
[0102] In some possible implementations, when the target individual k selects a server for deployment for the current virtual machine, the step of selecting a server includes:
[0103] Generate a random number q∈[0,1], if q≤q0, select the target server for deployment from the servers that meet the deployment conditions according to the target formula; if q>q0, select the target server for deployment from the servers that meet the deployment conditions through the roulette method.
[0104] In some possible implementations, the target formula is:
[0105] argmax{[τ(i,j) α]×[η(i,j) β ]} (6);
[0106] In formula (6), τ(i, j) represents the pheromone between virtual machine i and server j, η(i, j) represents the heuristic information value between virtual machine i and server j, and α, β, and q0 are parameters;
[0107] Specifically, select the deployment conditions that meet the target formula [τ(i,j) α ]×[η(i,j) β ]The server with the largest value is deployed as the target server.
[0108] The formula for the roulette method is:
[0109]
[0110] In formula (7), p(i, j) is the probability that any virtual machine i is deployed to server j, and N is the total number of virtual machines.
[0111] Specifically, a server with the highest probability corresponding to the above formula is selected from those meeting the deployment conditions as the target server.
[0112] In some possible implementations, the pheromone is locally updated or globally updated according to different preset rules, wherein:
[0113] The preset rule formula for locally updating the pheromone is:
[0114] τ(i,j)=(1-ρ)×τ(i,j)+ρ×τ0 (8);
[0115] In formula (8), ρ is the local renewal volatility factor of pheromone, τ0 is the initial value of population pheromone;
[0116] The rule formula for globally updating the pheromone is:
[0117] τ col (i,j)=(1-ε)×τ col (i,j)+ε×△τ(i,j) (9);
[0118] In formula (9), ε is the volatility factor of the global update of pheromone, and △τ(i,j) is the pheromone released by the globally updated individual between virtual machine i and server j.
[0119] Exemplarily, after all individuals in all populations complete the construction of solutions and complete a round of iteration, the pheromone matrix of the individual is globally updated, and the next round of iteration is performed until the termination condition is reached, and a set of non-dominated solutions containing two target values is obtained.
[0120] Specifically, the global update rule is: use two types of individuals for global update: the individual with the best target value for each population and the knee point individual of the current iteration. The knee point individual is defined as the point farthest from the two extreme individual points in the Archive, i.e., the point with the best time target value and the point with the best load balancing value, in the current iteration. The pheromone update between virtual machine i and server j is as shown in the above formula (9).
[0121] Furthermore, the pheromone △τ(i,j) released by the individual for global update between virtual machine i and server j is:
[0122]
[0123] In formula (10), g1(bestpoint) and g1(kneepoint) are the best target value in the population of time and load balance and the target value of the knee point respectively. Iter is the maximum number of iterations of the algorithm.
[0124] S104: Initialize the Archive solution set to store all virtual machine deployment solutions generated in each round of iteration until the current population iteration ends.
[0125] Exemplarily, Archive is initialized to store all deployment solutions generated in each iteration until the population iteration ends, and all solutions finally retained are all virtual machine deployment solutions obtained by the proposed algorithm for solving the problem.
[0126] In order to illustrate the effectiveness of the method of this application, this application sets up the following example for experimental data comparison: Algorithm 1 is the method of this application (AMDACS).
[0127] Algorithm 2 is MOEA\D in the paper “MOEA / D: A multiobjective evolutionary algorithm based on decomposition.” published in IEEE Transactions on evolutionary computation in 2007.
[0128] Algorithm 3 is NSGA-II in the paper “A fast and elitist multiobjective genetic algorithm: NSGA-II.” published in IEEE transactions on evolutionary computation in 2002.
[0129] Algorithm 4 is the TOP in the paper “Handling constrained multiobjective optimization problems with constraints in both the decision and objective spaces.” published in IEEE Transactions on Evolutionary Computation in 2019.
[0130] Algorithm 5 is the SRA in the paper “Stochastic ranking algorithm for many-objective optimization based on multiple indicators.” published in IEEE Transactions on Evolutionary Computation in 2016.
[0131] To ensure fairness, three randomly generated examples of different sizes are used as data sets, and the above five algorithms are used to solve them respectively. The three examples of different sizes each contain 4 sets of data sets, and each scale of data sets contains homogeneous and heterogeneous server environments, that is, all servers have the same or different CPUs and memories. The scales of the three examples are shown in Table 1.
[0132]
[0133] Table 1
[0134] The parameters of all algorithms are set by the control variable method. The specific parameters are shown in Table 2.
[0135]
[0136] Table 2
[0137] All five algorithms were deployed in the same experimental environment and run 25 times. The experimental results are compared in Table 3: Comparing the ratio of the HV value of Algorithm 1 to the HV values of the other four algorithms, the HV value reflects the diversity and convergence of the two target values (server cluster execution time and server cluster load balancing) in the virtual machine deployment results obtained by the algorithm (the better the target value, the better the convergence). The higher the HV value, the better the algorithm effect, that is, the higher the ratio, the more the algorithm 1 leads. The results are as follows
[0138] Table 3:
[0139]
[0140] Table 3
[0141] The experimental results show that the method of the present application can achieve better results than the comparison algorithms under different data scales. As the data scale increases, the difficulty of solving the problem increases significantly, but the results obtained by the method of the present application are more ahead of other algorithms than those obtained by the method of the present application on a smaller scale, which shows that the method of the present application has a strong ability to handle large-scale problems.
[0142] In order to further analyze the performance of the proposed method and other comparative algorithms, based on the third example of each scale, the number of iterations of the three algorithms is set to 500 generations. The algorithm convergence diagrams are as follows: Figure 3 , Figure 4 , Figure 5 As shown. Compared with other comparison algorithms, the method of this application has stronger convergence ability and versatility. And the curve of the method of this application is below the curves of other algorithms, indicating that the quality of its solution is more stable than that of other algorithms.
[0143] Those skilled in the art should understand that the embodiments of the present application can be provided as methods, system structures, and thus, the present application can be in the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware.
[0144] Obviously, the above examples are only examples for clear explanation and are not limitations of the implementation methods. For ordinary technicians in the relevant field, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the implementation methods here. The obvious changes or modifications derived from this are still within the protection scope of the invention.
Claims
1. A virtual machine deployment planning method based on a multi-colony ant colony algorithm, characterized in that: include: Build a list of virtual machines and servers based on the dataset; Initialize the pheromone between the virtual machine and the server, and calculate the target value of the server cluster through a greedy algorithm; the target value includes a time target value and a load balancing target value; Iterate the different populations in the server cluster respectively, and obtain multiple virtual machine deployment schemes by constructing the individuals in each round of iteration; the virtual machine deployment scheme includes the deployment position of each virtual machine in the virtual machine list and the target value of the server cluster; the server cluster includes a time population and a load balancing population; Initialize the Archive solution set to store all virtual machine deployment solutions generated in each round of iteration until the current population iteration ends; The different populations in the server cluster are iterated respectively, and multiple virtual machine deployment schemes are obtained by constructing individuals in each round of iteration, specifically including: Iterating the time population and the load balancing population respectively, and constructing individuals in each round of iteration to obtain multiple virtual machine deployment solutions; When each individual completes the construction of the virtual machine deployment plan, it performs a local update of the pheromone; When all individuals have completed construction and one iteration, the pheromone is globally updated and the next iteration is performed until the iteration termination condition is reached; the termination condition is that the target values of several different and feasible virtual machine deployment solutions do not match each other; The time population and the load balancing population are iterated respectively, and individuals in each round of iteration are constructed to obtain multiple virtual machine deployment solutions, specifically including: In each round of iteration of the time population and the load balance population, initializing an independent heuristic information matrix of any individual; Deploy the virtual machine currently to be deployed to a server with remaining resources according to the pheromone and the heuristic information matrix until the individual completes the deployment of all virtual machines in the virtual machine list; The different populations correspond to different heuristic information matrix needles; When it is the time population: Among them, η1(i, j) k is the heuristic information value of the temporal population, ET k is the processing time of individual k in the current process of constructing the solution; When it is the load balancing population: Among them, η2(i, j) k is the heuristic information value of the load balancing population, Uc ki , Ur ki and They represent the CPU usage of the jth server, the average CPU usage of all servers, the memory usage of the jth server, and the average memory usage of all servers after the i-th virtual machine is deployed to the j-th server during the current solution construction process of individual k; when the i-th virtual machine is deployed to the j-th server, the smaller the difference between the CPU and memory usage of server j and the average CPU and memory usage of all servers, the greater the heuristic information value; The pheromone is locally updated or globally updated according to different preset rules, wherein: The preset rule formula for locally updating the pheromone is: τ(i,j)=(1-ρ)×τ(i,j)+ρ×τ0; Among them, ρ is the local renewal volatility factor of pheromone, τ0 is the initial value of population pheromone; The rule formula for globally updating the pheromone is: τ col (i,j)=(1-ε)×v col (i,j)+ε×Δτ(i,j); Among them, ε is the volatility factor of the global update of pheromone, and Δτ(i, j0) is the pheromone released by the globally updated individual between virtual machine i and server j.
2. The virtual machine deployment planning method based on multi-colony ant colony algorithm according to claim 1 is characterized in that: The virtual machine list includes multiple virtual machines and the CPU and memory required for the operation of each virtual machine; the server list includes multiple servers and the CPU and memory that each server can provide; a single server carries multiple virtual machines, and a single virtual machine is only deployed to one server; when the CPU or memory of a server is full, it will no longer continue to carry virtual machines.
3. The virtual machine deployment planning method based on multi-colony ant colony algorithm according to claim 1 is characterized in that: When the target individual selects a server for deployment for the current virtual machine, a judgment is made for all servers in the server list: If the CPU or memory of the current server is not fully occupied, or the CPU or memory of the current server does not exceed the limit after hosting the current virtual machine, it is determined that the current server meets the deployment conditions; If the CPU or memory of the current server is fully occupied, or the CPU or memory of the current server exceeds the limit after hosting the current virtual machine, it is determined that the current server does not meet the deployment conditions.
4. The virtual machine deployment planning method based on multi-colony ant colony algorithm according to claim 3 is characterized in that: When the target individual selects a server for deployment of the current virtual machine, the step of selecting the server includes: Generate a random number q∈[0,1], if q≤q0, select the target server for deployment from the servers that meet the deployment conditions according to the target formula; if q>q0, select the target server for deployment from the servers that meet the deployment conditions through the roulette method, q0 is the parameter.
5. The virtual machine deployment planning method based on multi-colony ant colony algorithm according to claim 4 is characterized in that: The target formula is: argmax{[τ(i,j) α ]×[η(i,j) β ]}; Among them, τ(i, j) represents the pheromone between virtual machine i and server j, η(i, j) represents the heuristic information value between virtual machine i and server j, and α and β are parameters; The formula for the roulette method is: Where p(i, j) is the probability that virtual machine i is deployed to server j, and N is the total number of virtual machines.
6. The virtual machine deployment planning method based on multi-colony ant colony algorithm according to claim 1 is characterized in that: The pheromone between the initialization virtual machine and the server is calculated by a greedy algorithm to obtain the target value of the server cluster, specifically including: In the time population, τ0 colonyT ij =greedyET; where τ0 colonyT ij is the pheromone of the initialized time ant colony, greedyET is the greedy time target value; In the load-balanced population, τ0 colonyL ij =greedyLB; where τ0 colonyL ij is the pheromone of the initialized load balancing ant colony, and greedyLB is the greedy load balancing target value.
Citation Information
Patent Citations
Cloudsim platform based virtual machine batch deployment method
CN104461739A
Group virtual machine scheduling policy for cloud computing environment
CN107748693A
Placement method for virtual machines in cloud data center based on ant colony optimization algorithm
CN108108224A
Time constraint scientific workflow optimization method based on ant colony algorithm
CN109634742A
Virtual machine scheduling method based on improved ant colony algorithm
CN110362379A
