CN105404545B - The method and device of virtual machine distribution - Google Patents
The method and device of virtual machine distribution Download PDFInfo
- Publication number
- CN105404545B CN105404545B CN201510882455.5A CN201510882455A CN105404545B CN 105404545 B CN105404545 B CN 105404545B CN 201510882455 A CN201510882455 A CN 201510882455A CN 105404545 B CN105404545 B CN 105404545B
- Authority
- CN
- China
- Prior art keywords
- virtual machine
- allocated
- rack
- machine
- location
- 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
- 238000009826 distribution Methods 0.000 title claims abstract description 50
- 238000000034 method Methods 0.000 title claims abstract description 42
- 238000001514 detection method Methods 0.000 claims description 53
- 239000011800 void material Substances 0.000 claims description 12
- 238000005516 engineering process Methods 0.000 abstract description 5
- 238000004891 communication Methods 0.000 abstract description 2
- 238000010586 diagram Methods 0.000 description 15
- 238000012544 monitoring process Methods 0.000 description 5
- 230000006870 function Effects 0.000 description 3
- 238000003860 storage Methods 0.000 description 2
- 208000019901 Anxiety disease Diseases 0.000 description 1
- 230000036506 anxiety Effects 0.000 description 1
- 230000007812 deficiency Effects 0.000 description 1
- 238000005304 joining Methods 0.000 description 1
- 238000002360 preparation method Methods 0.000 description 1
Abstract
The invention discloses a kind of methods of virtual machine distribution, are related to field of communication technology, guarantee the reliability of virtual machine to realize the quick unified virtual machine method of salary distribution.Method provided by the invention includes:Obtain office's location quantity of data center, rack quantity, the machine frame quantity of each rack of each innings of location, the physical host quantity of each machine frame and required virtual machine quantity;Determine the virtual machine for needing to distribute in each machine frame.When the host number in each machine frame is all larger than or is equal to itself corresponding third virtual machine quantity to be allocated, a virtual machine is distributed respectively on host identical with third virtual machine quantity to be allocated;Otherwise virtual machine identical with host number in the first machine frame, and distribution still unappropriated virtual machine on the first machine frame on the host of one or more second machine frames are distributed on first machine frame.During the present invention is suitable for virtual machine distribution.
Description
Technical field
The present invention relates to the method and devices that field of communication technology more particularly to a kind of virtual machine distribute.
Background technique
Virtualization technology can realize the elasticity deployment and unified allocation of resources of hardware resource, be conducive to maximumlly utilize resource,
Thus many industries have used virtualization technology to construct data center at present.When some function needs to dispose, data center
Management platform as desired, the hardware resource of bottom be allocated to the function use.Each application program (is also regarded as net
Member either network function) it all operates in a virtual machine.Virtual machine is then operate in some host, and phase is assigned
Calculating, the storage, Internet resources answered.To cope with high load scenarios, some business may require that multiple examples of disposing application program,
So as to parallel processing client request, this requires generate multiple virtual machines in systems.Multiple example institutes of some application program
Corresponding each virtual machine should be reasonably distributed in each host of data center, and concentration is avoided to be deployed in some host or certain
In the host of resource anxiety, in order to avoid associated host breaks down or when inadequate resource, traffic affecting is used.
Since application program is run among virtual machine, thus the reliability of virtual machine directly affect application program can
By property.The corresponding virtual machine of application program runs on which physical host of data center or multiple examples of application program
When running on multiple virtual machines, how these virtual machines select physical host respectively, do not there is automatic and efficient mode at present,
It needs manually to carry out auxiliary to select and configure.Meanwhile operating condition of the example of application program in virtual machine needs to carry out
Monitoring, to ensure reliability.The content of monitoring includes:Example whether hang dead, virtual machine resource whether meet demand, so as to right
Example and virtual machine are adjusted.For two selection of above-mentioned physical machine, example running state monitoring problems, there has been no unified fast
Prompt solution.
Summary of the invention
The embodiment of the present invention provides a kind of method and device of virtual machine distribution, to realize quick unified virtual machine
The method of salary distribution and example monitor mode, to guarantee to virtualize the reliability of network element.
In order to achieve the above objectives, the embodiment of the present invention adopts the following technical scheme that:
The embodiment of the invention provides a kind of methods of virtual machine distribution, including:
Obtain office's location quantity of data center, rack quantity, the machine frame quantity of each rack, each machine frame of each innings of location
Host number and purpose virtual machine quantity;
According to the quotient and the remainder that the purpose virtual machine quantity is obtained divided by office location quantity, each innings of location is determined respectively
The virtual machine quantity to be allocated of need to distribute first;
In each innings of location, the quotient that is obtained according to the described first virtual machine quantity to be allocated divided by the rack quantity and remaining
Number determines the second virtual machine quantity to be allocated that each rack needs to distribute respectively;
In each rack, the quotient that is obtained according to the described second virtual machine quantity to be allocated divided by the machine frame quantity and remaining
Number determines the third virtual machine quantity to be allocated that each machine frame needs to distribute respectively;
In each machine frame, when the host number in each machine frame is all larger than or is equal to itself corresponding third void to be allocated
When quasi- machine quantity, a virtual machine is distributed respectively on host identical with third virtual machine quantity to be allocated;
When the host number in the first machine frame is less than itself corresponding third virtual machine quantity to be allocated, then described the
Virtual machine identical with host number in the first machine frame is distributed on one machine frame, and is divided on the host of one or more second machine frames
Fit over still unappropriated virtual machine on the first machine frame;Wherein, there are free hosts in second machine frame.
The embodiment of the invention also provides a kind of virtual machine assigned units, including:
First acquisition unit, for obtaining office's location quantity of data center, the rack quantity of each innings of location, each rack
Machine frame quantity, the host number of each machine frame and purpose virtual machine quantity;
First determination unit, quotient for being obtained according to the purpose virtual machine quantity divided by office location quantity and remaining
Number determines the first virtual machine quantity to be allocated that each innings of location needs to distribute respectively;
Second determination unit is used in each innings of location, according to the described first virtual machine quantity to be allocated divided by the machine
The quotient and the remainder that frame quantity obtains determine the second virtual machine quantity to be allocated that each rack needs to distribute respectively;
Third determination unit is used in each rack, according to the described second virtual machine quantity to be allocated divided by the machine
The quotient and the remainder that frame quantity obtains determine the third virtual machine quantity to be allocated that each machine frame needs to distribute respectively;
Allocation unit, for itself being corresponded to when the host number in each machine frame is all larger than or is equal in each machine frame
Third virtual machine quantity to be allocated when, distributed respectively on host identical with third virtual machine quantity to be allocated one it is virtual
Machine;When the third corresponding less than itself of the host number in the first machine frame virtual machine quantity to be allocated, then in first machine
Virtual machine identical with host number in the first machine frame is distributed on frame, and distribution exists on the host of one or more second machine frames
Still unappropriated virtual machine on first machine frame;Wherein, there are free hosts in second machine frame.
The distribution method and device of virtual machine provided herein of the embodiment of the present invention, by requiring virtual machine as far as possible dispersedly
It is assigned on each host, while Intrusion Detection based on host resource service condition being answered to select used host, to realize virtual machine
Automation distribution, also improve the reliability of virtual machine.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below
There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this
Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with
It obtains other drawings based on these drawings.
Fig. 1 is a kind of method flow diagram of virtual machine distribution provided in an embodiment of the present invention;
Fig. 2 is the method flow diagram of another virtual machine distribution provided in an embodiment of the present invention;
Fig. 3 is the method flow diagram of another virtual machine distribution provided in an embodiment of the present invention;
Fig. 4 is the method flow diagram of another virtual machine distribution provided in an embodiment of the present invention;
Fig. 5 is the method flow diagram of another virtual machine distribution provided in an embodiment of the present invention;
Fig. 6 is the method flow diagram of another virtual machine distribution provided in an embodiment of the present invention;
Fig. 7 is the method flow diagram of another virtual machine distribution provided in an embodiment of the present invention;
Fig. 8 is the method flow diagram of another virtual machine distribution provided in an embodiment of the present invention;
Fig. 9 is a kind of composition block diagram of virtual machine assigned unit provided in an embodiment of the present invention;
Figure 10 is the composition block diagram of another virtual machine assigned unit provided in an embodiment of the present invention;
Figure 11 is the composition block diagram of another virtual machine assigned unit provided in an embodiment of the present invention;
Figure 12 is the composition block diagram of another virtual machine assigned unit provided in an embodiment of the present invention;
Figure 13 is the composition block diagram of another virtual machine assigned unit provided in an embodiment of the present invention;
Figure 14 is the composition block diagram of another virtual machine assigned unit provided in an embodiment of the present invention;
Figure 15 is the composition block diagram of another virtual machine assigned unit provided in an embodiment of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other
Embodiment shall fall within the protection scope of the present invention.
The embodiment of the invention provides a kind of method of virtual machine distribution, be mainly used for solving how based on business demand and
Physical machine state is the problem of virtual machine selects suitable physical machine, and process is as shown in Figure 1, include:
101, office's location quantity of data center, the rack quantity of each innings of location, the machine frame quantity of each rack, each is obtained
The host number and purpose virtual machine quantity of machine frame.
Wherein, office's location quantity of data center is configured as needed, and the rack quantity in different office locations can be identical,
It can not also be identical.Machine frame quantity in different racks can be identical, can not also be identical.Host number in different machine frames can
It, can not also be identical with identical.
102, the quotient and the remainder obtained according to the purpose virtual machine quantity divided by office location quantity determine each respectively
The first virtual machine quantity to be allocated that office location needs to distribute.
Each innings of location needs to distribute what virtual machine quantity was obtained with the purpose virtual machine quantity divided by office location quantity
Subject to quotient.Remainder if it exists, then remaining remainder is assigned randomly in any one or more office locations.Such as there are 13 void at present
Intend confidential distribution, there are 3 office locations to may carry 13 virtual machines, then each innings of location will distribute 4 virtual machines, also remaining next void
Quasi- machine, then at this point, this virtual machine assigns to some in 4 office locations at random.The subsequent processing mode in office location or rack
It is similar.
103, in each innings of location, the quotient that is obtained according to the described first virtual machine quantity to be allocated divided by the rack quantity
And remainder, the second virtual machine quantity to be allocated that each rack needs to distribute is determined respectively.
104, in each rack, the quotient that is obtained according to the described second virtual machine quantity to be allocated divided by the machine frame quantity
And remainder, the third virtual machine quantity to be allocated that each machine frame needs to distribute is determined respectively.In each machine frame, when each machine frame
When interior host number is all larger than or is equal to itself corresponding third virtual machine quantity to be allocated, 105 are thened follow the steps;When first
When host number in machine frame is less than itself corresponding third virtual machine quantity to be allocated, 106 are thened follow the steps.
Wherein, the first machine frame belongs in the virtual machine allocation flow after step 101 starting, first is selected for distributing
One in the machine frame of virtual machine.
105, a virtual machine is distributed respectively on host identical with third virtual machine quantity to be allocated.
106, virtual machine identical with host number in the first machine frame is distributed on first machine frame, and at one or more
Distribution still unappropriated virtual machine on the first machine frame on the host of a second machine frame.
Wherein, there are free hosts in second machine frame, if the host number existed in a machine frame at this time can expire
The current still unappropriated virtual machine of foot also can choose multiple machine frames, if needing two at this time then a machine frame can be selected only
Host in a or more machine frame is just able to satisfy current still unappropriated virtual machine, then may be selected by multiple.Also, second
Machine frame can be the machine frame in any one innings of location.
The distribution method of virtual machine provided herein of the embodiment of the present invention, by requiring virtual machine to be dispersedly assigned to as far as possible
On each host, while Intrusion Detection based on host resource service condition being answered to select used host, to realize the automation of virtual machine
Distribution, also improves the reliability of virtual machine.
Further, the embodiment of the present invention for step 102 " it is described according to the purpose virtual machine quantity divided by the office
The quotient and the remainder that location quantity obtains determine the first virtual machine quantity to be allocated that each innings of location needs to distribute respectively " specific reality
Method flow as shown in Figure 2 is now provided, including:
1021, the quotient obtained according to the purpose virtual machine quantity divided by office location quantity determines each innings of location needs
The average virtual machine quantity to be allocated of the first of distribution.
Wherein, the described first average virtual machine quantity to be allocated is identical as the quotient.Similar to described in step 102 example
3 office locations in each at least divide 4 virtual machines, then numerical value 4 is the first average virtual machine quantity to be allocated of each innings of location.
1022, the remainder obtained according to the purpose virtual machine quantity divided by office location quantity determines each innings of location
First additional virtual machine quantity to be allocated.
Wherein, the described first additional virtual machine quantity value range to be allocated is 0 to the remainder, and all first is additional
The sum of virtual machine quantity to be allocated is identical as the remainder.Similar to remainder described in step 102 example be 1 when, from 3 office locations
In randomly select one, and this innings of location is required to distribute 4+1=5 virtual machine, then at this point, the first volume of as this innings of location of remainder 1
Outer virtual machine quantity to be allocated, the additional virtual machine quantity to be allocated of the first of other innings of location are 0.If more than occurring in other cases
Number is 2 or more, then can require to choose multiple innings of locations and share remainder equally.The subsequent rack in office location and the machine frame in rack
Processing to virtual machine remainder, i.e., when how to distribute additional virtual machine quantity to be allocated, the void that needs to distribute with location of playing a game herein
The mode of quasi- machine remainder processing is consistent.
1023, the first of the first average virtual machine quantity to be allocated and each innings of location for needing to distribute by each innings of location is additional
The sum of virtual machine quantity to be allocated is determined as the first virtual machine quantity to be allocated that each innings of location needs to distribute.
In addition, the implementation method of step 103 and the implementation of step 102 are essentially identical, process is as shown in figure 3, packet
It includes:
1031, the quotient obtained according to the described first virtual machine quantity to be allocated divided by the rack quantity, determines each machine
The second average virtual machine quantity to be allocated that frame needs to distribute.
Wherein, the described second average virtual machine quantity to be allocated is identical as the quotient.
1032, the remainder obtained according to the described first virtual machine quantity to be allocated divided by the rack quantity determines each
The additional virtual machine quantity to be allocated of the second of rack.
Wherein, the described second additional virtual machine quantity value range to be allocated is 0 to the remainder, and all second is additional
The sum of virtual machine quantity to be allocated is identical as the remainder.
1033, the second of the second average virtual machine quantity to be allocated and each rack for needing to distribute by each rack is additional
The sum of virtual machine quantity to be allocated is determined as the second virtual machine quantity to be allocated that each rack needs to distribute.
In addition, the implementation method of step 104 and the implementation of step 102 are essentially identical, process is as shown in figure 4, packet
It includes:
1041, the quotient obtained according to the described second virtual machine quantity to be allocated divided by the machine frame quantity, determines each machine
Frame needs the third distributed to be averaged virtual machine quantity to be allocated.
Wherein, the third virtual machine quantity to be allocated that is averaged is identical as the quotient.
1042, the remainder obtained according to the described second virtual machine quantity to be allocated divided by the rack quantity determines each
The additional virtual machine quantity to be allocated of the third of machine frame.
Wherein, additionally virtual machine quantity value range to be allocated is 0 to the remainder to the third, and all thirds are additional
The sum of virtual machine quantity to be allocated is identical as the remainder.
1043, by each machine frame need the third distributed be averaged virtual machine quantity to be allocated and the third of each machine frame it is additional
The sum of virtual machine quantity to be allocated is determined as the third virtual machine quantity to be allocated that each machine frame needs to distribute.
In order to guarantee that virtual machine can be dispersedly distributed on each host as far as possible, therefore the part in the case of mean allocation
Under office location and the insufficient situation of rack host, the virtual machine undertaken to each innings of location and rack is also needed to be adjusted, in this this hair
Also directed to step 106, " distribution on the host of one or more second machine frames not yet divides bright embodiment on the first machine frame
The specific implementation of the virtual machine matched " provides method flow as shown in Figure 5, including:
1061, search whether that there are the second machine frames in the first rack where first machine frame.If it exists, then it executes
Step 1062;Otherwise other racks in the first game location where first rack are traversed, to determine described the
It whether there is the second machine frame in first game location where one rack.
Wherein, it should be noted that before searching the second machine frame, it is thus necessary to determine that there is currently the first machine frame quantity,
1061 can be directly executed if only existing one.It is multiple if it exists, then it is current to need to count all first machine frames in the first rack
Unappropriated virtual machine quantity, and in this, as the subsequent virtual machine quantity for needing mean allocation of the second machine frame that may be present.
Can certainly the second machine frame be searched several times based on each first machine frame currently unappropriated virtual machine quantity respectively.
But it should be added that, due to each machine frame situation inconsistent there may be processing speed, respectively
After virtual machine distribution progress in a machine frame has and first has, to carry out operation with guaranteeing each machine frame reasonably stability, when any one
When there is the virtual machine that can not be distributed in machine frame, require to wait other machine frames complete just to can be carried out after its inner part is matched it is subsequent heavy
New distribution.
1062, it determines on all second machine frames are current in first rack free host quantity and the first machine frame not yet
The size relation of the virtual machine quantity of distribution.If the current free host of all second machine frames is greater than or waits in first rack
In virtual machine quantity still unappropriated on the first machine frame, 1063 are thened follow the steps;It is no to then follow the steps 1064.
1063, it is still unappropriated on the first machine frame that one or more second machine frame distribution are chosen in first rack
Virtual machine.
The assigning process and the realization process of abovementioned steps 104 are more similar.The realization of abovementioned steps can directly be referred to
Process.
1064, virtual machine is distributed on all free hosts in first rack, and to where first rack
Other racks in first game location are traversed, and whether there is second in the first game location where first rack to determine
Machine frame.If it exists, 1065 are thened follow the steps.Otherwise the other innings of locations in addition to the first game location are traversed, and in the free time
Virtual machine is distributed on host, until all virtual machines be assigned or all innings of locations in without free host.
It should be noted that before this step is traversed, it is also desirable to which statistics is currently similar with the first rack equally to deposit
All unassigned virtual machine quantity in other racks that can not distribute virtual machine, this is needed before being similar to step 1061
The quantity of unallocated virtual machine in all first machine frames of statistics to be executed.Similar subsequent step may be related to time
When going through other innings of location, it is also desirable to do similar statistics.
In addition, before being traversed other racks to redistribute virtual machine, it is also desirable to each rack be waited to complete in it
Part just can be carried out subsequent redistribute after matching.
1065, it determines in other all second machine frames are current in the first game location free host quantity and the first rack
The size relation of still unappropriated virtual machine quantity.If the current free host of all second machine frames is greater than in the first game location
Or it is equal to the still unappropriated virtual machine quantity in the first rack, then follow the steps 1066.It is no to then follow the steps 1067.
1066, it is still unappropriated in the first rack that one or more second machine frame distribution are chosen in the first game location
Virtual machine.
1067, virtual machine is distributed on all free hosts in the first game location, and in addition to the first game location
Other innings of locations are traversed, and virtual machine is distributed on free host, until all virtual machines be assigned or all innings of locations in
Without free host.
Wherein, process and attention condition and the abovementioned steps 1061 and 1064 executed required for before being traversed for office location
It describes similar.
It should be noted that in the method for salary distribution of machine frame inside, i.e. abovementioned steps 1061 to 1063 are referred to step
104 to 106 realization principle is completed for unappropriated virtual machine primary again again on the basis of having distributed virtual machine
Mean allocation.The method of salary distribution inside office location, i.e. abovementioned steps 1064 to 1067 are referred to the realization of step 103 to 106
Principle completes a mean allocation for unappropriated virtual machine again again on the basis of having distributed virtual machine.
It should be noted that the free host mentioned in embodiments of the present invention be not indicate the host do not handle it is any
Business, but for virtual machine operation, there is sufficient system resource.
Further, in order to effectively identify the operating status and resource service condition of current host, to be virtual machine
Better host is distributed to guarantee the reliability of virtual machine.When the host number in each machine frame is all larger than itself corresponding third
When virtual machine quantity to be allocated, it can be understood as when host resource is more rich, for the optimum selecting host in machine frame
When carrying out virtual machine distribution, it to be host number of the step 105 in each machine frame that the embodiment of the invention provides a solution
Amount is all larger than a kind of specific implementation of itself the corresponding third virtual machine quantity to be allocated under the conditions of this, as shown in fig. 6,
Including:
1051, according to host CPU utilization rate Pc, memory usage Pm, the bandwidth utilization rate Pb in machine frame, according to formula U
=10Pc+10Pm+10Pb, calculate each host has used index U.
1052, it according to having used index U to sort from low to high, successively chooses identical with third virtual machine quantity to be allocated
Host, and distribute a virtual machine respectively on the host chosen.
It is using the advantage that the formula chooses host:If the CPU usage of host A is 0.5, memory usage is
0.6, bandwidth utilization rate is 0.5, and total utilization rate summation is 1.6;The CPU usage of host B is 0.9, memory usage is
0.2, bandwidth utilization rate is 0.5, and total utilization rate summation is also 1.6.In this case, select A obviously more suitable, because of host B
CPU using very high.If the embodiment of the present invention uses formula U=10Pc+10Pm+10PbA can be screened.Such as
Being computed the corresponding U value of A is the U value that the U value that the corresponding U value of 10.3, B is 12.69, A is less than B, so A should be selected.
In addition, the availability in order to guarantee business in service operation, needs to be directed to example in time and hangs dead or virtual machine
Operating-system resources deficiency is handled, and the operating status of Application Instance and virtual is at this moment just needed to monitor in each virtual machine
The operating status of machine.The embodiment of the present invention is based on this purpose, additionally provides example as shown in Figure 7 and hangs dead monitoring method, including:
201, in each detection cycle, the operating parameter of each running example is obtained, the operating parameter includes that CPU makes
With rate, memory usage, bandwidth utilization rate, I/O read volume, I/O writing.
202, when whole is not identical for operating parameter and the operating parameter in previous detection cycle in the current detection period,
Then by nonce counter ψnIt is set as 0.
203, when the operating parameter in the operating parameter and previous detection cycle in the current detection period is all identical, then
Nonce counter is increased into preset value, such as ψn=ψn-1+1。
204, as the accumulated value ψ in nonce counternWhen more than hanging dead threshold value, then weight is carried out to corresponding running example
It opens.
It should be noted that if accumulated value ψnMore than dead threshold value is hung, if then illustrating, virtual machine running example has had
Then think that virtual machine running example is hung extremely at this time using not being any change above in resource in dry detection cycle, need to restart reality
Example.
It is super to additionally provide VME operating system resource as shown in Figure 8 in order to realize foregoing purpose for the embodiment of the present invention
Load uses monitoring method, including:
301, in each detection cycle, the operating parameter of each virtual machine is obtained, the operating parameter includes that CPU is used
Rate, memory usage, bandwidth utilization rate.
302, when the CPU usage in the current detection period is more than count threshold K, by current CPU usage counter
ΦnIncrease preset value, such as Φn=Φn-1+1;It, will when the CPU usage in the current detection period is less than count threshold Κ
Current CPU usage counter ΦnIt is set as 0.
303, when the memory usage in the current detection period is more than count threshold Κ, current memory utilization rate is counted
Device WnIncrease preset value, such as Wn=Wn-1+1;It, will when the memory usage in the current detection period is less than count threshold Κ
Current memory utilization rate counter WnIt is set as 0.
304, when the bandwidth utilization rate in the current detection period is more than count threshold Κ, current bandwidth utilization rate is counted
Device ΗnIncrease preset value, such as Ηn=Ηn-1+1;When the bandwidth utilization rate in the current detection period is less than count threshold,
By current bandwidth utilization rate counter ΗnIt is set as 0.
305, when the CPU usage counter reaches dilatation threshold value, dilatation is carried out to the CPU of respective virtual machine.
306, when memory usage counter reaches dilatation threshold value, dilatation is carried out to the memory of respective virtual machine.
307, when bandwidth utilization rate counter reaches dilatation threshold value, dilatation is carried out to the bandwidth of respective virtual machine.
If Φ n, Wn, Η n any one value reach dilatation threshold value, illustrate that virtual machine there are several detection cycles
Overrate in inherent CPU usage, memory usage or bandwidth utilization rate, virtual machine system resource has been not enough at this time
It supports running example to continue to operate normally, needs to carry out dilatation to the CPU, memory or bandwidth of virtual machine.
The embodiment of the invention also provides a kind of virtual machine assigned units, as shown in figure 9, including:
First acquisition unit 31, for obtaining office's location quantity of data center, rack quantity, each rack of each innings of location
Machine frame quantity, each machine frame host number and purpose virtual machine quantity.
First determination unit 32, quotient for being obtained according to the purpose virtual machine quantity divided by office location quantity and remaining
Number determines the first virtual machine quantity to be allocated that each innings of location needs to distribute respectively.
Second determination unit 33 is used in each innings of location, according to the described first virtual machine quantity to be allocated divided by described
The quotient and the remainder that rack quantity obtains determine the second virtual machine quantity to be allocated that each rack needs to distribute respectively.
Third determination unit 34 is used in each rack, according to the described second virtual machine quantity to be allocated divided by described
The quotient and the remainder that machine frame quantity obtains determine the third virtual machine quantity to be allocated that each machine frame needs to distribute respectively.
Allocation unit 35, in each machine frame, when the host number in each machine frame is all larger than or to be equal to itself right
When the third answered virtual machine quantity to be allocated, a void is distributed respectively on host identical with third virtual machine quantity to be allocated
Quasi- machine;When the third corresponding less than itself of the host number in the first machine frame virtual machine quantity to be allocated, then described first
Virtual machine identical with host number in the first machine frame is distributed on machine frame, and is distributed on the host of one or more second machine frames
The still unappropriated virtual machine on the first machine frame;Wherein, there are free hosts in second machine frame.
Optionally, as shown in Figure 10, first determination unit 32 includes:
First determining module 321, the quotient for being obtained according to the purpose virtual machine quantity divided by office location quantity, really
The first average virtual machine quantity to be allocated that fixed each innings of location needs to distribute;Wherein, the described first average virtual machine number to be allocated
It measures identical as the quotient.
Second determining module 322, the remainder for being obtained according to the purpose virtual machine quantity divided by office location quantity,
Determine the first additional virtual machine quantity to be allocated of each innings of location;Wherein, the described first additional virtual machine quantity value to be allocated
Range is 0 to the remainder, and the sum of all first additional virtual machine quantity to be allocated are identical as the remainder.
Third determining module 323, the first average virtual machine quantity to be allocated for needing to distribute each innings of location and every
The sum of additional virtual machine quantity to be allocated of the first of a innings of location is determined as the first virtual machine to be allocated that each innings of location needs to distribute
Quantity.
And as shown in figure 11, second determination unit 33 includes:
4th determining module 331, for being obtained according to the described first virtual machine quantity to be allocated divided by the rack quantity
Quotient, determine each rack needs to distribute second average virtual machine quantity to be allocated;Wherein, the described second average void to be allocated
Quasi- machine quantity is identical as the quotient.
5th determining module 332, for being obtained according to the described first virtual machine quantity to be allocated divided by the rack quantity
Remainder, determine the second additional virtual machine quantity to be allocated of each rack;Wherein, the described second additional virtual machine number to be allocated
Measuring value range is 0 to the remainder, and the sum of all second additional virtual machine quantity to be allocated are identical as the remainder.
6th determining module 333, the second average virtual machine quantity to be allocated for needing to distribute each rack and every
The sum of additional virtual machine quantity to be allocated of the second of a rack is determined as the second virtual machine to be allocated that each rack needs to distribute
Quantity.
And as shown in figure 12, the third determination unit 34 includes:
7th determining module 341, for being obtained according to the described second virtual machine quantity to be allocated divided by the machine frame quantity
Quotient, determine that each machine frame needs the third distributed to be averaged virtual machine quantity to be allocated;Wherein, the third is averaged void to be allocated
Quasi- machine quantity is identical as the quotient.
8th determining module 342, for being obtained according to the described second virtual machine quantity to be allocated divided by the machine frame quantity
Remainder, determine the third of each machine frame additionally virtual machine quantity to be allocated;Wherein, the additional virtual machine number to be allocated of the third
Measuring value range is 0 to the remainder, and additionally the sum of virtual machine quantity to be allocated is identical as the remainder for all thirds.
9th determining module 343, for by each machine frame need the third distributed be averaged virtual machine quantity to be allocated with often
Additional the sum of the virtual machine quantity to be allocated of the third of a machine frame is determined as the third virtual machine to be allocated that each machine frame needs to distribute
Quantity.
Optionally, as shown in figure 13, the allocation unit 35 includes:
Searching module 351, for searching whether that there are the second machine frames in the first rack where first machine frame.
Tenth determining module 352, for, there are when the second machine frame, being determined in the first rack where first machine frame
The current free host quantity of all second machine frames and still unappropriated virtual machine quantity in the first rack in first rack
Size relation.
First distribution module 353, if the free host current for all second machine frames in first rack be greater than or
Equal to virtual machine quantity still unappropriated in the first rack, then one or more second machine frames are chosen in first rack
Distribution still unappropriated virtual machine on the first machine frame;If the current free host of all second machine frames is small in first rack
In virtual machine quantity still unappropriated in the first rack, then distributed on all free hosts in first rack virtual
Machine, the allocation result of other racks of office location where waiting this rack, to its in the first game location where first rack
Its rack is traversed, and whether there is the second machine frame in the first game location where first rack to determine.
11st determining module 354, the free time for determining that other all second machine frames are current in the first game location are main
The size relation of still unappropriated virtual machine quantity in machine quantity and first game location.
Second distribution module 355, if the free host current for all second machine frames in the first game location be greater than or
Equal to virtual machine quantity still unappropriated on first game location, then one or more second machine frames are chosen in the first game location
Distribution still unappropriated virtual machine on first game location;If the current free host of all second machine frames is small in the first game location
In virtual machine quantity still unappropriated on first game location, then distributed on all free hosts in the first game location virtual
Machine waits the allocation result of other innings of location of this data center, and traverses to other innings of locations, and void is distributed on free host
Quasi- machine, until all virtual machines be assigned or all innings of locations in without free host.
Optionally, when the host number of each machine frame is all larger than itself corresponding third virtual machine quantity to be allocated,
The allocation unit 35 is specifically used for according to the host CPU utilization rate Pc in each machine frame, memory usage Pm, bandwidth utilization rate
Pb, according to formula U=10Pc+10Pm+10Pb, calculate each host has used index U;According to having used index U to arrange from low to high
Sequence successively chooses host identical with third virtual machine quantity to be allocated, and distributes a void respectively on the host chosen
Quasi- machine.
Optionally, as shown in figure 14, further include:
Second acquisition unit 36, for obtaining the operating parameter of each running example, the fortune in each detection cycle
Row parameter includes CPU usage, memory usage, bandwidth utilization rate, I/O read volume, I/O writing.
First setting unit 37, for joining when the operation in the operating parameter and previous detection cycle in the current detection period
When number is not all identical, then 0 is set by nonce counter;When the operating parameter and previous detection cycle in the current detection period
When interior operating parameter is all identical, then nonce counter is increased into preset value.
Unit 38 is restarted, for when the accumulated value in nonce counter is more than to hang dead threshold value, then running in fact to corresponding
Example is restarted.
Optionally, as shown in figure 15, further include:
Third acquiring unit 39, for obtaining the operating parameter of each virtual machine, the operation in each detection cycle
Parameter includes CPU usage, memory usage, bandwidth utilization rate.
Second setting unit 40, for when the CPU usage in the current detection period be more than count threshold when, will be current
CPU usage counter increases preset value;It, will be current when the CPU usage in the current detection period is less than count threshold
CPU usage counter is set as 0;When the memory usage in the current detection period is more than count threshold, by current memory
Utilization rate counter increases preset value;It, will be current interior when the memory usage in the current detection period is less than count threshold
It deposits utilization rate counter and is set as 0;When the bandwidth utilization rate in the current detection period is more than count threshold, current bandwidth is made
Increase preset value with rate counter;When the bandwidth utilization rate in the current detection period is less than count threshold, by current bandwidth
Utilization rate counter is set as 0.
Dilatation unit 41, for when the CPU usage counter reaches dilatation threshold value, to the CPU of respective virtual machine
Carry out dilatation;Or when memory usage counter reaches dilatation threshold value, dilatation is carried out to the memory of respective virtual machine;Or
Person carries out dilatation to the bandwidth of respective virtual machine when bandwidth utilization rate counter reaches dilatation threshold value.
The distributor of virtual machine provided herein of the embodiment of the present invention, by requiring virtual machine to be dispersedly assigned to as far as possible
On each host, while Intrusion Detection based on host resource service condition being answered to select used host, to realize the automation of virtual machine
Distribution, also improves the reliability of virtual machine.
Through the above description of the embodiments, it is apparent to those skilled in the art that the present invention can borrow
Help software that the mode of required common hardware is added to realize, naturally it is also possible to which the former is more preferably by hardware, but in many cases
Embodiment.Based on this understanding, the portion that technical solution of the present invention substantially in other words contributes to the prior art
Dividing can be embodied in the form of software products, which stores in a readable storage medium, such as count
The floppy disk of calculation machine, hard disk or CD etc., including some instructions are used so that computer equipment (it can be personal computer,
Server or the network equipment etc.) execute method described in each embodiment of the present invention.
The above description is merely a specific embodiment, but scope of protection of the present invention is not limited thereto, any
Those familiar with the art in the technical scope disclosed by the present invention, can easily think of the change or the replacement, and should all contain
Lid is within protection scope of the present invention.Therefore, protection scope of the present invention should be based on the protection scope of the described claims.
Claims (10)
1. a kind of method of virtual machine distribution, which is characterized in that including:
Obtain office's location quantity of data center, the rack quantity of each innings of location, the machine frame quantity of each rack, each machine frame master
Machine quantity and purpose virtual machine quantity;
According to the quotient and the remainder that the purpose virtual machine quantity is obtained divided by office location quantity, each innings of location needs are determined respectively
First virtual machine quantity to be allocated of distribution;
In each innings of location, according to the quotient and the remainder that the described first virtual machine quantity to be allocated is obtained divided by the rack quantity,
The second virtual machine quantity to be allocated that each rack needs to distribute is determined respectively;
In each rack, according to the quotient and the remainder that the described second virtual machine quantity to be allocated is obtained divided by the machine frame quantity,
The third virtual machine quantity to be allocated that each machine frame needs to distribute is determined respectively;
In each machine frame, when the host number in each machine frame is all larger than or is equal to itself corresponding third virtual machine to be allocated
When quantity, a virtual machine is distributed respectively on host identical with third virtual machine quantity to be allocated;
When the third corresponding less than itself of the host number in the first machine frame virtual machine quantity to be allocated, then in first machine
Virtual machine identical with host number in the first machine frame is distributed on frame, and distribution exists on the host of one or more second machine frames
Still unappropriated virtual machine on first machine frame;Wherein, there are free hosts in second machine frame;
The quotient and the remainder obtained according to the purpose virtual machine quantity divided by office location quantity, determine each innings of location respectively
The virtual machine quantity to be allocated of need to distribute first includes:
According to the quotient that the purpose virtual machine quantity is obtained divided by office location quantity, each innings of location needs to distribute first is determined
Average virtual machine quantity to be allocated;Wherein, the described first average virtual machine quantity to be allocated is identical as the quotient;
According to the remainder that the purpose virtual machine quantity is obtained divided by office location quantity, determine the first of each innings of location additionally to
Distribute virtual machine quantity;Wherein, the described first additional virtual machine quantity value range to be allocated is 0 to the remainder, and is owned
The sum of first additional virtual machine quantity to be allocated is identical as the remainder;
First additional void to be allocated of the first average virtual machine quantity to be allocated and each innings of location that each innings of location is needed to distribute
The sum of quasi- machine quantity is determined as the first virtual machine quantity to be allocated that each innings of location needs to distribute;
And the quotient and the remainder obtained according to the described first virtual machine quantity to be allocated divided by the rack quantity, respectively
Determine that each rack needs the second virtual machine quantity to be allocated distributed to include:
According to the quotient that the described first virtual machine quantity to be allocated is obtained divided by the rack quantity, determine that each rack needs to distribute
The second average virtual machine quantity to be allocated;Wherein, the described second average virtual machine quantity to be allocated is identical as the quotient;
According to the remainder that the described first virtual machine quantity to be allocated is obtained divided by the rack quantity, the second of each rack is determined
Additional virtual machine quantity to be allocated;Wherein, the described second additional virtual machine quantity value range to be allocated arrives the remainder for 0,
And all second the sum of additional virtual machine quantity to be allocated it is identical as the remainder;
Second additional void to be allocated of the second average virtual machine quantity to be allocated and each rack that each rack is needed to distribute
The sum of quasi- machine quantity is determined as the second virtual machine quantity to be allocated that each rack needs to distribute;
And in each rack, the quotient that is obtained according to the described second virtual machine quantity to be allocated divided by the machine frame quantity and
Remainder, the third virtual machine quantity to be allocated for determining that each machine frame needs distribute respectively include:
According to the quotient that the described second virtual machine quantity to be allocated is obtained divided by the machine frame quantity, determine that each machine frame needs to distribute
Third be averaged virtual machine quantity to be allocated;Wherein, the third virtual machine quantity to be allocated that is averaged is identical as the quotient;
According to the remainder that the described second virtual machine quantity to be allocated is obtained divided by the machine frame quantity, the third of each machine frame is determined
Additional virtual machine quantity to be allocated;Wherein, additionally virtual machine quantity value range to be allocated is 0 to the remainder to the third,
And additionally the sum of virtual machine quantity to be allocated is identical as the remainder for all thirds;
The third distributed is needed be averaged the additional void to be allocated of third of virtual machine quantity to be allocated and each machine frame each machine frame
The sum of quasi- machine quantity is determined as the third virtual machine quantity to be allocated that each machine frame needs to distribute.
2. the method according to claim 1, wherein described distribute on the host of one or more second machine frames
Still unappropriated virtual machine includes on the first machine frame:
Search whether that there are the second machine frames in the first rack where first machine frame;
If it exists, it is determined that in first rack on the current free host quantity of all second machine frames and the first machine frame not yet
The size relation of the virtual machine quantity of distribution;
If the current free host of all second machine frames is greater than or equal to and not yet distributes on the first machine frame in first rack
Virtual machine quantity, then choose one or more second machine frames distribution in first rack and not yet distributed on the first machine frame
Virtual machine;
If the current free host of all second machine frames is less than on the first machine frame still unappropriated virtual in first rack
Machine quantity then distributes virtual machine in first rack on all free hosts, and to first where first rack
Other racks in office location are traversed, and whether there is the second machine in the first game location where first rack to determine
Frame;
If it exists, it is determined that in the first game location in the current free host quantity of other all second machine frames and the first rack
The size relation of still unappropriated virtual machine quantity;
If the current free host of all second machine frames is greater than or equal to and not yet distributes in the first rack in the first game location
Virtual machine quantity, then choose one or more second machine frames distribution in the first game location and not yet distributed in the first rack
Virtual machine;
If the current free host of all second machine frames is less than in the first rack still unappropriated virtual in the first game location
Machine quantity then distributes virtual machine in the first game location on all free hosts, and to other in addition to the first game location
Office location is traversed, and virtual machine is distributed on free host, until all virtual machines be assigned or all innings of locations in equal nothing
Free host.
3. according to claim 1 to method described in 2 any one, which is characterized in that when the host number in each machine frame is equal
It is described on host identical with third virtual machine quantity to be allocated when corresponding greater than itself third virtual machine quantity to be allocated
Distributing a virtual machine respectively includes:
According to host CPU utilization rate Pc, memory usage Pm, the bandwidth utilization rate Pb in each machine frame, according to formula U=10Pc+
10Pm+10Pb, calculate each host has used index U;
According to having used index U to sort from low to high, identical with third virtual machine quantity to be allocated host is successively chosen, and
A virtual machine is distributed on the host chosen respectively.
4. according to the method described in claim 3, it is characterized in that, further including:
In each detection cycle, the operating parameter of each running example is obtained, the operating parameter includes CPU usage, interior
Deposit utilization rate, bandwidth utilization rate, I/O read volume, I/O writing;
It, then will be current when whole is not identical for operating parameter and the operating parameter in previous detection cycle in the current detection period
Operating parameter counter is set as 0;
When the operating parameter in the operating parameter and previous detection cycle in the current detection period is all identical, then will currently transport
Row parameter counters increase preset value;
When the accumulated value in current operating parameter counter is more than to hang dead threshold value, then corresponding running example is restarted.
5. according to the method described in claim 3, it is characterized in that, further including:
In each detection cycle, the operating parameter of each virtual machine is obtained, the operating parameter includes CPU usage, memory
Utilization rate, bandwidth utilization rate;
When the CPU usage in the current detection period is more than count threshold, current CPU usage counter is increased default
Value;When the CPU usage in the current detection period is less than count threshold, 0 is set by current CPU usage counter;
When the memory usage in the current detection period is more than count threshold, current memory utilization rate counter is increased default
Value;When the memory usage in the current detection period is less than count threshold, set current memory utilization rate counter to
0;
When the bandwidth utilization rate in the current detection period is more than count threshold, current bandwidth utilization rate counter is increased default
Value;When the bandwidth utilization rate in the current detection period is less than count threshold, set current bandwidth utilization rate counter to
0;
When the CPU usage counter reaches dilatation threshold value, dilatation is carried out to the CPU of respective virtual machine;Or work as memory
When utilization rate counter reaches dilatation threshold value, dilatation is carried out to the memory of respective virtual machine;Alternatively, working as bandwidth utilization rate counter
When reaching dilatation threshold value, dilatation is carried out to the bandwidth of respective virtual machine.
6. a kind of virtual machine assigned unit, which is characterized in that including:
First acquisition unit, for obtaining the machine frame of office's location quantity of data center, the rack quantity of each innings of location, each rack
Quantity, the host number of each machine frame and purpose virtual machine quantity;
First determination unit, the quotient and the remainder for being obtained according to the purpose virtual machine quantity divided by office location quantity, point
The first virtual machine quantity to be allocated that each innings of location needs to distribute is not determined;
Second determination unit is used in each innings of location, according to the described first virtual machine quantity to be allocated divided by the rack number
The quotient and the remainder measured determine the second virtual machine quantity to be allocated that each rack needs to distribute respectively;
Third determination unit is used in each rack, according to the described second virtual machine quantity to be allocated divided by the machine frame number
The quotient and the remainder measured determine the third virtual machine quantity to be allocated that each machine frame needs to distribute respectively;
Allocation unit, in each machine frame, when the host number in each machine frame be all larger than or be equal to itself corresponding the
When three virtual machine quantity to be allocated, a virtual machine is distributed respectively on host identical with third virtual machine quantity to be allocated;
When the third corresponding less than itself of the host number in the first machine frame virtual machine quantity to be allocated, then on first machine frame
Virtual machine identical with host number in the first machine frame is distributed, and is distributed on the host of one or more second machine frames first
Still unappropriated virtual machine on machine frame;Wherein, there are free hosts in second machine frame;
First determination unit includes:
First determining module, the quotient for being obtained according to the purpose virtual machine quantity divided by office location quantity determine each
The first average virtual machine quantity to be allocated that office location needs to distribute;Wherein, the described first average virtual machine quantity to be allocated and institute
It is identical to state quotient;
Second determining module, the remainder for being obtained according to the purpose virtual machine quantity divided by office location quantity determine every
The additional virtual machine quantity to be allocated of the first of a innings of location;Wherein, the described first additional virtual machine quantity value range to be allocated is 0
To the remainder, and the sum of all first additional virtual machine quantity to be allocated are identical as the remainder;
Third determining module, the first average virtual machine quantity to be allocated for needing to distribute each innings of location and each innings of location
The sum of first additional virtual machine quantity to be allocated is determined as the first virtual machine quantity to be allocated that each innings of location needs to distribute;
And second determination unit includes:
4th determining module, the quotient for being obtained according to the described first virtual machine quantity to be allocated divided by the rack quantity, really
The second average virtual machine quantity to be allocated that fixed each rack needs to distribute;Wherein, the described second average virtual machine number to be allocated
It measures identical as the quotient;
5th determining module, the remainder for being obtained according to the described first virtual machine quantity to be allocated divided by the rack quantity,
Determine the second additional virtual machine quantity to be allocated of each rack;Wherein, the described second additional virtual machine quantity value to be allocated
Range is 0 to the remainder, and the sum of all second additional virtual machine quantity to be allocated are identical as the remainder;
6th determining module, the second average virtual machine quantity to be allocated and each rack for needing to distribute each rack
The sum of second additional virtual machine quantity to be allocated is determined as the second virtual machine quantity to be allocated that each rack needs to distribute;
And the third determination unit includes:
7th determining module, the quotient for being obtained according to the described second virtual machine quantity to be allocated divided by the machine frame quantity, really
Fixed each machine frame needs the third distributed to be averaged virtual machine quantity to be allocated;Wherein, the third is averaged virtual machine number to be allocated
It measures identical as the quotient;
8th determining module, the remainder for being obtained according to the described second virtual machine quantity to be allocated divided by the machine frame quantity,
Determine the third of each machine frame additionally virtual machine quantity to be allocated;Wherein, the additional virtual machine quantity value to be allocated of the third
Range is 0 to the remainder, and additionally the sum of virtual machine quantity to be allocated is identical as the remainder for all thirds;
9th determining module, for needing the third distributed be averaged virtual machine quantity to be allocated and each machine frame each machine frame
Additional the sum of the virtual machine quantity to be allocated of third is determined as the third virtual machine quantity to be allocated that each machine frame needs to distribute.
7. device according to claim 6, which is characterized in that the allocation unit includes:
Searching module, for searching whether that there are the second machine frames in the first rack where first machine frame;
Tenth determining module, for there are when the second machine frame, determine described in the first rack where first machine frame
The size of the current free host quantity of all second machine frames and still unappropriated virtual machine quantity on the first machine frame in one rack
Relationship;
First distribution module, if the free host current for all second machine frames in first rack is greater than or equal to the
Still unappropriated virtual machine quantity on one machine frame then chooses one or more second machine frames distribution the in first rack
Still unappropriated virtual machine on one machine frame;If the current free host of all second machine frames is less than first in first rack
Still unappropriated virtual machine quantity, then distribute virtual machine, and to institute in first rack on machine frame on all free hosts
The other racks stated in the first game location where the first rack are traversed, to determine in the first game where first rack
It whether there is the second machine frame in location;
11st determining module, for determine other all second machine frames are current in the first game location free host quantity with
The size relation of still unappropriated virtual machine quantity in first rack;
Second distribution module, if the free host current for all second machine frames in the first game location is greater than or equal to the
Still unappropriated virtual machine quantity in one rack then chooses one or more second machine frames distribution the in the first game location
Still unappropriated virtual machine in one rack;If the current free host of all second machine frames is less than first in the first game location
Still unappropriated virtual machine quantity in rack, then distribute virtual machine in the first game location on all free hosts, and to removing
Other innings of locations outside the first game location are traversed, and virtual machine is distributed on free host, until all virtual machines are divided
With in complete or all innings of location without free host.
8. according to device described in claim 6 to 7 any one, which is characterized in that when the host number in each machine frame is equal
When the second virtual machine quantity to be allocated corresponding greater than itself, the allocation unit is specifically used for according to the host in each machine frame
CPU usage Pc, memory usage Pm, bandwidth utilization rate Pb, according to formula U=10Pc+10Pm+10Pb, calculated each host
Use index U;According to having used index U to sort from low to high, master identical with the second virtual machine quantity to be allocated is successively chosen
Machine, and distribute a virtual machine respectively on the host chosen.
9. device according to claim 8, which is characterized in that further include:
Second acquisition unit, for obtaining the operating parameter of each running example, the operating parameter in each detection cycle
Including CPU usage, memory usage, bandwidth utilization rate, I/O read volume, I/O writing;
First setting unit is not complete for working as the operating parameter in the current detection period and the operating parameter in previous detection cycle
When portion is identical, then 0 is set by current operating parameter counter;When in the current detection period operating parameter and previous detection it is all
When operating parameter in phase is all identical, then current operating parameter counter is increased into preset value;
Unit is restarted, for when the accumulated value in current operating parameter counter is more than to hang dead threshold value, then running to corresponding
Example is restarted.
10. device according to claim 8, which is characterized in that further include:
Third acquiring unit, for obtaining the operating parameter of each virtual machine, the operating parameter packet in each detection cycle
Include CPU usage, memory usage, bandwidth utilization rate;
Second setting unit, for when the CPU usage in the current detection period is more than count threshold, current CPU to be used
Rate counter increases preset value;When the CPU usage in the current detection period is less than count threshold, current CPU is used
Rate counter is set as 0;When the memory usage in the current detection period is more than count threshold, by current memory utilization rate meter
Number device increases preset value;When the memory usage in the current detection period is less than count threshold, by current memory utilization rate
Counter is set as 0;When the bandwidth utilization rate in the current detection period is more than count threshold, current bandwidth utilization rate is counted
Device increases preset value;When the bandwidth utilization rate in the current detection period is less than count threshold, by current bandwidth utilization rate meter
Number device is set as 0;
Dilatation unit, for expanding the CPU of respective virtual machine when the CPU usage counter reaches dilatation threshold value
Hold;Or when memory usage counter reaches dilatation threshold value, dilatation is carried out to the memory of respective virtual machine;Alternatively, working as band
When wide utilization rate counter reaches dilatation threshold value, dilatation is carried out to the bandwidth of respective virtual machine.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510882455.5A CN105404545B (en) | 2015-12-03 | 2015-12-03 | The method and device of virtual machine distribution |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510882455.5A CN105404545B (en) | 2015-12-03 | 2015-12-03 | The method and device of virtual machine distribution |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105404545A CN105404545A (en) | 2016-03-16 |
CN105404545B true CN105404545B (en) | 2018-11-30 |
Family
ID=55470045
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510882455.5A Active CN105404545B (en) | 2015-12-03 | 2015-12-03 | The method and device of virtual machine distribution |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105404545B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110287025A (en) * | 2019-06-19 | 2019-09-27 | 深圳前海微众银行股份有限公司 | A kind of resource allocation methods, device and equipment |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103533068A (en) * | 2013-10-22 | 2014-01-22 | 黎亮 | Independent and balanced task distribution cluster system based on IP |
CN103617076A (en) * | 2013-10-31 | 2014-03-05 | 中兴通讯股份有限公司 | Method and system for dispatching virtualized resources and server |
CN104572302A (en) * | 2015-01-04 | 2015-04-29 | 中国联合网络通信集团有限公司 | Method and device for distributing resources |
CN104714851A (en) * | 2015-03-30 | 2015-06-17 | 中国联合网络通信集团有限公司 | Method and device for realizing resource distribution |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP5767480B2 (en) * | 2011-01-31 | 2015-08-19 | インターナショナル・ビジネス・マシーンズ・コーポレーションInternational Business Machines Corporation | Information processing apparatus, information processing system, arrangement configuration determining method, program, and recording medium |
EP3296871B1 (en) * | 2012-08-31 | 2019-01-09 | Huawei Technologies Co., Ltd. | Central processing unit resource allocation method and computing node |
-
2015
- 2015-12-03 CN CN201510882455.5A patent/CN105404545B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103533068A (en) * | 2013-10-22 | 2014-01-22 | 黎亮 | Independent and balanced task distribution cluster system based on IP |
CN103617076A (en) * | 2013-10-31 | 2014-03-05 | 中兴通讯股份有限公司 | Method and system for dispatching virtualized resources and server |
CN104572302A (en) * | 2015-01-04 | 2015-04-29 | 中国联合网络通信集团有限公司 | Method and device for distributing resources |
CN104714851A (en) * | 2015-03-30 | 2015-06-17 | 中国联合网络通信集团有限公司 | Method and device for realizing resource distribution |
Also Published As
Publication number | Publication date |
---|---|
CN105404545A (en) | 2016-03-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9727355B2 (en) | Virtual Hadoop manager | |
CN106502791B (en) | A kind of method for allocating tasks and device | |
US8046764B2 (en) | Redistribution of unused resources assigned to a first virtual computer having usage below a predetermined threshold to a second virtual computer | |
CN102971724B (en) | The method and apparatus relevant with the management based on modular virtual resource in data center environment | |
CN104102543B (en) | The method and apparatus of adjustment of load in a kind of cloud computing environment | |
CN105045871B (en) | Data aggregate querying method and device | |
JP6881575B2 (en) | Resource allocation systems, management equipment, methods and programs | |
JP2004252988A (en) | Section-to-section dynamic processor redistribution in computer system | |
TW201407476A (en) | System and method for allocating resource of virtual machine | |
Chen et al. | AAGA: Affinity-aware grouping for allocation of virtual machines | |
CN106095531B (en) | A kind of dispatching method of virtual machine loaded based on grade and physical machine in cloud platform | |
JP2016126677A (en) | Load calculation method, load calculation program and load calculation device | |
US20200394071A1 (en) | Systems and methods for cluster resource balancing in a hyper-converged infrastructure | |
WO2018157768A1 (en) | Method and device for scheduling running device, and running device | |
CN106445636A (en) | Dynamic resource scheduling algorithm under PAAS platform | |
CN113835823A (en) | Resource scheduling method and device, electronic equipment and computer readable storage medium | |
CN105404545B (en) | The method and device of virtual machine distribution | |
JP2011253334A (en) | Virtual machine and cpu allocation method | |
TW201327205A (en) | Managing method for hardware performance and cloud computing system | |
CN110196751A (en) | The partition method and device of mutual interference service, electronic equipment, storage medium | |
CN106201711B (en) | A kind of task processing method and server | |
CN117369941A (en) | Pod scheduling method and system | |
CN109960565B (en) | Cloud platform, and virtual machine scheduling method and device based on cloud platform | |
CN110046040B (en) | Distributed task processing method and system and storage medium | |
Reynolds et al. | Provisioning norm: An asymmetric quality measure for saas resource allocation |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |