CN113742090B - Load balancing method and device for virtual machine and storage medium - Google Patents
Load balancing method and device for virtual machine and storage medium Download PDFInfo
- Publication number
- CN113742090B CN113742090B CN202111310231.9A CN202111310231A CN113742090B CN 113742090 B CN113742090 B CN 113742090B CN 202111310231 A CN202111310231 A CN 202111310231A CN 113742090 B CN113742090 B CN 113742090B
- Authority
- CN
- China
- Prior art keywords
- utilization rate
- virtual machine
- physical host
- resource
- cpu
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 37
- 230000000295 complement effect Effects 0.000 claims abstract description 28
- 238000012545 processing Methods 0.000 claims abstract description 14
- 238000004364 calculation method Methods 0.000 claims description 8
- 238000004590 computer program Methods 0.000 claims description 8
- 150000001875 compounds Chemical class 0.000 claims description 7
- 238000005265 energy consumption Methods 0.000 abstract description 7
- 239000002699 waste material Substances 0.000 abstract description 7
- 230000005012 migration Effects 0.000 description 11
- 238000013508 migration Methods 0.000 description 11
- 238000012544 monitoring process Methods 0.000 description 7
- 230000007246 mechanism Effects 0.000 description 3
- 230000008569 process Effects 0.000 description 3
- 238000010586 diagram Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000001360 synchronised effect Effects 0.000 description 2
- 238000011161 development Methods 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5061—Partitioning or combining of resources
- G06F9/5077—Logical partitioning of resources; Management or configuration of virtualized resources
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
- G06F2009/4557—Distribution of virtual machine instances; Migration and load balancing
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
Abstract
The application relates to a load balancing method and device for a virtual machine and a storage medium. The method comprises the following steps: determining the resource utilization rate of a physical host according to the resource utilization rate of a virtual machine deployed on the physical host, wherein the resource utilization rate comprises a CPU (central processing unit) utilization rate, a memory utilization rate and a storage resource utilization rate; judging whether to migrate the virtual machine deployed on the physical host based on the resource utilization rate; and calculating the complementary degree between the virtual machine to be migrated and other physical hosts, and selecting the virtual machine and the physical host with the maximum complementary degree as the virtual machine to be migrated and the target physical host. The method ensures the balanced utilization and the maximum utilization of all the dimensional resources, avoids the waste of the resources and the overload of the host, and further can reduce the cost of energy consumption in the cloud computing center and the influence on the performance of the virtual machine.
Description
Technical Field
The present application relates to the field of computer technologies, and in particular, to a load balancing method and apparatus for a virtual machine, and a storage medium.
Background
Cloud computing can provide computing resources distributed as required for enterprises, modern enterprise IT infrastructure is gradually migrated from traditional infrastructure to cloud, and cloud computing can fully utilize expensive hardware resources through virtualization technology, isolate the dependency between a hardware architecture and a software system, improve the security performance of the system, and improve the utilization rate of the computing resources. The virtual server is easy to expand and create, required hardware infrastructure is distributed according to customer requirements, and the purposes of rapid deployment of customer services, reduction of time for on-line of the customer services and saving of customer cost are achieved. With the development of informatization, the scale of a cloud data center is continuously increased, the number of physical hosts and virtual hosts in the cloud data center is continuously increased along with the continuous increase of user requirements, and the load balance oriented to the virtual machines is used as an important component of cloud platform resource management, is an important factor for judging the performance of the data center, and directly influences the energy consumption of the cloud data center. The efficient load balancing mechanism facing the virtual machine in the data center can utilize resources in a balanced manner, improve the resource utilization rate, and timely migrate the virtual machine to avoid the generation of overloaded hosts when the hosts are overloaded. The existing load balancing mechanism of the cloud platform facing to the virtual machine generally optimizes a single resource, and only simply combines all dimensional resources when partially optimizing a plurality of resources, neglecting the characteristic of resource complementation in the load balancing process, thus causing the waste of the resource with the minimum utilization rate, and further causing the low utilization rate of the physical machine resource, and bringing about the increase of the energy consumption of the cloud data center and the waste of the resource.
Disclosure of Invention
Therefore, in order to solve the above technical problems, it is necessary to provide a load balancing method, device and storage medium for a virtual machine, so as to ensure balanced utilization and maximum utilization of resources in each dimension, avoid waste of resources and overload of a host, and thus reduce overhead of energy consumption in a cloud computing center and influence on performance of the virtual machine.
In one aspect, a load balancing method for a virtual machine is provided, where the method includes:
determining the resource utilization rate of a physical host according to the resource utilization rate of a virtual machine deployed on the physical host, wherein the resource utilization rate comprises a CPU (central processing unit) utilization rate, a memory utilization rate and a storage resource utilization rate;
judging whether to migrate the virtual machine deployed on the physical host based on the resource utilization rate;
and calculating the complementary degree between the virtual machine to be migrated and other physical hosts, and selecting the virtual machine and the physical host with the maximum complementary degree as the virtual machine to be migrated and the target physical host.
In one embodiment, the calculation formula of the complementary degree is as follows:
in the formula (I), the compound is shown in the specification,、、respectively the residual resource utilization rates of the CPU, the memory and the storage resource of the physical host;、、respectively are utilization thresholds of CPU utilization rate, memory utilization rate and storage resource utilization rate of the physical host;、,respectively the CPU utilization rate, the memory utilization rate and the storage resource rate of the virtual machine;,,the CPU utilization rate, the memory utilization rate, and the storage resource rate of the physical host are respectively.
In one embodiment, the method comprises:
and when any one of the CPU utilization rate, the memory utilization rate and the storage resource utilization rate is greater than the corresponding utilization threshold value, determining to perform virtual machine migration on the physical host.
In one embodiment, the method comprises:
the resource usage information of the physical host and the virtual machine is obtained through a local monitor deployed on the physical host.
In one embodiment, the method comprises:
and uploading the resource use information to a cloud platform, acquiring the resource use information through the cloud platform, and calculating the resource utilization rate of the physical host and the virtual machine according to the resource use information.
In another aspect, a load balancing apparatus for a virtual machine is provided, the apparatus including:
the processing module is used for determining the resource utilization rate of the physical host according to the resource utilization rate of the virtual machine deployed on the physical host, wherein the resource utilization rate comprises a CPU (central processing unit) utilization rate, a memory utilization rate and a storage resource utilization rate; judging whether to migrate the virtual machine deployed on the physical host based on the resource utilization rate;
and the determining module is used for calculating the complementary degree between the virtual machine to be migrated and other physical hosts and selecting the virtual machine and the physical host with the maximum complementary degree as the virtual machine to be migrated and the target physical host.
In one embodiment, the calculation formula of the complementarity degree in the determination module is as follows:
in the formula (I), the compound is shown in the specification,、、respectively the residual resource utilization rates of the CPU, the memory and the storage resource of the physical host;、、respectively are utilization thresholds of CPU utilization rate, memory utilization rate and storage resource utilization rate of the physical host;、,respectively the CPU utilization rate, the memory utilization rate and the storage resource rate of the virtual machine;,,the CPU utilization rate, the memory utilization rate, and the storage resource rate of the physical host are respectively.
In yet another aspect, a computer-readable storage medium is provided, having stored thereon a computer program which, when executed by a processor, performs the steps of:
determining the resource utilization rate of a physical host according to the resource utilization rate of a virtual machine deployed on the physical host, wherein the resource utilization rate comprises a CPU (central processing unit) utilization rate, a memory utilization rate and a storage resource utilization rate;
judging whether to migrate the virtual machine deployed on the physical host based on the resource utilization rate;
and calculating the complementary degree between the virtual machine to be migrated and other physical hosts, and selecting the virtual machine and the physical host with the maximum complementary degree as the virtual machine to be migrated and the target physical host.
According to the load balancing method, device and storage medium for the virtual machine, whether virtual machine migration is performed or not is judged according to the resource utilization rate of the physical host, when the virtual machine migration is needed, the virtual machine to be migrated and the target physical host are determined by calculating the complementary degree between the virtual machine to be migrated and the target physical host, balanced utilization and maximum utilization of all dimensional resources are guaranteed, waste of resources and overload of the host are avoided, and therefore the energy consumption overhead in a cloud computing center and the influence on the performance of the virtual machine can be reduced.
Drawings
FIG. 1 is a schematic flowchart of a load balancing method for virtual machines according to an embodiment;
fig. 2 is a schematic diagram of a specific application of the load balancing method for a virtual machine in an embodiment;
fig. 3 is a block diagram of a load balancing apparatus for a virtual machine according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
In this application, a physical host may be referred to as a physical node, and the two may be used interchangeably without specific description.
In one embodiment, as shown in fig. 1, a method for load balancing oriented to virtual machines is provided, the method including:
s1: determining the resource utilization rate of a physical host according to the resource utilization rate of a virtual machine deployed on the physical host, wherein the resource utilization rate comprises a CPU utilization rate, a memory utilization rate and a storage resource utilization rate.
Specifically, first, the CPU utilization of the node is calculated by the virtual machine deployed on each physical machineMemory utilization rateAnd storage resource utilizationThen, the CPU utilization rate of the physical host is determined according to the resource utilization rate of the virtual machine deployed on the physical hostMemory utilization rateAnd storage resource utilization. One preferred calculation procedure is as follows:
s2: the method comprises the steps of obtaining the resource utilization rate of a physical host, and judging whether to migrate the virtual machine deployed on the physical host or not based on the resource utilization rate.
In this step, the resource utilization includes, but is not limited to, a CPU utilization, a memory utilization, and a storage resource utilization. After the resource utilization rate of the physical host is obtained, whether load balancing is performed on the physical host or not is judged according to a preset rule, namely whether migration of the virtual machine on the physical host is performed or not is judged, so that overload of the physical host is avoided.
S3: and calculating the complementary degree between the virtual machine to be migrated and other physical hosts, and selecting the virtual machine and the physical host with the maximum complementary degree as the virtual machine to be migrated and the target physical host.
In this step, when determining to perform load balancing on the physical host, in order to determine which virtual machines on the physical host need to be migrated, the degree of complementation between the virtual machine to be migrated and the other physical hosts is calculated, and the virtual machine to be migrated and the target physical host are determined according to the degree of complementation.
According to the load balancing method for the virtual machine, when the virtual machine needs to be migrated, the virtual machine to be migrated and the target physical host are determined by calculating the complementary degree between the virtual machine to be migrated and the target physical host, so that the balanced utilization and the maximum utilization of all dimensional resources are ensured, the waste of the resources and the overload of the host are avoided, and the energy consumption overhead in a cloud computing center and the influence on the performance of the virtual machine can be reduced.
In one embodiment, the calculation formula of the complementary degree is as follows:
in the formula (I), the compound is shown in the specification,、、respectively the residual resource utilization rates of the CPU, the memory and the storage resource of the physical host;、、respectively, the utilization thresholds of the CPU utilization, the memory utilization, and the storage resource utilization of the physical host.
Specifically, the migration destination physical host is selected based on the degree of complementation between each dimension resource such as a virtual machine CPU, a memory, and a storage resource and each dimension resource corresponding to the migration destination physical host, so as to achieve the purpose of utilizing each dimension resource in a balanced manner and maximizing the resource utilization rate.
After the complementary degree between the virtual machine on the physical host to be migrated and other physical hosts is calculated based on the formula, the virtual machine and the physical machine with the maximum complementary degree are selected as the virtual machine to be migrated and the migration destination physical host.
In one embodiment, the method comprises:
and when any one of the CPU utilization rate, the memory utilization rate and the storage resource utilization rate is greater than the corresponding utilization threshold value, determining to perform virtual machine migration on the physical host.
Specifically, the overloaded host is selected according to the resource utilization rate, and the CPU, the memory and the storage resource utilization rate thresholds are assumed to be set respectively、、. When the utilization rate of any one resource of the host exceeds the corresponding threshold value, the load of the host is balanced, and the virtual machine is migrated.
In one embodiment, the method comprises:
the resource usage information of the physical host and the virtual machine is obtained through a local monitor deployed on the physical host.
Specifically, a local monitor is deployed on each physical host, and the local monitor collects the usage information of the CPU, the memory and the storage through related tools carried by linux.
A service agent vmtools is installed inside a virtual machine, and a local monitor acquires relevant monitoring information of a virtual machine memory through the agent vmtools inside the virtual machine, wherein the relevant monitoring information comprises use information of a CPU, the memory, storage and the like.
In one embodiment, the method comprises:
and uploading the resource use information to a cloud platform, acquiring the resource use information through the cloud platform, and calculating the resource utilization rate of the physical host and the virtual machine according to the resource use information.
Specifically, the cloud platform may be a cloud platform monitor, a physical host in which the cloud platform monitor is located is communicated with each physical host in the cloud data center through a network, and the local monitor transmits the usage information of the CPU, the memory, and the storage of the computation to the cloud platform monitor in real time through the network.
And after the resource use information is acquired by the cloud platform monitor, calculating the resource utilization rate of the physical host and the virtual machine according to the resource use information.
It should be understood that, although the steps in the flowchart of fig. 1 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a portion of the steps in fig. 1 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
In one embodiment, referring to fig. 2, a specific application example of the virtual machine-oriented load balancing method is provided.
In the application example, the local monitor monitors the service conditions or performances of the physical hosts in real time and collects service information inside the virtual machine through proxy vmtools inside the virtual machine, the local monitor calculates the load conditions of the physical hosts according to the formula and performs information interaction with the cloud platform global monitor, the global monitor is timely notified of the calculated monitoring data, load balancing mechanism scheduling is performed in the global monitor according to the monitoring information reported by the local monitor in real time, and the global monitor performs virtual machine migration on the hosts needing load balancing through the load balancing module.
The cloud platform global monitor is a core module for calculating relevant load information of each node (physical node and virtual node), is used for an environment for implementing the invention in a specific way by taking a virtualization system on an x86 server based on a linux system and a KVM, and comprises the following specific steps:
step 1: and a local monitor is deployed on each physical node, and the local monitor collects the use information of the CPU, the memory and the storage through related tools carried by linux.
Step 2: the method comprises the steps that a service agent vmtools is installed inside a virtual machine, a local monitor obtains relevant monitoring information of a virtual machine memory through the agent vmtools inside the virtual machine, wherein the monitoring information comprises monitoring information such as a CPU (central processing unit), the memory and storage, and the use information of the CPU, the memory and storage resources of a physical node is calculated according to a formula.
And step 3: the physical host where the cloud platform global monitor is located is communicated with each physical node in the cloud data center through a network, and the local monitor transmits the use information of the CPU, the memory and the storage resource of the calculation to the cloud platform global monitor in real time through the network.
And 4, step 4: the cloud platform monitor receives the use information of the CPU, the memory and the storage resources reported by each node, then judges whether each node needs to perform load balancing, and then sends the nodes needing load balancing to the load balancing module.
And 5: and the load balancing module calculates the complementary degree of the virtual machine and other physical hosts on the host to be load balanced based on a formula.
Step 6: based on the step 5, traversing all the virtual machines and other physical hosts on the host to be load-balanced, and selecting the virtual machines and the physical machines which meet the following conditions as the virtual machines to be migrated and the target hosts to be migrated respectively:
(1) virtual machine and physical complementary degree calculated based on step 5If the value of (c) is the maximum value, the virtual machine and the physical machine are the virtual machine to be migrated and the destination host to be migrated.
(2) And after load balancing, the utilization rate of each physical node does not exceed the upper limit value.
In the embodiment, the utilization conditions of all dimensional resources such as a CPU (central processing unit), a memory, a storage resource and the like are comprehensively considered in the load balancing for the virtual machine, and the characteristic of resource complementation is considered at the same time, so that the balanced and full utilization of all dimensional resources and the occurrence of host overload are ensured, the waste of resources is avoided, the influence on the performance of the virtual machine is reduced, and the overhead of energy consumption of a data center is also reduced.
In one embodiment, as shown in fig. 3, there is provided a virtual machine-oriented load balancing apparatus, including:
a processing module 301, configured to determine a resource utilization rate of a physical host according to a resource utilization rate of a virtual machine deployed on the physical host, where the resource utilization rate includes a CPU utilization rate, a memory utilization rate, and a storage resource utilization rate, and determine whether to migrate the virtual machine deployed on the physical host based on the resource utilization rate;
the determining module 302 is configured to calculate a degree of complementarity between the virtual machine to be migrated and another physical host, and select the virtual machine and the physical host with the greatest degree of complementarity as the virtual machine to be migrated and the destination physical host.
In one embodiment, the determining module 302 calculates the complementary degree according to the following formula:
in the formula (I), the compound is shown in the specification,、、surplus resources, respectively, of physical host CPU, memory and storage resourcesUtilization rate;、、respectively are utilization thresholds of CPU utilization rate, memory utilization rate and storage resource utilization rate of the physical host;、,respectively the CPU utilization rate, the memory utilization rate and the storage resource rate of the virtual machine;,,the CPU utilization rate, the memory utilization rate, and the storage resource rate of the physical host are respectively.
In one embodiment, the processing module 301 is configured to:
and when any one of the CPU utilization rate, the memory utilization rate and the storage resource utilization rate is greater than the corresponding utilization threshold value, determining to perform virtual machine migration on the physical host.
In one of the embodiments, the first and second electrodes are,
the resource usage information of the physical host and the virtual machine is obtained through a local monitor deployed on the physical host.
In one embodiment, the processing module 301 is configured to:
and acquiring the resource use information through the cloud platform, and calculating the resource utilization rate of the physical host and the virtual machine according to the resource use information, wherein the resource use information is uploaded to the cloud platform.
For specific limitations of the load balancing apparatus for virtual machines, refer to the above limitations of the load balancing method for virtual machines, and are not described herein again. The modules in the virtual machine-oriented load balancing device can be wholly or partially implemented by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer-readable storage medium is provided, having stored thereon a computer program which, when executed by a processor, performs the steps of:
determining the resource utilization rate of a physical host according to the resource utilization rate of a virtual machine deployed on the physical host, wherein the resource utilization rate comprises a CPU (central processing unit) utilization rate, a memory utilization rate and a storage resource utilization rate;
judging whether to migrate the virtual machine deployed on the physical host based on the resource utilization rate;
and calculating the complementary degree between the virtual machine to be migrated and other physical hosts, and selecting the virtual machine and the physical host with the maximum complementary degree as the virtual machine to be migrated and the target physical host.
In one embodiment, the computer program when executed by the processor further performs the steps of:
the calculation formula of the complementary degree is as follows:
in the formula (I), the compound is shown in the specification,、、respectively the residual resource utilization rates of the CPU, the memory and the storage resource of the physical host;、、respectively are utilization thresholds of CPU utilization rate, memory utilization rate and storage resource utilization rate of the physical host;、,respectively the CPU utilization rate, the memory utilization rate and the storage resource rate of the virtual machine;,,the CPU utilization rate, the memory utilization rate, and the storage resource rate of the physical host are respectively.
In one embodiment, the computer program when executed by the processor further performs the steps of:
and when any one of the CPU utilization rate, the memory utilization rate and the storage resource utilization rate is greater than the corresponding utilization threshold value, determining to perform virtual machine migration on the physical host.
In one embodiment, the computer program when executed by the processor further performs the steps of:
the resource usage information of the physical host and the virtual machine is obtained through a local monitor deployed on the physical host.
In one embodiment, the computer program when executed by the processor further performs the steps of:
and acquiring the uploaded resource use information through a cloud platform, and calculating the resource utilization rate of the physical host and the virtual machine according to the resource use information.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.
Claims (5)
1. A load balancing method facing a virtual machine is characterized by comprising the following steps:
determining the resource utilization rate of a physical host according to the resource utilization rate of a virtual machine deployed on the physical host, wherein the resource utilization rate comprises a CPU (central processing unit) utilization rate, a memory utilization rate and a storage resource utilization rate;
when any one of the resource utilization rates of the physical host is greater than the corresponding utilization threshold value, determining to migrate the virtual machine deployed on the physical host;
calculating the complementary degree between the virtual machine to be migrated and other physical hosts, and selecting the virtual machine and the physical host with the maximum complementary degree as the virtual machine to be migrated and a target physical host; wherein, the calculation formula of the complementary degree is as follows:
in the formula (I), the compound is shown in the specification,、、respectively the residual resource utilization rates of the CPU, the memory and the storage resource of the physical host;、、respectively are utilization thresholds of CPU utilization rate, memory utilization rate and storage resource utilization rate of the physical host;、,respectively the CPU utilization rate, the memory utilization rate and the storage resource rate of the virtual machine;,,the CPU utilization rate, the memory utilization rate, and the storage resource rate of the physical host are respectively.
2. The method of claim 1, wherein the method comprises:
the resource usage information of the physical host and the virtual machine is obtained through a local monitor deployed on the physical host.
3. The method of claim 1, wherein the method comprises:
and uploading the resource use information to a cloud platform, acquiring the resource use information through the cloud platform, and calculating the resource utilization rate of the physical host and the virtual machine according to the resource use information.
4. A virtual machine-oriented load balancing apparatus, the apparatus comprising:
the processing module is used for determining the resource utilization rate of the physical host according to the resource utilization rate of the virtual machine deployed on the physical host, wherein the resource utilization rate comprises a CPU (central processing unit) utilization rate, a memory utilization rate and a storage resource utilization rate, and when any one of the resource utilization rates of the physical host is greater than a corresponding utilization threshold value, the virtual machine deployed on the physical host is determined to be migrated;
the determining module is used for calculating the complementary degree between the virtual machine to be migrated and other physical hosts and selecting the virtual machine and the physical host with the maximum complementary degree as the virtual machine to be migrated and a target physical host;
wherein, the calculation formula of the complementary degree in the determination module is as follows:
in the formula (I), the compound is shown in the specification,、、respectively a physical host CPU,The residual resource utilization rate of the memory and the storage resource;、、respectively are utilization thresholds of CPU utilization rate, memory utilization rate and storage resource utilization rate of the physical host;、,respectively the CPU utilization rate, the memory utilization rate and the storage resource rate of the virtual machine;,,the CPU utilization rate, the memory utilization rate, and the storage resource rate of the physical host are respectively.
5. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 3.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111310231.9A CN113742090B (en) | 2021-11-08 | 2021-11-08 | Load balancing method and device for virtual machine and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111310231.9A CN113742090B (en) | 2021-11-08 | 2021-11-08 | Load balancing method and device for virtual machine and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113742090A CN113742090A (en) | 2021-12-03 |
CN113742090B true CN113742090B (en) | 2022-03-08 |
Family
ID=78727583
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111310231.9A Active CN113742090B (en) | 2021-11-08 | 2021-11-08 | Load balancing method and device for virtual machine and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113742090B (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105279027A (en) * | 2015-11-19 | 2016-01-27 | 浪潮(北京)电子信息产业有限公司 | Virtual machine disposition method and apparatus |
CN106970831A (en) * | 2017-05-15 | 2017-07-21 | 金航数码科技有限责任公司 | The resources of virtual machine dynamic scheduling system and method for a kind of facing cloud platform |
CN109213595A (en) * | 2017-07-07 | 2019-01-15 | 中兴通讯股份有限公司 | Load equilibration scheduling method, device and computer readable storage medium |
CN109976879A (en) * | 2019-03-29 | 2019-07-05 | 南京邮电大学 | A kind of cloud computing virtual machine placement method using curve complementation based on resource |
CN112269632A (en) * | 2020-09-25 | 2021-01-26 | 北京航空航天大学杭州创新研究院 | Scheduling method and system for optimizing cloud data center |
-
2021
- 2021-11-08 CN CN202111310231.9A patent/CN113742090B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105279027A (en) * | 2015-11-19 | 2016-01-27 | 浪潮(北京)电子信息产业有限公司 | Virtual machine disposition method and apparatus |
CN106970831A (en) * | 2017-05-15 | 2017-07-21 | 金航数码科技有限责任公司 | The resources of virtual machine dynamic scheduling system and method for a kind of facing cloud platform |
CN109213595A (en) * | 2017-07-07 | 2019-01-15 | 中兴通讯股份有限公司 | Load equilibration scheduling method, device and computer readable storage medium |
CN109976879A (en) * | 2019-03-29 | 2019-07-05 | 南京邮电大学 | A kind of cloud computing virtual machine placement method using curve complementation based on resource |
CN112269632A (en) * | 2020-09-25 | 2021-01-26 | 北京航空航天大学杭州创新研究院 | Scheduling method and system for optimizing cloud data center |
Also Published As
Publication number | Publication date |
---|---|
CN113742090A (en) | 2021-12-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6457447B2 (en) | Data center network traffic scheduling method and apparatus | |
CN108089921B (en) | Server for cloud big data operation architecture and operation resource optimization method thereof | |
US10789102B2 (en) | Resource provisioning in computing systems | |
WO2018194836A1 (en) | Systems and methods for proactively and reactively allocating resources in cloud-based networks | |
US10601690B2 (en) | Assessing performance of networked computing environments | |
JP7086065B2 (en) | Application link extension methods, devices, and systems | |
KR101941282B1 (en) | Method of allocating a virtual machine for virtual desktop service | |
JP2016525757A (en) | Profile-based SLA assurance based on workload movement in a distributed cloud | |
TWI755415B (en) | Method, device and system for application cluster resource allocation in cloud environment | |
US10656990B2 (en) | Dynamically adjusting reserve portion and allocation portions of disaster recovery site in a virtual computing system | |
JP2012079242A (en) | Composite event distribution device, composite event distribution method and composite event distribution program | |
CN106133693A (en) | The moving method of virtual machine, device and equipment | |
KR20150062634A (en) | Auto scaling system and method in cloud computing environment | |
Garg et al. | Power and resource-aware VM placement in cloud environment | |
KR20170139763A (en) | Method for detecting service of network and apparatus using the same | |
CN107203256B (en) | Energy-saving distribution method and device under network function virtualization scene | |
CN113806017A (en) | Method, system, equipment and storage medium for initial deployment of virtual machine in cloud computing | |
CN113742090B (en) | Load balancing method and device for virtual machine and storage medium | |
CN111382012B (en) | Backup method and device for MySQL cloud database, computer equipment and storage medium | |
Samir et al. | Autoscaling recovery actions for container‐based clusters | |
WO2018170732A1 (en) | Method and device for service deployment under edge cloud architecture | |
Chen et al. | Towards resource-efficient cloud systems: Avoiding over-provisioning in demand-prediction based resource provisioning | |
JP6098167B2 (en) | Virtual machine management program and method thereof | |
CN115904729A (en) | Method, device, system, equipment and medium for connection allocation | |
Theja et al. | An evolutionary computing based energy efficient VM consolidation scheme for optimal resource utilization and QoS assurance |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |