Cloud computing load balancing method and system
Through the ant colony algorithm combined with pheromone concentration and resource fit, the resource allocation of virtual machines in cloud computing is optimized, which solves the problems of low resource utilization and difficult load balancing in traditional methods, and achieves more efficient resource allocation and load balancing .
Patent Information
- Application Number
- PCT/CN2023/139641
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-06-01
- Filing Date
- 2023-12-18
- Publication Date
- 2024-12-05
AI Technical Summary
The traditional virtual machine resource allocation method ignores the load balancing of multiple heterogeneous resources, resulting in low resource utilization and difficulty in achieving load balancing, especially when different users have resource requirements and physical resource heterogeneity.
The ant colony algorithm is used to determine the physical machine selected by the virtual machine through pheromone concentration and resource fit, calculate the global load balancing indicators, iteratively optimize resource allocation, and ensure the balanced utilization of CPU, memory and bandwidth.
The resource utilization rate is improved, and the global optimal solution is found through iterative optimization, and resource allocation with fewer migrations is achieved, avoiding the situation of physical machine overload and unused resources.
Smart Images

Figure CN2023139641_05122024_PF_FP_ABST
Abstract
Description
A cloud computing load balancing method and system Technical Field
[0001] The embodiments of the present disclosure relate to the field of cloud computing technology, and more particularly to a cloud computing load balancing method and system. Background Art
[0002] Cloud computing is an emerging computing and service model currently being researched by scientific research and commercial institutions both domestically and internationally. It manifests itself as a massive data center comprised of millions of physical computers. Cloud computing improves data center resource utilization through the use of virtualization technology, which transforms a single physical machine into multiple logical computers, known as virtual machines (VMs). Due to high energy consumption, migrating VMs to reduce energy consumption across the data center is necessary to improve resource utilization and save costs. Therefore, as a key technology in cloud computing, VM placement algorithms hold significant research significance. VM placement involves mapping virtual machines to physical hosts. Optimizing VM placement is a combinatorial optimization problem involving multiple interacting objectives.
[0003] Traditional research on virtual machine resource allocation and deployment has been based on one-sided considerations, ignoring parameters of interest to users and cloud service providers. Virtual machine allocation is an NP-hard problem. Common approaches currently employ dynamic threshold hot migration or a hierarchical, progressive resource allocation algorithm based on the multi-knapsack problem for multi-tenant cloud data centers. However, these approaches neglect load balancing across heterogeneous resources. The varying resource demands of different users and the heterogeneity of physical resources make load balancing difficult to achieve and result in extremely low resource utilization.
[0004] Summary of the Invention
[0005] The embodiments of the present disclosure provide a cloud computing load balancing method and system, aiming to solve one or more of the above problems and other potential problems.
[0006] To achieve the above objectives, the following technical solutions are provided:
[0007] According to a first aspect of the present disclosure, a cloud computing load balancing method is provided, comprising:
[0008] Step S01: Based on the ant colony algorithm, each virtual machine determines the next physical machine to be selected by each virtual machine according to the pheromone concentration and resource compatibility of each physical machine, until all physical machines are traversed to obtain the allocation path;
[0009] The resource compatibility FOR is calculated by the formula: Calculated, is the resource demand vector of the virtual machine, is the remaining resource vector of the physical machine, x, y, z are the required resources CPU, memory, and bandwidth of the virtual machine respectively, and X, Y, Z are the remaining resources CPU, memory, and bandwidth of the physical machine respectively;
[0010] Step S02: After all virtual machines complete step S01, the allocation paths of all virtual machines are obtained; and a global load balancing index GLB is calculated for each allocation path.
[0011] The global load balancing index GLB is calculated by the formula: GLB = Ec + Em + Eb.
[0012] Ec is the CPU resource balance rate,
[0013] Em is the memory resource balance rate,
[0014] Eb is the bandwidth balancing rate, n represents the number of physical machines;
[0015] Step S03: Obtain the minimum GLB from the GLBs of all allocated paths in this round of iteration in step S02. min , when the first iteration, GLB min As the best GLB best ; When it is not the first iteration, compare the GLB of this round min Compared with the previous round GLB best If the size of GLB min No smaller than GLB best When this round of GLB best For the previous round of GLB best Otherwise, this round of GLB best For this round of GLB min ; Get the optimal GLB best After that, the number of iterations is +1. If the iteration conditions are not met, the pheromone concentration and resource compatibility are updated, and the process returns to step S01 to enter the next iteration. If the iteration conditions are met, the optimal GLB is output. best ,Finish.
[0016] In the context of virtual machine allocation, the disclosed embodiment proposes global load balancing indicators and resource compatibility based on the three indicators of CPU, memory and bandwidth. Through continuous iteration, it finds the global optimal solution and formulates a suitable allocation plan; it can maximize resource utilization with a smaller number of migrations.
[0017] In some embodiments, the process of each virtual machine determining the next physical machine to be selected by each virtual machine according to the pheromone concentration and resource compatibility of each physical machine in step S01 is as follows:
[0018] Calculate the selection probability of each physical machine based on the transition probability formula of the ant colony algorithm;
[0019] The physical machine with the highest selection probability is selected as the next physical machine selected by the current virtual machine.
[0020] In some embodiments, step S01 further includes determining a physical machine allocation method based on a desired judgment condition before each virtual machine determines the next physical machine selected by each virtual machine according to the pheromone concentration and resource compatibility of each physical machine, specifically:
[0021] Generate a random expectation E for each physical machine r ;
[0022] When judging the random expectation E r When selecting the expected value E, the selection probability of each physical machine is calculated based on the transition probability formula of the ant colony algorithm; the physical machine with the largest selection probability is selected as the next physical machine selected by the current virtual machine; when the random expected value E is determined, r When the expected value E is selected, a physical machine is randomly selected as the next physical machine selected by the current virtual machine, where E is the preset value, 0 <E<1,0<E r <1.
[0023] In some embodiments, the resource compatibility formula is constructed based on the requirement resource vector satisfying a uniform distribution.
[0024] In some embodiments, the required resources CPU, memory, and bandwidth of the virtual machine and physical machine in the resource compatibility formula of step S01, and the CPU allocation rate, memory allocation rate, and bandwidth allocation rate of the physical machine in step S02 are obtained by dynamically monitoring the virtual machine and physical machine through the scheduling system.
[0025] In some embodiments, the method further includes step S00, initializing based on the ant colony algorithm, randomly placing M virtual machines on M physical machines in the form of ants; assuming that the amount of pheromone on each path is equal, the pheromone concentration is a constant, the pheromone increment at the initial moment is 0, and setting the number of iterations.
[0026] In some embodiments, the method is applied to an Infrastructure as a Service (IaaS) platform scheduling system.
[0027] The cloud computing load balancing system according to claim 8 is characterized in that it also includes a physical machine selection strategy module for determining the allocation method of the physical machines based on the expected judgment condition before the execution of the physical machine selection module, and when the random expected E randomly generated by each physical machine is judged r >When the expected value E is selected, the physical machine selection module is triggered to calculate the selection probability of each physical machine based on the transition probability formula of the ant colony algorithm; the physical machine with the largest selection probability is selected as the next physical machine selected by the current virtual machine; when the random expected value E randomly generated by each physical machine is determined r When the expected value E is selected, a physical machine is randomly selected as the next physical machine selected by the current virtual machine, where E is the preset value, 0 <E<1,0<E r <1.
[0028] According to a second aspect of the present disclosure, a cloud computing load balancing system is provided, comprising:
[0029] The physical machine selection module is used to determine the next physical machine selected by each virtual machine based on the ant colony algorithm, according to the pheromone concentration and resource compatibility of each physical machine, until all physical machines are traversed to obtain the allocation path;
[0030] Pheromone concentration calculation module, used to calculate pheromone concentration;
[0031] Resource compatibility calculation module, used to calculate the resource compatibility using the formula: Calculate the resource fit FOR of each physical machine, is the resource demand vector of the virtual machine, is the remaining resource vector of the physical machine, x, y, z are the required resources CPU, memory, and bandwidth of the virtual machine respectively, and X, Y, Z are the remaining resources CPU, memory, and bandwidth of the physical machine respectively;
[0032] an allocation path obtaining module, configured to obtain allocation paths for all virtual machines after all virtual machines have selected a physical machine through the physical machine selection module;
[0033] The global load balancing index calculation module is used to calculate the global load balancing index GLB for each distribution path; the global load balancing index GLB is calculated by the formula: GLB = E c +E m +E b Calculated,
[0034] Ec is the CPU resource balance rate,
[0035] Em is the memory resource balance rate,
[0036] Eb is the bandwidth balancing rate, n represents the number of physical machines;
[0037] The load balancing module is used to obtain the minimum GLB from the GLB of all allocated paths in this round of iteration in the global load balancing indicator calculation module. min , is also used to convert GLB min As the best GLB best ; When it is not the first iteration, compare the GLB of this round min Compared with the previous round GLB best If the size of GLB min No smaller than GLB best When this round of GLB best For the previous round of GLB best Otherwise, this round of GLB best For this round of GLB min , and is also used to obtain the optimal GLB best After that, the number of iterations is +1. When the iteration conditions are not met, the pheromone concentration calculation module is triggered to update the pheromone concentration and the resource fit calculation module is triggered to update the resource fit. The physical machine selection module, the allocation path acquisition module, and the global load balancing index calculation module are also triggered in sequence to perform the next round of iterations. When the iteration conditions are met, the optimal GLB is output. best ,Finish.
[0038] In some embodiments, the system also includes an initialization module for initialization based on the ant colony algorithm, randomly placing M virtual machines on M physical machines in the form of ants; assuming that the amount of pheromone on each path is equal, the pheromone concentration is a constant, the pheromone increment at the initial moment is 0, and the number of iterations is set.
[0039] In some embodiments, the system further includes a physical machine selection strategy module for determining the allocation method of the physical machines based on the expected judgment condition before the execution of the physical machine selection module, and determining the random expected E randomly generated by each physical machine. r >When the expected value E is selected, the physical machine selection module is triggered to calculate the selection probability of each physical machine based on the transition probability formula of the ant colony algorithm; the physical machine with the largest selection probability is selected as the next physical machine selected by the current virtual machine; when the random expected value E randomly generated by each physical machine is determined r When the expected value E is selected, a physical machine is randomly selected as the next physical machine selected by the current virtual machine, where E is the preset value, 0 <E<1,0<E r <1. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] The above and other objects, features and advantages of the embodiments of the present disclosure will become readily understood by reading the following detailed description with reference to the accompanying drawings, in which several embodiments of the present disclosure are shown by way of example and not limitation.
[0041] FIG1 shows a flow chart of a cloud computing load balancing method according to an embodiment of the present disclosure;
[0042] FIG2 shows a system block diagram of a cloud computing load balancing system according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0043] The preferred embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although preferred embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided to make the present disclosure more thorough and complete, and to fully convey the scope of the present disclosure to those skilled in the art.
[0044] As used herein, the term "including" and its variations mean open inclusion, i.e., "including but not limited to." Unless otherwise stated, the term "or" means "and / or." The term "based on" means "based, at least in part, on." The terms "one example embodiment" and "an embodiment" mean "at least one example embodiment." The term "another embodiment" means "at least one additional embodiment."
[0045] Resource scheduling plays a crucial role in cloud computing technology management. Cloud computing data centers are composed of numerous resource domains. Within each scheduling domain, there are many physical machines, each with different attributes such as CPU, memory, and bandwidth. A large amount of resource information storage and management in cloud computing is achieved through the computations performed on these physical machines.
[0046] Traditional research on virtual machine (VM) resource allocation and deployment is based on one-sided considerations, ignoring some parameters that users and cloud service providers are concerned about.
[0047] The Ant Colony Optimization (ACO) algorithm is a heuristic swarm intelligence algorithm. Ants, consisting of individuals with minimal or no intelligence, collaborate to exhibit intelligent behavior, offering a new approach to solving complex problems. The algorithm was first used to solve the traveling salesman problem. Existing technologies use only pheromone concentration or other weak indicators when allocating ants, resulting in inefficient allocation of virtual machines and inefficient resource utilization.
[0048] Based on this, the present invention discloses a cloud computing load balancing method. This method specifically designs the heuristic information used in the ant colony algorithm and proposes a heuristic algorithm based on the resource compatibility of VMs (Virtual Machines) and physical machines (Physical Machines). This algorithm can achieve the most optimal solution while minimizing time complexity. Furthermore, it proposes global load balancing metrics based on CPU, memory, and bandwidth to facilitate finding the appropriate allocation for each virtual machine, thereby balancing the multi-dimensional resource usage of all physical machines.
[0049] FIG1 shows a flow chart of a cloud computing load balancing method according to an embodiment of the present disclosure. The method includes:
[0050] Step S01: Based on the ant colony algorithm, each virtual machine determines the next physical machine to be selected by each virtual machine according to the pheromone concentration and resource compatibility of each physical machine, until all physical machines are traversed to obtain the allocation path;
[0051] The resource compatibility FOR is calculated by the formula: Calculated, is the resource demand vector of the virtual machine, is the remaining resource vector of the physical machine, x, y, z are the required resources CPU, memory, and bandwidth of the virtual machine respectively, and X, Y, Z are the remaining resources CPU, memory, and bandwidth of the physical machine respectively;
[0052] Step S02: After all virtual machines complete step S01, the allocation paths of all virtual machines are obtained; and a global load balancing index GLB is calculated for each allocation path.
[0053] The global load balancing index GLB is calculated by the formula: GLB = E c +E m +E b Calculated,
[0054] E c is the CPU resource balancing rate,
[0055] E m is the memory resource balancing rate,
[0056] E b is the bandwidth balancing rate, n represents the number of physical machines;
[0057] Step S03: Obtain the minimum GLB from the GLBs of all allocated paths in this round of iteration in step S02. min , in the first iteration, GLBmin As the best GLB best ; When it is not the first iteration, compare the GLB of this round min Compared with the previous round GLB best If the size of GLB min No smaller than GLB best When this round of GLB best For the previous round of GLB best Otherwise, this round of GLB best For this round of GLB min ; Get the optimal GLB best After that, the number of iterations is +1. If the iteration conditions are not met, the pheromone concentration and resource compatibility are updated and the process returns to step S01 for the next iteration. If the iteration conditions are met, the optimal GLB is output. best ,Finish.
[0058] The method of the embodiment of the present disclosure is applied to the scheduling system of the Infrastructure as a Service IaaS platform and can be executed by the cloud computing platform. The embodiment of the present disclosure can solve the problem of load balancing of physical machines in the cluster, and aims to improve resource utilization in an effective way. Specifically, the method of the embodiment of the present disclosure is applied to the applicant's Intelligent Dynamic Resource Scheduler (IDRS), which is an important component of the cloud computing platform for realizing intelligent management of virtual machines and physical machines. This system can dynamically monitor the usage of virtual machines and physical machines, including the usage of resources such as CPU and memory, and dynamically and intelligently reschedule virtual machines according to the monitoring results to achieve reasonable resource allocation of physical servers and ensure the performance of virtual machines.
[0059] In step S01, the process of each virtual machine determining the next physical machine selected by each virtual machine based on the pheromone concentration and resource compatibility of each physical machine is as follows: based on the transition probability formula of the ant colony algorithm, the selection probability of each physical machine is calculated; and the physical machine with the largest selection probability is selected as the next physical machine selected by the current virtual machine.
[0060] The specific transition probability formula is as follows:
[0061] in, is the probability of the kth ant (representing the virtual machine) selecting the physical machine on the path (i, j); allowed k Identifies the physical machine that ant k is allowed to choose next; α is the information heuristic factor (constant), which indicates the relative importance of the trajectory; β is the expectation heuristic factor (constant), which indicates the relative importance of visibility; η ijis heuristic information. The heuristic information of the embodiment of the present disclosure adopts resource compatibility FOR, and the resource compatibility will be updated after each iteration; τ ij (t) is the pheromone concentration. The initial pheromone concentration is a constant C and is updated after each iteration.
[0062] In one iteration, each ant starts with a random virtual machine and then assigns all pending virtual machines to a specific physical machine one by one (assuming there are M pending virtual machines, each ant takes M steps to complete this step). When ant M assigns virtual machine Vi, two factors influence its decision: pheromone density (PD) and fit of resources (FOR). Pheromone density is a record matrix of the previous M-1 ants assigning virtual machines to physical machine Pj. A higher pheromone density indicates that the previous ant preferred to assign virtual machine Vi to physical machine Pj. Resource fit indicates that after assigning a virtual machine to a physical machine, the higher the fit between the remaining resources of the physical machine and the resources required by the virtual machine, the more similar they are, indicating that the physical machine is more likely to meet the virtual machine allocation request when it arrives.
[0063] The FOR calculation actually calculates the cosine similarity between the virtual machine's demand resource vector and the physical machine's remaining resource vector. A larger value indicates a smaller angle between the two, indicating a similarity between resource supply and demand, and a higher resource fit. Consequently, ants are more likely to be placed on that physical machine when assigning tasks.
[0064] In real-world scenarios, resource demands may vary over time, so we can simulate real-world environments by assuming that these demands are uniformly distributed, allowing us to consider average values. That is, the resource fit formula is constructed based on the assumption that the demand-resource vector is uniformly distributed.
[0065] However, when allocating virtual machines, if we simply let ants autonomously select the physical machine with the highest probability based on PD and FOR, we will quickly fall into local sufficiency and result in underfitting. Therefore, we also need to design a physical machine selection strategy.
[0066] To this end, the step S01 further includes determining a physical machine allocation method based on a desired judgment condition before each virtual machine determines the next physical machine selected by each virtual machine according to the pheromone concentration and resource compatibility of each physical machine, specifically:
[0067] Generate a random expectation E for each physical machine r ;
[0068] When judging the random expectation E r When selecting the expected value E, the selection probability of each physical machine is calculated based on the transition probability formula of the ant colony algorithm; the physical machine with the largest selection probability is selected as the next physical machine selected by the current virtual machine; when the random expected value E is determined, r When the expected value E is selected, a physical machine is randomly selected as the next physical machine selected by the current virtual machine, where E is the preset value, 0 <E<1,0<E r <1.
[0069] The disclosed embodiment introduces an improved physical machine selection strategy into the basic ant colony optimization, which helps to improve the problem that the algorithm itself converges too early or easily falls into a local optimal solution.
[0070] In step S02, the CPU resource balancing rate E c , memory resource balance rate E m , bandwidth balancing rate E b This data has been defined in the IDRS system. IDRS sets a resource balancing interface for allocation and resource utilization, and the cloud computing platform obtains the above data from the interface.
[0071] The definition of the GLB metric indicates that a smaller GLB indicates a better allocation. This method calculates a global load balancing metric, facilitating the appropriate allocation for each virtual machine and balancing the multi-dimensional resource usage of all physical machines. This prevents some physical machines from being overloaded while others remain unused.
[0072] In step S03, the optimal GLB in this round of iteration is calculated. best , after the iteration is completed, the optimal GLB in the multi-round iteration process is obtained best In the first iteration, the minimum GLB in this iteration process can be min As the best GLB best In the subsequent iterations, each round of iteration has the minimum GLB min , by comparing the best GLB in the previous round best , and then obtain the minimum value of the two as the optimal GLB of this round best . The iteration condition may be a condition for determining whether the number of iterations has been reached.
[0073] After the iteration is completed, the optimal GLB after multiple rounds of iteration is output best According to this optimal GLB best Obtain the corresponding allocation path, and the allocation method of virtual machines and physical machines is based on this optimal GLB bestWhen allocating tasks, all ants can execute the tasks in parallel to reduce the time cost of the algorithm in the iterative process.
[0074] The pheromone concentration is updated according to the following formula: ij (t+n)=(1-ρ)·τ ij (t)+Δτ ij (t)
[0075] Among them, ρ represents the pheromone volatility coefficient, 1-ρ represents the pheromone residual factor, Δτ ij It represents the pheromone that the k-th ant leaves on the path (i, j) during this iteration.
[0076] The resource compatibility is updated through the resource balancing interface to obtain the new CPU resource balancing rate E again. c , memory resource balance rate E m , bandwidth balancing rate E b Then, calculate the new resource fit.
[0077] When executing step S01 of the next iteration, the resource compatibility and pheromone concentration are updated values.
[0078] The method of the embodiment of the present disclosure also includes step S00, initialization based on the ant colony algorithm, randomly placing M virtual machines on M physical machines in the form of ants; assuming that the amount of pheromone on each path is equal, the pheromone concentration is a constant, the pheromone increment at the initial moment is 0, and setting the number of iterations.
[0079] The present disclosure also provides a cloud computing load balancing system, as shown in Figure 2 . The system includes a physical machine selection module, a pheromone concentration calculation module, a resource compatibility calculation module, an allocation path acquisition module, a global load balancing index calculation module, and a load balancing module. The system is implemented based on the cloud computing load balancing method of the present disclosure.
[0080] The physical machine selection module is used to determine the next physical machine selected by each virtual machine based on the ant colony algorithm according to the pheromone concentration and resource compatibility of each physical machine until all physical machines are traversed to obtain the allocation path.
[0081] Pheromone concentration calculation module, used to calculate pheromone concentration.
[0082] The resource compatibility calculation module is used to calculate the resource compatibility using the formula: Calculate the resource fit FOR of each physical machine, is the resource demand vector of the virtual machine, is the remaining resource vector of the physical machine, x, y, z are the required resources CPU, memory, and bandwidth of the virtual machine, respectively, and X, Y, Z are the remaining resources CPU, memory, and bandwidth of the physical machine, respectively.
[0083] The allocation path obtaining module is configured to obtain allocation paths of all virtual machines after all virtual machines select physical machines through the physical machine selection module.
[0084] The global load balancing index calculation module is used to calculate the global load balancing index GLB for each distribution path; the global load balancing index GLB is calculated by the formula: GLB=E c +E m +E b Calculated, E c is the CPU resource balancing rate, E m is the memory resource balancing rate, E b is the bandwidth balancing rate, n represents the number of physical machines.
[0085] The load balancing module is used to obtain the minimum GLB from the GLBs of all allocated paths in this round of iteration in the global load balancing index calculation module. min , is also used to convert GLB min As the best GLB best ; When it is not the first iteration, compare the GLB of this round min Compared with the previous round GLB best If the size of GLB min No smaller than GLB best When this round of GLB best For the previous round of GLB best Otherwise, this round of GLB best For this round of GLB min , and is also used to obtain the optimal GLB best After that, the number of iterations is increased by 1. If the iteration conditions are not met, the pheromone concentration calculation module is triggered to update the pheromone concentration and the resource fit calculation module is triggered to update the resource fit. The physical machine selection module, the allocation path acquisition module, and the global load balancing index calculation module are also triggered in sequence to perform the next round of iterations. If the iteration conditions are met, the optimal GLBbest is output and the process ends.
[0086] The system of the embodiment of the present disclosure further includes a physical machine selection strategy module for determining the allocation mode of the physical machines based on the expected judgment condition before the execution of the physical machine selection module. When the random expected E randomly generated by each physical machine is determined r>When the expected value E is selected, the physical machine selection module is triggered to calculate the selection probability of each physical machine based on the transition probability formula of the ant colony algorithm; the physical machine with the largest selection probability is selected as the next physical machine selected by the current virtual machine; when the random expected value E randomly generated by each physical machine is determined r When the expected value E is selected, a physical machine is randomly selected as the next physical machine selected by the current virtual machine, where E is the preset value, 0 <E<1,0<E r <1.
[0087] The system of the embodiment of the present disclosure also includes an initialization module for initialization based on the ant colony algorithm, randomly placing M virtual machines on M physical machines in the form of ants; assuming that the amount of pheromone on each path is equal, the pheromone concentration is a constant, the pheromone increment at the initial moment is 0, and the number of iterations is set.
[0088] Compared with the existing technology, the advantages and effects of the embodiment of the present disclosure are mainly the following four points: 1. Since the virtual machine allocation problem is an NP-Hard problem (all NP problems can be reduced to a problem within polynomial time complexity), the traditional first-in-first-out or loop algorithm is not suitable for solving this problem, while the embodiment of the present disclosure can adapt well to the virtual machine allocation scenario, find the global optimal solution through continuous iteration, and formulate a suitable allocation plan; 2. The existing technology has relatively one-sided measurement standards for load balancing. The embodiment of the present disclosure combines some indicators in the IDRS system to form a global load balancing indicator, which can reasonably allocate resources; 3. The existing technology only uses pheromone concentration or other weak indicators to make judgments when allocating ants. The embodiment of the present disclosure performs comprehensive allocation based on VM and PM; 4. The existing technology does not formulate a suitable allocation strategy. The embodiment of the present disclosure can effectively solve the bottleneck problem of the ant colony optimization algorithm converging too early and easily falling into the local optimal solution by setting selection expectations.
[0089] Although several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of separate embodiments may also be implemented in combination in a single implementation. Conversely, various features described in the context of a single implementation may also be implemented in multiple implementations individually or in any suitable subcombination.
[0090] Although the subject matter has been described in language specific to methodological acts, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claims.
[0091] While various embodiments of the present disclosure have been described above, the foregoing description is intended to be illustrative, non-exhaustive, and not limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is selected to best explain the principles of the embodiments, their practical applications, or technological improvements in the marketplace, or to enable others skilled in the art to understand the embodiments disclosed herein.
Claims
1. A cloud computing load balancing method, characterized in that: include: Step S01, based on the ant colony algorithm, each virtual machine determines the next physical machine selected by each virtual machine according to the pheromone concentration and resource compatibility of each physical machine, until all physical machines are traversed to obtain the allocation path; Among them, the resource fit FOR is calculated by the formula: Calculate and obtain, is the resource demand vector of the virtual machine, is the remaining resource vector of the physical machine, x, y, z are the required resources CPU, memory, and bandwidth of the virtual machine, respectively, and X, Y, Z are the remaining resources CPU, memory, and bandwidth of the physical machine, respectively; Step S02, when all virtual machines complete step S01, obtaining allocation paths of all virtual machines; Calculate the global load balancing index GLB for each distribution path; The global load balancing index GLB is calculated by the formula: GLB = E c +E m +E b Calculate and obtain, E c is the CPU resource balancing rate, E m is the memory resource balancing rate, E b is the bandwidth balancing rate, n represents the number of physical machines; Step S03, obtaining the minimum GLB from the GLBs of all the allocated paths in this round of iteration in step S02 min , in the first iteration, GLB min As the best GLB best ; When it is not the first iteration, compare the GLB of this round min Compared with the previous round GLB best If the size of GLB min No less than GLB best hour, This round of GLB best For the previous round of GLB best , otherwise this round of GLB best For this round of GLB min ; Get the optimal GLB best After that, the number of iterations is increased by 1. When the iteration conditions are not met, the pheromone concentration and resource compatibility are updated, and the process returns to step S01 to enter the next round of iteration. When the iteration conditions are met, the optimal GLB is output. best ,Finish.
2. A cloud computing load balancing method according to claim 1, characterized in that: The process of each virtual machine determining the next physical machine selected by each virtual machine according to the pheromone concentration and resource compatibility of each physical machine in step S01 is as follows: Based on the transition probability formula of the ant colony algorithm, the selection probability of each physical machine is calculated; The physical machine with the highest selection probability is selected as the next physical machine selected by the current virtual machine.
3. A cloud computing load balancing method according to claim 1, characterized in that: The step S01 also includes determining the allocation method of the physical machines based on the expected judgment conditions before each virtual machine determines the next physical machine selected by each virtual machine according to the pheromone concentration and resource compatibility of each physical machine, specifically: Generate a random expectation E for each physical machine r ; When judging the random expectation E r >When selecting the expected E, the selection probability of each physical machine is calculated based on the transition probability formula of the ant colony algorithm; the physical machine with the largest selection probability is selected as the next physical machine selected by the current virtual machine; when judging the random expected E r ≤ When the expected value E is selected, a physical machine is randomly selected as the next physical machine selected by the current virtual machine, where E is the preset value and 0 <E<1,0<E r <1.
4. A cloud computing load balancing method according to claim 1, characterized in that: The resource fit formula is constructed based on the requirement that the resource vectors satisfy uniform distribution.
5. A cloud computing load balancing method according to claim 1, characterized in that: The required resources CPU, memory, and bandwidth of the virtual machine and the physical machine in the resource fit formula of step S01, and the CPU allocation rate, memory allocation rate, and bandwidth allocation rate of the physical machine in step S02 are obtained by dynamically monitoring the virtual machine and the physical machine through the scheduling system.
6. A cloud computing load balancing method according to claim 1, characterized in that: The method also includes step S00, initializing based on the ant colony algorithm, randomly placing M virtual machines on M physical machines in the form of ants; assuming that the amount of pheromone on each path is equal, the pheromone concentration is a constant, the pheromone increment at the initial moment is 0, and setting the number of iterations.
7. A cloud computing load balancing method according to claim 1, characterized in that: Applied to the Infrastructure as a Service (IaaS) platform scheduling system.
8. A cloud computing load balancing system, characterized in that: include: The physical machine selection module is used to determine the next physical machine selected by each virtual machine based on the ant colony algorithm according to the pheromone concentration and resource compatibility of each physical machine until all physical machines are traversed to obtain the allocation path; A pheromone concentration calculation module, used to calculate the pheromone concentration; Resource fit calculation module, used to calculate the resource fit through the formula: Calculate the resource fit FOR of each physical machine. is the resource demand vector of the virtual machine, is the remaining resource vector of the physical machine, x, y, z are the required resources CPU, memory, and bandwidth of the virtual machine, respectively, and X, Y, Z are the remaining resources CPU, memory, and bandwidth of the physical machine, respectively; An allocation path obtaining module, used for obtaining allocation paths of all virtual machines after all virtual machines select physical machines through the physical machine selection module; The global load balancing index calculation module is used to calculate the global load balancing index for each distribution path. The global load balancing index GLB is calculated by the formula: GLB = E c +E m +E b Calculate and obtain, E c is the CPU resource balancing rate, E m is the memory resource balancing rate, E b is the bandwidth balancing rate, n represents the number of physical machines; The load balancing module is used to obtain the minimum GLB from the GLBs of all the allocation paths in this round of iteration in the global load balancing indicator calculation module. min , and is also used to convert GLB min As the best GLB best ; When it is not the first iteration, compare the GLB of this round min Compared with the previous round GLB best If the size of GLB min No less than GLB best When this round of GLB best For the previous round of GLB best , otherwise this round of GLB best For this round of GLB min , and is also used to obtain the optimal GLB best After that, the number of iterations is increased by 1. When the iteration conditions are not met, the pheromone concentration calculation module is triggered to update the pheromone concentration and the resource fit calculation module is triggered to update the resource fit. The physical machine selection module, the allocation path acquisition module, and the global load balancing index calculation module are also triggered in sequence to perform the next round of iterations. When the iteration conditions are met, the optimal GLB is output. best ,Finish.
9. A cloud computing load balancing system according to claim 8, characterized in that: It also includes an initialization module for initialization based on the ant colony algorithm, randomly placing M virtual machines on M physical machines in the form of ants; assuming that the amount of pheromone on each path is equal, the pheromone concentration is a constant, the pheromone increment at the initial moment is 0, and the number of iterations is set.
10. A cloud computing load balancing system according to claim 8, characterized in that: The physical machine selection strategy module is also included, which is used to determine the allocation method of the physical machines based on the expected judgment condition before the execution of the physical machine selection module, and when the random expected E randomly generated by each physical machine is judged r >When selecting the expected value E, the physical machine selection module is triggered to calculate the selection probability of each physical machine based on the transition probability formula of the ant colony algorithm; the physical machine with the largest selection probability is selected as the next physical machine selected by the current virtual machine; when the random expected value E randomly generated by each physical machine is determined r ≤ When the expected value E is selected, a physical machine is randomly selected as the next physical machine selected by the current virtual machine, where E is the preset value and 0 <E<1,0<E r <1.
Citation Information
Patent Citations
A cloud computing center-oriented high-efficient load balancing optimization scheduling method.
CN109542619A
A cloud computing virtual machine placement method based on an improved ant colony algorithm
CN109933425A
Cloud computing load balancing method and system
CN116366658A
Cloud task scheduling method based on phagocytosis-based hybrid particle swarm optimization and genetic algorithm
US20210133534A1
Cited By
Distributed network node heartbeat message transmission optimization method and device
CN119449676A
Cloud native platform container migration method based on improved firefly algorithm
CN119938226A
Industrial Internet of Things equipment collaborative scheduling system based on edge computing
CN120358237A
