Method and device for load balancing of resources of virtual machine

A load balancing and virtual machine technology, applied in the computer field, can solve problems such as virtual computing system instability, and achieve the effects of avoiding migration overhead, resolving conflicts, and saving network resources

Inactive Publication Date: 2009-12-02
BEIHANG UNIV
0 Cites 102 Cited by

AI-Extracted Technical Summary

Problems solved by technology

[0006] The embodiment of the present invention provides a virtual machine resource load balancing method and device, which are used to solve the unnecessary migration overhead caused by the temporary resource util...
View more

Method used

The load balancing method provided by this embodiment triggers virtual host migration according to the resource utilization rate information of the local physical host in the future, and determines the purpose according to the resource utilization rate and migration probability of other physical hosts in the virtual computing system in the future Migrating hosts avoids unnecessary migration overhead caused by temporary resource utilization peaks, saves network resources, solves conflicts caused by clustering effects, and ensures the stability of the virtual computing system.
The virtual machine resource load balancing device provided in this embodiment triggers virtual host migration according to the resource utilization rate information of the local physical host in the future, and according to the resource utilization rate and migration probability of other physical hosts in the virtual computing system in the future To determine the destination migration host, avoid unnecessary migration overhead caused by temporary resource utilization peaks, save network resources, and solve the conflict problem caused by the clustering effect, ensuring the stability of the virtual computing system.
[0051] The virtual machine resource load balancing method provided in this embodiment predicts the resource utilization rate i...
View more

Abstract

The embodiment of the invention provides a method and a device for load balancing of resources of a virtual machine. The method comprises the following steps of: if the obtained resource utilization rate within the future time preset by a local physical host is more than a set threshold value, transmitting a request message of inquiring the current resource utilization rate of other physical hosts in a virtual computing system to a proxy server; according to the received resource utilization rates of other physical hosts, acquiring a physical host list of which the resource utilization rate meets the operating requirement of a virtual host to be moved, which is operated on the local physical host; determining a destination movement physical host according to moving probabilities of all physical hosts in the physical host list and the resource utilization rates within the future time preset by all physical hosts in the physical host list; and moving the virtual host to be moved to the destination movement physical host. The embodiment of the invention has the advantages of avoiding unnecessary moving cost due to the temporary peak value of the resource utilization rate, saving network resources, solving the conflict problem caused by the cluster effect, and ensuring the stability of the virtual computing system.

Application Domain

Resource allocationTransmission +1

Technology Topic

Peak valueResource utilization +4

Image

  • Method and device for load balancing of resources of virtual machine
  • Method and device for load balancing of resources of virtual machine
  • Method and device for load balancing of resources of virtual machine

Examples

  • Experimental program(1)

Example Embodiment

[0022] The technical solutions of the present invention will be further described in detail below through the accompanying drawings and embodiments.
[0023] figure 1 It is a flowchart of a method for virtual machine resource load balancing provided by an embodiment of the present invention, such as figure 1 As shown, the method includes:
[0024] Step 101: If the acquired resource utilization of the local physical host in the preset future time is greater than the set threshold, send a request message to query the current resource utilization of other physical hosts in the virtual computing system to the proxy server;
[0025] The monitoring engine of the local physical host monitors the load status of the local physical host in real time, and the load status is generally reflected by resource utilization (utilization). The resource utilization includes the resources occupied by the virtual machine resource load and the resources occupied by other processes running on the local physical host. The local physical host in the embodiment of the present invention is mainly used to provide services to the virtual machine. Therefore, we mainly consider the virtual machine resources The load is for the resource utilization of the local physical host, and the resources occupied by other processes running on the local physical host can be ignored. If at a certain time, the resource utilization rate of the local physical host is monitored to exceed a set threshold, the threshold usually represents the upper limit of the load that the local physical host can bear. If the threshold is exceeded, it may cause the local physical host The running speed is slow, which affects the normal operation of the local physical host. When the resource utilization exceeds this threshold, it is necessary to predict the resource utilization in a period of time in the future. The prediction can be based on the resource utilization in a historical period before the current moment. You can select a period of history before the current moment. Analyze the resource utilization at several points in time, and predict the resource utilization at several points in the future after the current time. Among them, the historical time period and the future time period can be based on needs or experience values. Make a selection. By predicting the resource utilization in the future, it is possible to prevent the resource utilization monitored at the current moment from being a temporary load peak situation. After the resource utilization in the future is obtained, it is necessary to further analyze whether the resource utilization is greater than the set value. If the threshold is greater than, it means that the local physical host resources are overloaded, and a virtual host needs to be migrated to other physical hosts in the virtual computing system. At this time, the local physical host sends a request message to the proxy server to request to know the load utilization status of other physical hosts.
[0026] Step 102: According to the received resource utilization of other physical hosts, obtain a list of physical hosts whose resource utilization meets the operating requirements of the virtual host to be migrated running on the local physical host;
[0027] After receiving the request message sent by the local host, the proxy server obtains the current resource utilization of other physical hosts in the virtual computing system and sends it to the local physical host. After receiving the current resource utilization of other physical hosts, the local physical host selects the virtual host to be migrated, and can select the virtual host that consumes the most local physical host resources as the migration target, or select the virtual host to be migrated in other ways. After the virtual host to be migrated is selected, other physical hosts in the virtual computing system are filtered according to the resource utilization of the physical host required for the operation of the virtual host to obtain a list of physical hosts that meet the operating requirements of the virtual host to be migrated.
[0028] Step 103: Determine the target migration physical host according to the migration probability of each physical host in the physical host list and the resource utilization rate of each physical host in the physical host list within a preset time in the future, and the migration probability is based on the current resources of each physical host in the physical host list The utilization rate is determined;
[0029] Among them, the migration probability is determined according to the current resource utilization of each physical host in the physical host list. Therefore, the migration probability reflects the probability of other physical hosts being selected as the destination physical host for migration to a certain extent, which is higher than the current resource utilization. The virtual host to be migrated should be migrated to a physical host with low resource utilization. The lower the resource utilization, the greater the migration probability, and the greater the probability of being selected as the destination physical host for migration. For the migration probability of other hosts in the host list, we select the destination to migrate the physical host with a certain probability. The physical host with the lowest resource utilization rate is likely to be selected, but it is also possible to select the second lowest resource utilization rate. To a certain extent, the clustering effect is avoided, but it can usually ensure that the virtual host to be migrated is migrated to a physical host with a lower resource utilization rate, so as to achieve load balancing in the virtual computing system to the greatest extent. At the same time, consider the resource utilization of each host in the future to avoid migrating the virtual host to be migrated to a physical host with higher resource utilization in the future, which will cause the physical host to trigger the migration and cause the entire virtual computing The system is unstable. Combining these two factors, select the destination physical host in the physical host list.
[0030] Step 104: Migrate the virtual host to be migrated to the target physical host to be migrated.
[0031] The load balancing method provided in this embodiment triggers virtual host migration according to the resource utilization information of the local physical host in the future, and determines the destination migration host according to the resource utilization and migration probability of other physical hosts in the virtual computing system in the future. It avoids unnecessary migration overhead caused by temporary resource utilization peaks, saves network resources, solves the conflict problem caused by the clustering effect, and ensures the stability of the virtual computing system.
[0032] figure 2 This is a flowchart of a method for virtual machine resource load balancing provided by another embodiment of the present invention, such as figure 2 As shown, the method includes:
[0033] Step 201: Monitor whether the current resource utilization of the local physical host is greater than a set threshold;
[0034] Step 202: If the current resource utilization of the local physical host is greater than the set threshold, judge whether the resource utilization of the local physical host in the preset future time is greater than the set threshold according to the resource utilization in the preset history time of the local physical host; otherwise, Go back to step 201;
[0035]Among them, predicting the resource utilization rate of the local physical host within the preset historical time according to the resource utilization rate of the local physical host within the preset future time can be analyzed by using an autoregressive model, which can select a period of time before the current time and a period of time in the future. A number of discrete time points within, among which, each discrete time point can be selected at equal time intervals, or as required. Analyze the resource utilization rate at each time point before the current moment to obtain the resource utilization rate at each discrete time point in the future.
[0036] Step 203: If the acquired resource utilization of the local physical host in the preset future time is greater than the set threshold, send a request message to query the current resource utilization of other physical hosts in the virtual computing system to the proxy server;
[0037] Step 204: Determine the virtual host to be migrated according to the ratio of the load of the virtual host running on the local physical host to the memory of the virtual host;
[0038] The selection of the virtual host to be migrated can be based on the formula: USR i = u i S i ; Where u i Represents the load of the virtual host, that is, the resource utilization, S i Indicates the memory of the virtual host, USR i The size of represents the ratio of the load of the virtual host to the memory of the virtual host. The virtual hosts running on the local physical host can be calculated using the above formula respectively, and the USR of each virtual host i Size to select the virtual host to be migrated. The greater the resource utilization of the virtual host, the more local physical host resources are consumed; the smaller the memory of the virtual host, the smaller the amount of data that needs to be transferred during the migration process. Therefore, USR i The larger the value, the more the virtual host consumes the resources of the local physical host, and the amount of data transferred is the smallest. Therefore, you can usually choose USR i The largest virtual host is used as the virtual host to be migrated.
[0039] Step 205: Receive current resource utilization of other physical hosts;
[0040] Step 206: Obtain a list of physical hosts whose resource utilization rate meets the operating requirements of the virtual host to be migrated.
[0041] Step 207: Determine whether the number of physical hosts in the physical host list is 0; if it is 0, go back to step 201, otherwise go to step 208;
[0042] Step 208: Determine whether the number of physical hosts in the physical host list is 1; if it is 1, go to step 211, otherwise go to step 209;
[0043] Step 209: Calculate the migration probability of each physical host in the physical host list.
[0044] The specific method is: assign a weight to each host in the physical host list, weight = 1-utilization; the migration probability of each physical host i probability i = weight i Σ i = 1 n weight i , Among them, n represents the number of physical hosts in the physical host list, and the migration probability of each physical host adds up to 1.
[0045] Step 210: Determine the destination physical host to be migrated according to a random number generated by a preset rule, and send a migration request to the destination physical host to be migrated;
[0046] Among them, since the total migration probability of each physical host is 1, the range of the generated random number is between 0 and 1. The random number falls within the migration probability range of which physical host, then the physical host is used as the destination for migration Physical host. If the resource utilization rate of a physical host is lower, the migration probability is greater, and since the migration probability of each physical host sums up to 1, the greater the probability that the random number falls within the migration probability range of the physical host, it is selected as The probability of destination migration host is greater, but it is also possible to select the second-lower resource utilization, so as to avoid the clustering effect to a certain extent, and avoid several physical hosts from migrating virtual hosts to the same destination at the same time. The conflict caused by the physical host avoids the problem of instability of the virtual computing system, and realizes the load balancing in the virtual computing system to the greatest extent.
[0047] Step 211: Whether the resource utilization rate of the target migration physical host in the preset future time is greater than the preset threshold, if yes, go to step 212 if yes, go to step 213;
[0048] After the destination physical host receives the migration request, it predicts the resource utilization in the future based on its own resource utilization in a certain period of time. If the resource utilization in the future time is greater than the set threshold, it means that the physical host is migrated. In the future, the load resource occupancy rate is relatively high. If the physical host is selected as the destination to migrate, the migration of the destination physical host will be triggered, which will cause the entire virtual computing system to be unstable. Therefore, the physical host is not suitable as the destination migration host. It is necessary to regenerate the random number to obtain a new destination to migrate the physical host.
[0049] Step 212: Delete the target migration physical host from the physical host list, and return to step 207;
[0050] Step 213: Migrate the virtual host to be migrated to the target physical host to be migrated.
[0051] The virtual machine resource load balancing method provided in this embodiment predicts the resource utilization in the future based on the resource utilization of the local physical host in the historical time to trigger the migration of the virtual host, and according to the future moments of other physical hosts in the virtual computing system The resource utilization rate and migration probability are used to determine the target migration host, avoid unnecessary migration overhead caused by temporary resource utilization peaks, save network resources, solve the conflict problem caused by the clustering effect, and ensure virtual computing The stability of the system.
[0052] A person of ordinary skill in the art can understand that all or part of the steps in the above method embodiments can be implemented by a program instructing relevant hardware. The foregoing program can be stored in a computer readable storage medium. When the program is executed, it is executed. Including the steps of the foregoing method embodiment; and the foregoing storage medium includes: ROM, RAM, magnetic disk, or optical disk and other media that can store program codes.
[0053] image 3 It is a schematic structural diagram of a virtual machine resource load balancing apparatus provided by an embodiment of the present invention, such as image 3 As shown, the device includes: an interface module 31, an analysis module 32, a selection module 33, and a migration module 34; wherein, the interface module 31 is used if the acquired local physical host's resource utilization rate in the preset future time is greater than the set threshold , Then send to the proxy server a request message for querying the current resource utilization of other physical hosts in the virtual computing system; the analysis module 32 is used to obtain the resource utilization according to the received resource utilization of other physical hosts and obtain the resource utilization that meets the waiting time running on the local physical host. Migrate the list of physical hosts required by the virtual host; the selection module 33 is used to determine the destination to migrate the physical host according to the migration probability of each physical host in the physical host list and the resource utilization rate of each physical host in the physical host list in the future. The probability is determined according to the current resource utilization of each physical host in the physical host list; the migration module 34 is configured to migrate the virtual host to be migrated to the destination physical host.
[0054] The interface module 31 obtains the resource utilization rate in a period of time in the future after the current moment in real time, and can perform it based on the resource utilization rate in a period of historical time before the current moment, and select the resource utilization rate at a certain period of time before the current moment. To analyze and predict the resource utilization rate at several points in the future time after the current moment. Among them, the historical time period and the future time period can be selected according to needs or based on empirical values. The historical time period and the future time period The selection of time points can be selected at equal intervals. By predicting the resource utilization rate in the future, it is possible to prevent the resource utilization rate monitored at the current moment from being a temporary load peak situation. After obtaining the resource utilization rate for a period of time in the future, further analyze whether the resource utilization rate is greater than the set value. If the threshold is greater than, it means that the local physical host resources are overloaded, and a virtual host needs to be migrated to other physical hosts in the virtual computing system. At this time, the interface module 31 sends a request message to the proxy server to request to know the load utilization status of other physical hosts.
[0055] After receiving the request message sent by the local host, the proxy server obtains the current resource utilization of other physical hosts in the virtual computing system and sends it to the local physical host. The analysis module 32 selects the virtual host to be migrated based on the received current resource utilization of other physical hosts. The virtual host that consumes the most local physical host resources can be selected as the migration target, or the virtual host to be migrated can be selected in other ways. After the virtual host to be migrated is selected, other physical hosts in the virtual computing system are filtered according to the resource utilization rate of the physical host required for the operation of the virtual host to obtain a list of physical hosts that meet the operating requirements of the virtual host to be migrated.
[0056] Among them, the migration probability is determined according to the current resource utilization of each physical host in the physical host list. Therefore, it reflects the probability of other physical hosts being selected as the destination physical host for migration to a certain extent, which is higher than the current resource utilization rate. Physical hosts, virtual hosts to be migrated should be moved to physical hosts with low resource utilization. The lower the resource utilization, the greater the probability of migration, and the greater the probability of being selected as the destination to migrate the physical host, and through the physical host For the migration probability of other hosts in the list, we select the physical host to migrate with a certain probability. The physical host with the lowest resource utilization rate is likely to be selected, but it is also possible to select the second lowest resource utilization rate. Therefore, to a certain extent The above avoids the clustering effect, but it can usually ensure that the virtual host to be migrated is migrated to a physical host with a lower resource utilization rate, so as to achieve load balancing in the virtual computing system to the greatest extent. At the same time, consider the resource utilization of each physical host in the future to avoid migrating the virtual host to be migrated to a physical host with higher resource utilization in the future, which will cause the physical host to trigger the migration again and cause the entire virtual host The computing system is unstable. The selection module 33 combines these two factors to select the destination physical host for migration in the physical host list.
[0057] After the destination physical host is selected, the migration module 34 migrates the virtual host to be migrated to the destination physical host.
[0058] The virtual machine resource load balancing device provided in this embodiment triggers virtual host migration according to the resource utilization information of the local physical host in the future, and determines the purpose according to the resource utilization and migration probability of other physical hosts in the virtual computing system in the future. Host migration avoids unnecessary migration overhead caused by temporary resource utilization peaks, saves network resources, solves the conflict problem caused by the clustering effect, and ensures the stability of the virtual computing system.
[0059] Figure 4 It is a schematic structural diagram of a virtual machine resource load balancing apparatus provided by another embodiment of the present invention, such as Figure 4 As shown, the device includes: an interface module 31, an analysis module 32, a selection module 33, and a migration module 34; further, the device may also include: a monitoring module 35, a prediction module 36, a judgment module 37, and a calculation module 38; among them, The monitoring module 35 is used to monitor whether the current resource utilization of the local physical host is greater than the set threshold; the prediction module 36 is used to predict the resource utilization of the local physical host in the preset future time based on the resource utilization of the local physical host in the preset historical time ; Judging module 37 is used to determine if the current resource utilization rate of the local physical host is greater than the set threshold, then determine whether the resource utilization rate of the local physical host in a preset future time is greater than the set threshold; the calculation module 38 is used to run on the local physical host The ratio of the load of the virtual host to the memory of the virtual host determines the virtual host to be migrated.
[0060]The selection module 33 may also include: a calculation sub-module 331, a generation sub-module 332, a processing sub-module 333, and a control sub-module 334; wherein, the calculation sub-module 331 is used to obtain each physical host according to the current resource utilization of each physical host in the physical host list. The migration probability of the physical host; the generation sub-module 332 is used to generate a random number according to preset rules; the processing sub-module 333 is used to determine the target migration physical host according to the migration probability range of each physical host in the physical host list into which the random number falls, and Send a migration request to the destination physical host; the control sub-module 334 is used for the resource utilization rate of the destination migration physical host in the preset future time is greater than the preset threshold, then delete the destination migration physical host from the physical host list and control The generating sub-module 332 generates a random number again according to the preset rule.
[0061] The monitoring module 35 monitors whether the current resource utilization of the local physical host is greater than the set threshold, and the prediction module 36 predicts the resource utilization of the local physical host in the preset future time according to the resource utilization of the local physical host in the preset historical time. If the current resource utilization of the host is greater than the set threshold, the determining module 36 determines whether the resource utilization of the local physical host in the preset future time is greater than the set threshold; among them, the local physical host predicts the local resource utilization in the preset historical time. The resource utilization rate of the physical host in the preset future time can be analyzed using an autoregressive model. Several discrete time points in a historical time before the current moment and a future time in the future can be selected respectively, where each discrete time point can be continuous Select at equal time intervals, or you can select as needed. Analyze the resource utilization rate at each time point before the current moment to obtain the resource utilization rate at each discrete time point in the future. If the acquired resource utilization of the local physical host in the preset future time is greater than the set threshold, the interface module 31 sends a request message to the proxy server to query the current resource utilization of other physical hosts in the virtual computing system; The ratio of the load of the virtual host running on the physical host to the memory of the virtual host determines the virtual host to be migrated, which can be specifically based on the formula: USR i = u i S i ; Where u i Represents the load of the virtual host, that is, the resource utilization, S i Indicates the memory of the virtual host. The above formula can be used to calculate the virtual host running on the local physical host. The USR of each virtual host i Size to select the virtual host to be migrated. The greater the resource utilization of the virtual host, the more local physical host resources are consumed; the smaller the memory of the virtual host, the smaller the amount of data that needs to be transferred during the migration process. Therefore, USR i The larger the value, the more the virtual host consumes the resources of the local physical host, and the amount of data transferred is the smallest. Therefore, you can choose USR i The largest virtual host is used as the virtual host to be migrated. The analysis module 32 receives resource utilization rates of other physical hosts, and obtains a list of physical hosts whose resource utilization rates meet the operating requirements of the virtual host to be migrated running on the local physical host; the calculation submodule 331 calculates the migration probability of each physical host in the physical host list, The specific method is: assign a weight to each host in the physical host list, weight = 1-utilization; the migration probability of each physical host i probability i = weight i Σ i = 1 n weight i , Among them, n represents the number of physical hosts in the physical host list, and the migration probability of each physical host adds up to 1. The generation sub-module 332 generates random numbers according to preset rules. Since the migration probability of each physical host sums up to 1, the range of the generated random numbers is between 0 and 1, and the processing sub-module 333 falls into The destination physical host is determined within the migration probability range of which physical host, and a migration request is sent to the destination physical host. If the resource utilization rate of a physical host is lower, the migration probability is greater, and since the migration probability of each physical host sums up to 1, the greater the probability that the random number falls within the migration probability range of the physical host, it is selected as The higher the probability of the target migration host, but it is also possible to select the second-lower resource utilization rate, so as to avoid the clustering effect to a certain extent, and avoid several physical hosts from migrating virtual hosts to the same destination at the same time. The conflict caused by the physical host avoids the problem of instability of the virtual computing system, and achieves load balancing in the virtual computing system to the greatest extent. After the destination physical host receives the migration request, it predicts the resource utilization in the future based on its own resource utilization in a certain period of time. If the resource utilization in the future is greater than the preset threshold, it means that the physical host is migrated. In the future, the load resource occupancy rate is high, and it is not suitable for the target migration host. Then the control sub-module 334 controls the generation sub-module block 332 to regenerate a random number to obtain a new destination physical host for migration. And delete the target migration physical host from the physical host list. If the resource utilization of the target migration physical host in the future is less than the preset threshold, the migration module 34 migrates the virtual host to be migrated to the target migration physical host.
[0062] The virtual machine resource load balancing device provided in this embodiment predicts the resource utilization rate in the future time according to the resource utilization rate of the local physical host in the historical time to trigger the virtual host migration, and according to the future time of other physical hosts in the virtual computing system The resource utilization rate and migration probability are used to determine the target migration host, which avoids unnecessary migration overhead caused by temporary resource utilization peaks, saves network resources, solves the conflict problem caused by clustering effects, and ensures virtual computing The stability of the system.
[0063] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: The technical solutions recorded in the foregoing embodiments are modified, or some of the technical features are equivalently replaced; these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

PUM

no PUM

Description & Claims & Application Information

We can also present the details of the Description, Claims and Application information to help users get a comprehensive understanding of the technical details of the patent, such as background art, summary of invention, brief description of drawings, description of embodiments, and other original content. On the other hand, users can also determine the specific scope of protection of the technology through the list of claims; as well as understand the changes in the life cycle of the technology with the presentation of the patent timeline. Login to view more.

Similar technology patents

Automatic comment publishing method and device

Owner:GUANGZHOU YUNRUNDA DATA SERVICES CO LTD

Message forwarding method and device

ActiveCN113923160Asave network resources
Owner:NEW H3C SECURITY TECH CO LTD

Classification and recommendation of technical efficacy words

Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products