Dynamic deployment method for virtual machines

A dynamic deployment, virtual machine technology, applied in the field of virtual machine deployment, can solve the problems of low resource utilization and waste of resources, and achieve the effect of simple operation and wide application range

Active Publication Date: 2012-05-09
ZHEJIANG UNIV
3 Cites 50 Cited by

AI-Extracted Technical Summary

Problems solved by technology

Because the memory usage rate of this physical machine is as high as 95%, it is difficult to deploy other virtual machines on it...
View more

Abstract

The invention relates to a dynamic deployment method for virtual machines. The method comprises the following steps: dividing residual resources of each dimension on a physical machine by demanded resource quantity of a corresponding dimension of a to-be-deployed physical machine so as to obtain a ratio sequence, screening out the minimum value of ratios in the sequence and taking the minimum value as the maximum accommodating number of the physical machine to a to-be-deployed virtual machine; selecting a physical machine with the largest maximum accommodating number, and judging whether the physical machine has enough resources to accommodate the to-be-deployed virtual machine; if the value of the maximum accommodating number of the target physical machine is greater than or equal to 1, deploying the virtual machine to the physical machine; and if the maximum accommodating number of the target physical machine is less than 1, outputting that the deployment of the virtual machine fails. By using the method disclosed by the invention, a 'short board' phenomenon, namely, resources of other dimensions are wasted because of the lack of resources of some dimension of a physical machine in a cluster, can be avoided, and the resource utilization ratio of the physical machine can be increased.

Application Domain

Resource allocationSoftware simulation/interpretation/emulation

Technology Topic

Virtual machineResource utilization +2

Image

  • Dynamic deployment method for virtual machines
  • Dynamic deployment method for virtual machines
  • Dynamic deployment method for virtual machines

Examples

  • Experimental program(1)

Example Embodiment

[0039] The specific embodiments of the present invention will be described in detail below with reference to the drawings.
[0040] Such as figure 1 The dynamic deployment method of a virtual machine shown includes the steps:
[0041] S1 obtains the remaining resources of each dimension on each physical machine and the resource requirements of the corresponding dimension of the virtual machine to be deployed;
[0042] S2 divides the remaining resources of each dimension on each physical machine by the resource demand of the corresponding dimension of the virtual machine to be deployed to obtain a ratio sequence; the smallest ratio in the ratio sequence is used as the maximum capacity of the physical machine;
[0043] S3 selects the physical machine with the largest accommodating number as the target physical machine;
[0044] S4 determines whether the target physical machine has sufficient resources to accommodate the virtual machine to be deployed:
[0045] If the value of the maximum capacity of the target physical machine is greater than or equal to 1, it indicates that the target physical machine has enough resources to accommodate the virtual machine to be deployed, and the virtual machine is deployed to the physical machine;
[0046] If the value of the maximum capacity of the target physical machine is less than 1, it indicates that all physical machines in the cluster do not have enough resources to accommodate the virtual machine to be deployed, and the output virtual machine deployment fails.
[0047] The foregoing implementation steps include the following technical content: the maximum accommodation attribute of a physical machine represents the maximum number of virtual machines to be deployed that can be placed on the remaining resources on the physical machine. Divide the remaining resources of each dimension on a physical machine by the resource demand of the corresponding dimension of the physical machine to be deployed to obtain a sequence of ratios, and filter the minimum value of the ratio in the sequence as the maximum of the physical machine to the virtual machine to be deployed Capacity. When initial placement of virtual machines or virtual machines need to be migrated, all physical machines are sorted in descending order according to their maximum capacity, and the physical machine with the largest capacity is selected; the maximum capacity of the selected physical machine is selected The value is compared with the value 1 to determine whether the target physical machine has sufficient resources to accommodate the virtual machine to be deployed; if the maximum number of virtual machines is greater than or equal to 1, it indicates that the virtual machine has enough resources to accommodate the virtual machine to be deployed , The virtual machine is deployed to the physical machine, otherwise the output virtual machine deployment fails. If the output virtual machine deployment fails, it indicates that no physical machine has enough resources to accommodate the virtual machine to be deployed.
[0048] The specific implementation process based on the above technical solution is:
[0049] (1) Establish a model. The model established by a physical machine for the maximum capacity Max_Cap of virtual machines to be deployed is as follows:
[0050] Max _ Cap = MIN { PMR j VMR j } ( j = cpu , mem , diskio , netio ) ①
[0051] In formula (1), let the virtual machine to be deployed be VM, the physical machine is PM, and the target physical machine is PM k; VMR j Indicates the number of resources of the virtual machine on dimension j, PMR j Represents the number of resources of the physical machine on dimension j; dimension j includes cpu, mem, diskio, and netio, which represent physical machine, physical machine memory, physical machine disk input and output bandwidth, and physical machine network bandwidth, respectively.
[0052] (2) According to the above model, the physical machines are sorted according to a certain weight; the weight is the maximum capacity Max_Cap of each physical machine; all physical machine PMs are sorted in descending order according to their maximum capacity Max_Cap.
[0053] (3) Select the physical machine PM with the largest capacity as the target physical machine PM k; If the target physical machine PM k The maximum capacity Max_Cap is greater than or equal to 1, indicating that the target physical machine PM k Can accommodate the virtual machine VM to be deployed, then deploy the virtual machine VM to be deployed to the physical machine PM k Up; if the target physical machine PM k The maximum capacity of Max_Cap is less than 1, indicating that the target physical machine PM k If the resources on the above are not enough to accommodate the virtual machine VM to be deployed, the output virtual machine deployment fails; specifically, it can be expressed in the following language:
[0054] PM k =PM[0] ②
[0055] In the expression ②, PM k For the selected target physical machine, determine the target physical machine PM k Is the maximum capacity Max_Cap greater than or equal to 1, if greater than or equal to 1, DST=PM k.
[0056] DST represents the final selected target physical machine;
[0057] Otherwise, the virtual machine deployment fails.
[0058] A specific implementation method combining computer language is given below to realize the method of the present invention.
[0059] First, define the maximum capacity Max_Cap of a physical machine for a virtual machine:
[0060]
[0061] The above computer language calculates the maximum capacity Max_Cap of all physical machines and stores it in an array M.
[0062] Then, sort all physical machines in descending order according to the maximum capacity Max_Cap:
[0063] for i = 1, 2,..., n
[0064] M[i]=Cal_Max_Cap(i);
[0065] Select the physical machine with the largest maximum capacity Max_Cap as the target physical machine PM k :
[0066] Sort PM k by Max_Cap decrease;
[0067] Determine the target physical machine PM k For the maximum number of virtual machines to be deployed M[PM k ] Is it greater than or equal to 1, if it is greater than or equal to 1, it means PM k It is the final target physical machine of the virtual machine to be deployed, and the virtual machine is deployed to the physical machine; otherwise, it indicates that the virtual machine deployment fails, because any physical machine does not have enough resources to accommodate the virtual machine to be deployed, the implementation language of the specific computer as follows:
[0068]
[0069] The algorithm demonstration using the method of the present invention is as follows:
[0070] The resource requirements of the virtual machine to be initially placed are:
[0071] cpu=6%mem=7%diskio=5%netio=4%
[0072] There are 6 physical machines, and the resource usage of each physical machine is as follows:
[0073] PM0:
[0074] Used resources: cpu=60%mem=70%diskio=40%netio=80%
[0075] Remaining resources: cpu = 40% mem = 30% diskio = 60% netio = 20%
[0076] PM1:
[0077] Used resources: cpu = 80% mem = 65% diskio = 75% netio = 70%
[0078] Remaining resources: cpu = 20% mem = 35% diskio = 25% netio = 30%
[0079] PM2:
[0080] Used resources: cpu=40%mem=75%diskio=50%netio=65%
[0081] Remaining resources: cpu = 60% mem = 25% diskio = 50% netio = 35%
[0082] PM3:
[0083] Used resources: cpu = 60% mem = 45% diskio = 75% netio = 75%
[0084] Remaining resources: cpu = 40% mem = 55% diskio = 25% netio = 25%
[0085] PM4:
[0086] Used resources: cpu = 65% mem = 70% diskio = 55% netio = 60%
[0087] Remaining resources: cpu = 35% mem = 30% diskio = 45% netio = 40%
[0088] PM5:
[0089] Used resources: cpu = 75% mem = 45% diskio = 65% netio = 80%
[0090] Remaining resources: cpu = 25% mem = 55% diskio = 35% netio = 20%
[0091] Calculate the maximum capacity of each physical machine for the physical machine to be deployed Max_Cap The maximum capacity of the physical machine PM0:
[0092] Max_Cap[0]=min{40/6, 30/7, 60/5, 20/4}=30/7=4.29 Maximum capacity of physical machine PM1:
[0093] Max_Cap[1]=min{20/6, 35/7, 25/5, 30/4}=20/6=3.33 Maximum capacity of the physical machine PM2:
[0094] Max_Cap[2]=min{60/6, 25/7, 50/5, 35/4}=25/7=3.57 The maximum capacity of the physical machine PM3:
[0095] Max_Cap[3]=min{40/6, 55/7, 25/5, 25/4}=25/5=5 Maximum capacity of the physical machine PM4:
[0096] Max_Cap[4]=min{35/6, ​​30/7, 45/5, 40/4}=30/7=4.29 Maximum capacity of physical machine PM5:
[0097] Max_Cap[5]=min{25/6, 55/7, 35/5, 20/4}=25/6=4.17
[0098] Sort all physical machines in descending order according to the maximum capacity Max_Cap, and select the physical machine PM3 with the largest maximum capacity Max_Cap as the target physical machine PM k.
[0099] Target physical machine PM k The maximum number of virtual machines to be deployed is greater than 1, so the target physical machine PM k As the final target physical machine DST; deploy the virtual machine to the physical machine PM3.

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

Graphene film and preparation method therefor

Owner:CHANGZHOU FUXI TECH CO LTD

Classification and recommendation of technical efficacy words

  • easy to operate
  • Wide range of applications

Lancet device

InactiveUS7303573B2inexpensively mass-producedeasy to operate
Owner:ABBOTT DIABETES CARE INC

Rapid and non-invasive optical detection of internal bleeding

InactiveUS20050065436A1easy to operaterapid and accurate result
Owner:HO WINSTON ZONH +2
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