CN106155782A - Virtual machine migration method and device - Google Patents
Virtual machine migration method and device Download PDFInfo
- Publication number
- CN106155782A CN106155782A CN201510165952.3A CN201510165952A CN106155782A CN 106155782 A CN106155782 A CN 106155782A CN 201510165952 A CN201510165952 A CN 201510165952A CN 106155782 A CN106155782 A CN 106155782A
- Authority
- CN
- China
- Prior art keywords
- physical server
- virtual machine
- model
- timeslice
- ratio
- 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.)
- Granted
Links
Abstract
The embodiment of the invention discloses a kind of virtual machine migration method and device, pre-set the timeslice when virtual machine of same virtual cpu core number runs on the physical server of different model and share ratio transformational relation, when carrying out virtual machine (vm) migration, share ratio transformational relation by above-mentioned timeslice and determine candidate physical type of server, and the second timeslice that virtual machine to be migrated is when running on the physical server of candidate physical server model shares ratio, it is then determined that purpose physical server, the model of purpose physical server belongs to described candidate physical server model, the CPU core calculation of purpose physical server is more than or equal to the virtual cpu core number of described virtual machine to be migrated;By in virtual machine (vm) migration to be migrated to purpose physical server, and ratio of the timeslice of virtual machine to be migrated being shared is adjusted to second timeslice corresponding with the model of purpose physical server and shares ratio, reduce the difference of Practical Calculation performance before and after virtual machine (vm) migration.
Description
Technical field
The present invention relates to field of computer technology, more particularly, it relates to a kind of virtual machine migration method and
Device.
Background technology
Intel Virtualization Technology is one of key technology of cloud computing.One physical server is virtualized into multiple stage
Logic virtual machine, is possible not only to be greatly promoted cloud computing environment and calculates the utilization ratio of resource and save energy consumption,
The dynamic migration of Intel Virtualization Technology offer simultaneously, scheduling of resource so that the load of cloud computing service obtains height
Effect management and extension, so that the service of cloud computing has more elasticity and motility.
Virtual machine (vm) migration refers to the resource distribution needing to adjust virtual machine between physical server, or,
When certain physical server needs repairing, virtual machine is moved to another from a physical server
The process of platform physical server.
But, owing to there may be performance difference between physical server, virtual machine is at different physical services
When migrating between device, the Practical Calculation performance before and after it migrates also can there are differences.This species diversity can be straight
Connect and have influence on the service application that user operates in virtual machine, it is impossible to ensure the grade of service of cloud computing service
Agreement (service level agreement, SLA).Therefore, the reality before and after virtual machine (vm) migration how is reduced
The difference of border calculated performance becomes problem demanding prompt solution.
Summary of the invention
It is an object of the invention to provide a kind of virtual machine migration method and device, before reducing virtual machine (vm) migration
After the difference of Practical Calculation performance.
For achieving the above object, the technical scheme is that
A kind of virtual machine migration method, including:
Obtain the virtual machine to be migrated very first time sheet on the physical server of source and share ratio;
Ratio is shared based on described very first time sheet, the model of source physical server, and preset same
The timeslice when virtual machine of virtual cpu core number runs on the physical server of different model shares ratio
Example transformational relation determines that candidate physical server model and virtual machine to be migrated are in candidate physical server-type
Number physical server on the second timeslice when running share ratio, wherein, described second timeslice is altogether
Ratio of enjoying is less than or equal to 1;
Determine that purpose physical server, the model of described purpose physical server belong to described candidate physical clothes
Business type number, the CPU core calculation of described purpose physical server is more than or equal to described virtual machine to be migrated
Virtual cpu core number;
By in described virtual machine (vm) migration to be migrated to described purpose physical server, and by described void to be migrated
Plan machine timeslice in described purpose physical server is shared ratio and is adjusted to and described purpose physical services
The second timeslice that the model of device is corresponding shares ratio.
Said method, it is preferred that the virtual machine of described same virtual cpu core number is at the thing of different model
Timeslice when running on reason server is shared ratio transformational relation and is included:
Virtual cpu core number is the virtual machine of m computational when running on the physical server of j model
Can be equivalent to described virtual cpu core number be the virtual machine of m on the physical server of i model with the time
Sheet shares ratio when being calculated performance during 1 operation, and described virtual cpu core number is that the virtual machine of m exists
Run required timeslice on the physical server of described j model sharing ratio is tij。
Said method, it is preferred that described share ratio, source physical server based on described very first time sheet
Model, and the virtual machine of preset same virtual cpu core number is at the physical server of different model
Timeslice during upper operation is shared ratio transformational relation and is determined candidate physical server model, and to be migrated
The second timeslice when virtual machine runs on the physical server of candidate physical server model shares ratio
Including:
If it is not 1 that described very first time sheet shares ratio, then according to the model of described source physical server, institute
State very first time sheet and share ratio, and the virtual machine of described preset same virtual cpu core number is not
Timeslice when running on the physical server of same model shares ratio transformational relation, determines that transition physics takes
Business type number;Wherein, described virtual machine to be migrated is at the physical services of described transition physical server model
With the physics of physical server that timeslice ratio is 1 use described transition physical server model on device
Calculated performance during CPU time slice, with described virtual machine to be migrated on the physical server of described source with institute
State very first time sheet and share computational when ratio uses the physical cpu timeslice of described source physical server
Can be identical;
According to described transition physical server model, and described preset same virtual cpu core number
Timeslice when virtual machine runs on the physical server of different model is shared ratio transformational relation and is determined time
Election server model, and virtual machine to be migrated transports on the physical server of candidate physical server model
The second timeslice during row shares ratio, and wherein, described second timeslice shares ratio less than or equal to 1.
Said method, it is preferred that the virtual machine being determined by described same virtual cpu core number exists
Timeslice when running on the physical server of different model shares ratio transformational relation, including:
With timeslice, virtual machine that virtual cpu core number is m is shared ratio respectively is 1 to operate in i type
Number physical server and j model physical server on;
On the physical server of described i model described virtual cpu core number be m virtual machine in run
Different types of live load, carries out test to the virtual machine that described virtual cpu core number is m and obtains institute
State the first calculated performance parameter Ci of the virtual machine that virtual cpu core number is m;
On the physical server of described j model described virtual cpu core number be m virtual machine in run
Described different types of live load, tests the virtual machine that described virtual cpu core number is m
The second calculated performance parameter Cj to the virtual machine that described virtual cpu core number is m;
If described Ci < Cj, then to the virtual machine physics in j model that described virtual cpu core number is m
The timeslice that can take the physical cpu in the physical server of described j model when running on server is shared
Ratio is adjusted, until the difference of Ci Yu Cj is in default scope, then and tijFor the difference of Ci and Cj in advance
If time in the range of, described virtual cpu core number is that the virtual machine of m is on the physical server of j model
The timeslice that can take the physical cpu in the physical server of described j model during operation shares ratio;
If Ci > Cj, then by the virtual machine physical services in i model that described virtual cpu core number is m
The timeslice that can take the physical cpu in the physical server of described i model when running on device shares ratio
It is adjusted, until the difference of Ci Yu Cj is in default scope, then tijFor the difference of Ci and Cj default
In the range of time, described virtual cpu core number is that the virtual machine of m runs on the physical server of i model
Time can take the timeslice of the physical cpu in the physical server of described i model and share the inverse of ratio;
If Ci=Cj, then tij=1.
Said method, it is preferred that determined that by calculating the virtual machine of described same virtual cpu core number exists
Timeslice when running on the physical server of different model shares ratio transformational relation, including:
Calculating described virtual cpu core number is that the virtual machine of m is when running on the physical server of i model
The first calculated performance parameter Ci;
Calculating described virtual cpu core number is that the virtual machine of m is when running on the physical server of j model
The second calculated performance parameter Cj;
Wherein, tij=Ci/Cj.
A kind of virtual machine (vm) migration device, described device includes:
Acquisition module, shares for obtaining the virtual machine to be migrated very first time sheet on the physical server of source
Ratio;
First determines module, for sharing ratio, the type of source physical server based on described very first time sheet
Number, and the virtual machine of preset same virtual cpu core number transports on the physical server of different model
Timeslice during row is shared ratio transformational relation and is determined candidate physical server model and virtual machine to be migrated
The second timeslice when running on the physical server of candidate physical server model shares ratio, wherein,
Described second timeslice shares ratio less than or equal to 1;
Second determines module, is used for determining purpose physical server, the model of described purpose physical server
Belong to described candidate physical server model, the CPU core calculation of described purpose physical server more than or etc.
Virtual cpu core number in described virtual machine to be migrated;
Transferring module, for by described virtual machine (vm) migration to be migrated to described purpose physical server, and
The described virtual machine to be migrated timeslice in described purpose physical server is shared ratio be adjusted to and institute
The second timeslice stating the model of purpose physical server corresponding shares ratio.
Said apparatus, it is preferred that the virtual machine of described same virtual cpu core number is at the thing of different model
Timeslice when running on reason server is shared ratio transformational relation and is included:
Virtual cpu core number is the virtual machine of m computational when running on the physical server of j model
Can be equivalent to described virtual cpu core number be the virtual machine of m on the physical server of i model with the time
Sheet shares ratio when being calculated performance during 1 operation, and described virtual cpu core number is that the virtual machine of m exists
Run required timeslice on the physical server of described j model sharing ratio is tij。
Said apparatus, it is preferred that described first determines that module includes:
First determines unit, if sharing ratio for described very first time sheet is not 1, then according to described source thing
The model of reason server, described very first time sheet shares ratio, and described preset same virtual cpu
The timeslice when virtual machine of core number runs on the physical server of different model shares ratio conversion pass
System, determines transition physical server model;Wherein, described virtual machine to be migrated takes at described transition physics
It is 1 use described transition physical server model with timeslice ratio on the physical server of business type number
Calculated performance during the physical cpu timeslice of physical server, with described virtual machine to be migrated in described source
Share ratio with described very first time sheet on physical server and use the physical cpu of described source physical server
Calculated performance during timeslice is identical;
Second determines unit, for according to described transition physical server model and described preset same
The timeslice when virtual machine of one virtual cpu core number runs on the physical server of different model is shared
Ratio transformational relation determines candidate server model, and virtual machine to be migrated is in candidate physical server-type
Number physical server on the second timeslice when running share ratio, wherein, described second timeslice is altogether
Ratio of enjoying is less than or equal to 1.
Said apparatus, it is preferred that described device also includes:
First transformational relation determines module, for being determined by described same virtual cpu core number
Timeslice when virtual machine runs on the physical server of different model shares ratio transformational relation, including:
First test cell, for sharing ratio when the virtual machine that virtual cpu core number is m with timeslice
Be on 1 physical server operating in i model described virtual cpu core number be m virtual machine in run
During different types of live load, the virtual machine that described virtual cpu core number is m is carried out test and obtains
Described virtual cpu core number is the first calculated performance parameter Ci of the virtual machine of m;
Second test cell, for sharing ratio when the virtual machine that virtual cpu core number is m with timeslice
Be on 1 physical server operating in j model described virtual cpu core number be m virtual machine in run
During described different types of live load, the virtual machine that described virtual cpu core number is m is tested
Obtain the second calculated performance parameter Cj of the virtual machine that described virtual cpu core number is m;
3rd determines unit, if for described Ci < Cj, is then the void of m to described virtual cpu core number
Plan machine can take the physics in the physical server of described j model when running on the physical server of j model
The timeslice of CPU is shared ratio and is adjusted, until the difference of Ci Yu Cj is in default scope, the most really
Determine tijDuring for the difference of Ci and Cj in default scope, described virtual cpu core number is the virtual machine of m
The physical server of j model can take when running the physical cpu in the physical server of described j model
Timeslice share ratio;
4th determines unit, if for Ci > Cj, is then the virtual machine of m by described virtual cpu core number
The physical server of i model can take when running the physical cpu in the physical server of described i model
Timeslice share ratio and be adjusted, until the difference of Ci Yu Cj is in default scope, it is determined that tij
During for the difference of Ci and Cj in default scope, described virtual cpu core number is that the virtual machine of m is at i
Physical cpu in the physical server of described ji model can be taken when running on the physical server of model
Timeslice shares the inverse of ratio;
5th determines unit, if for Ci=Cj, it is determined that tij=1.
Said apparatus, it is preferred that described device also includes:
Second transformational relation determines module, for determining described same virtual cpu core number by calculating
Timeslice when virtual machine runs on the physical server of different model shares ratio transformational relation, including:
First computing unit, is that the virtual machine of m is in i model for calculating described virtual cpu core number
The first calculated performance parameter Ci when running on physical server;
Second computing unit, is that the virtual machine of m is in j model for calculating described virtual cpu core number
The second calculated performance parameter Cj when running on physical server;
6th determines unit, is used for determining tij: tij=Ci/Cj.
By above scheme, a kind of virtual machine migration method of the application offer and device, pre-set same
The timeslice when virtual machine of one virtual cpu core number runs on the physical server of different model is shared
Ratio transformational relation, when carrying out virtual machine (vm) migration, shares ratio transformational relation by above-mentioned timeslice,
And the very first time sheet that virtual machine to be migrated is on the physical server of source shares ratio, determine candidate physical
Type of server, and virtual machine to be migrated runs on the physical server of candidate physical server model
Time the second timeslice share ratio, it is then determined that purpose physical server, the type of purpose physical server
Number belong to described candidate physical server model, the CPU core calculation of described purpose physical server more than or
Virtual cpu core number equal to described virtual machine to be migrated;By virtual machine (vm) migration to be migrated to purpose physics
In server, and ratio of the virtual machine to be migrated timeslice in described purpose physical server being shared is adjusted
Whole share ratio for the second timeslice corresponding with the model of described purpose physical server, reduce virtual
The difference of the Practical Calculation performance before and after machine migration.
Accompanying drawing explanation
In order to be illustrated more clearly that the embodiment of the present invention or technical scheme of the prior art, below will be to reality
Execute the required accompanying drawing used in example or description of the prior art to be briefly described, it should be apparent that below,
Accompanying drawing in description is only some embodiments of the present invention, for those of ordinary skill in the art,
On the premise of not paying creative work, it is also possible to obtain other accompanying drawing according to these accompanying drawings.
A kind of flowchart of the virtual machine migration method that Fig. 1 provides for the embodiment of the present application;
A kind of structural representation of the virtual machine (vm) migration device that Fig. 2 provides for the embodiment of the present application;
The first a kind of structural representation determining module that Fig. 3 provides for the embodiment of the present application;
Fig. 4 determines a kind of structural representation of module for the first transformational relation that the embodiment of the present application provides;
Fig. 5 determines a kind of structural representation of module for the second transformational relation that the embodiment of the present application provides.
Term " first " in specification and claims and above-mentioned accompanying drawing, " second ", " the 3rd "
(if present) such as " the 4 " is for distinguishing similar part, the most suitable without being used for describing
Sequence or precedence.Should be appreciated that the data of so use can be exchanged in the appropriate case, in order to here
The embodiments herein described can be implemented with the order in addition to here illustrating.
Detailed description of the invention
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out
Clearly and completely describe, it is clear that described embodiment is only a part of embodiment of the present invention, and
It is not all, of embodiment.Based on the embodiment in the present invention, those of ordinary skill in the art are not doing
Go out the every other embodiment obtained under creative work premise, broadly fall into the scope of protection of the invention.
The one referring to the virtual machine migration method that Fig. 1, Fig. 1 provide for the embodiment of the present application realizes flow process
Figure, may include that
Step S11: obtain the virtual machine to be migrated very first time sheet on the physical server of source and share ratio;
Creating in the physical server of virtual machine, a physical cpu both can process virtual cpu thread,
Other thread (non-virtual CPU line journey) can also be processed.Assume that a physical cpu processes one simultaneously
The virtual cpu thread thread1 of virtual machine and non-virtual CPU line journey thread2, the two thread
Time timesharing use physical cpu.If it is 1:1 (i.e. thread1 that the time of physical cpu is shared ratio by them
Timeslice to share ratio be 1), the dispatching cycle of thread is t, then thread1 uses the physics of t time
After CPU, then being used the physical cpu of t time by thread2, then thread1 re-uses the t time
Physical cpu, circulate like this;If the time of physical cpu is shared ratio by thread1 and thread2
For 1:2 (i.e. it is 1/2 that the timeslice of thread1 shares ratio), then thread1 uses the physics of t time
After CPU, thread2 can use the physical cpu of 2t time, and then thread1 uses the physics of t time
CPU, circulates like this.
For ease of narration, in the embodiment of the present invention, by virtual machine to be migrated on the physical server of source time
Between sheet share ratio and be designated as very first time sheet and share ratio.
Step S12: share ratio based on described very first time sheet, the model of source physical server, and in advance
The time when virtual machine of the same virtual cpu core number put runs on the physical server of different model
Sheet is shared ratio transformational relation and is determined that candidate physical server model and virtual machine to be migrated are in candidate physical
The second timeslice when running on the physical server of server model shares ratio, wherein, and described second
Timeslice shares ratio less than or equal to 1;
The computing capability of virtual machine depends on the number of virtual cpu and the performance of physical server, general feelings
Condition next one virtual cpu core correspond to a physical core or the hyperthread logic core of physical cpu.
In the embodiment of the present invention, pre-build that the virtual machine of same virtual cpu core number is in different model
Physical server on timeslice when running share ratio transformational relation.
The virtual cpu core number assuming virtual machine is m, and this virtual cpu core number is the virtual machine of m
On the physical server of the first model with timeslice share ratio for s1 run time calculated performance, quite
It is that the virtual machine of m is shared with timeslice on the physical server of the second model in this virtual cpu core number
Ratio is calculated performance during s2 operation, then, in the embodiment of the present invention, virtual cpu core number is m's
Virtual machine on the physical server of the first model and when running on the physical server of the second model time
Between sheet share ratio transformational relation and be: virtual cpu core number is the virtual machine physics in the first model of m
Calculated performance when sharing the operation of ratio s1 with timeslice on server is equivalent to this virtual cpu core number and is
The virtual machine of m the second model physical server run time calculated performance time, this virtual cpu core
It is s2 that timeslice when the virtual machine that number is m runs on the physical server of the second model shares ratio.
In the embodiment of the present invention, by the same void corresponding with the core number of the CPU of virtual machine to be migrated
The timeslice when virtual machine of plan CPU core calculation runs on the physical server of different model shares ratio
Transformational relation determines candidate physical type of server.
Wherein, owing to virtual machine based on same virtual cpu core number is at the physical server of different model
Upper timeslice when running shares the physical server model that ratio transformational relation determines may be had multiple, and
Calculated performance when virtual machine to be migrated runs on the physical server of these models is equivalent to void to be migrated
When plan machine shares calculated performance when ratio is run with very first time sheet on the physical server of source, to be migrated
The timeslice of virtual machine shares ratio may be more than 1, it is also possible to less than or equal to 1, and the present invention implements
In example, determine timeslice when virtual machine to be migrated runs on physical server share ratio less than or etc.
Physical server model in 1 is candidate physical server model.
Step S13: determine that purpose physical server, the model of described purpose physical server belong to described time
Select physical server model, the CPU core calculation of described purpose physical server be more than or equal to described in wait to move
Move the virtual cpu core number of virtual machine;
In the embodiment of the present invention, from the physical server that model is candidate physical type number, determine a thing
The CPU core calculation of reason server is more than or equal to the thing of the virtual cpu core number of described virtual machine to be migrated
Physical server for the purpose of reason server.
If not finding purpose physical server, illustrate that virtual machine to be migrated cannot be carried out migrating.
Step S14: by described virtual machine (vm) migration to be migrated to described purpose physical server, and by described
The virtual machine to be migrated timeslice in described purpose physical server is shared ratio and is adjusted to and described purpose
The second timeslice that the model of physical server is corresponding shares ratio.
By in virtual machine (vm) migration to be migrated to purpose physical server, and virtual machine to be migrated is taken in purpose
It is that the second timeslice shares ratio that timeslice in business device shares ratio setting, wherein, and virtual machine to be migrated
The calculated performance shared when ratio is run with the second timeslice on purpose physical server is equivalent to be migrated
Virtual machine shares calculated performance when ratio is run with very first time sheet on the physical server of source.
A kind of virtual machine migration method that the embodiment of the present invention provides, pre-sets same virtual cpu core
The timeslice when virtual machine of number runs on the physical server of different model shares ratio transformational relation,
When carrying out virtual machine (vm) migration, share ratio transformational relation by above-mentioned timeslice, and to be migrated virtual
Machine very first time sheet on the physical server of source shares ratio, determines candidate physical type of server, with
And the second timeslice that virtual machine to be migrated is when running on the physical server of candidate physical server model
The ratio of sharing, it is then determined that purpose physical server, the model of purpose physical server belongs to described candidate
Physical server model, the CPU core calculation of described purpose physical server is more than or equal to described to be migrated
The virtual cpu core number of virtual machine;By in virtual machine (vm) migration to be migrated to purpose physical server, and will
The virtual machine to be migrated timeslice in described purpose physical server is shared ratio and is adjusted to and described purpose
The second timeslice that the model of physical server is corresponding shares ratio, reduces the reality before and after virtual machine (vm) migration
The difference of border calculated performance.
Optionally, the virtual machine of described same virtual cpu core number is on the physical server of different model
Timeslice during operation is shared ratio transformational relation and be may include that
Virtual cpu core number is the virtual machine of m computational when running on the physical server of j model
Can be equivalent to described virtual cpu core number be the virtual machine of m on the physical server of i model with the time
Sheet shares ratio when being calculated performance during 1 operation, and described virtual cpu core number is that the virtual machine of m exists
Run required timeslice on the physical server of described j model sharing ratio is tij。
Generally, when creating a virtual machine on a physical server, this virtual machine is at physical services
Timeslice on device is shared ratio and is initialized as 1.
For more convenient understanding, in the embodiment of the present invention, matrix T can be usedmCharacterizing virtual cpu core number is
The virtual machine of m is transported on the physical server of different model (by the different model of different digital representation)
Timeslice during row shares ratio transformational relation, and this matrix is as follows:
Wherein, tij(1≤i≤N, 1≤j≤N) represents that virtual cpu core number is that the virtual machine of m is in j model
Physical server on calculated performance when running to be equivalent to virtual cpu core number be that the virtual machine of m is at i
On the physical server of model with timeslice share ratio be calculated performance during 1 operation time, virtual cpu
Core number is that the virtual machine of m timeslice when running on the physical server of j model shares ratio.Also
That is, virtual cpu core number is that the virtual machine of m is total to timeslice on the physical server of i model
The ratio of enjoying is that calculated performance during 1 operation is equivalent to virtual machine that virtual cpu core number is m in j model
Physical server on share ratio as t with timesliceijCalculated performance during operation.
Optionally, described share ratio based on described very first time sheet, the model of source physical server, with
And the virtual machine of preset same virtual cpu core number is when running on the physical server of different model
Timeslice is shared ratio transformational relation and is determined candidate physical server model, and virtual machine to be migrated is being waited
Select the second timeslice when running on the physical server of physical server model to share ratio may include that
If it is 1 that very first time sheet shares ratio, then can be directly by searching Tm, find out all candidate physical
Type of server k, wherein, trk≤ 1, r are the model of source, virtual machine place to be migrated physical server,
k∈{1,2,…,N}.In the embodiment of the present invention, if the model of purpose physical server is k1, then with described mesh
The second timeslice corresponding to the model of physical server to share ratio be trk1。
If it is not 1 that described very first time sheet shares ratio, then according to the model of described source physical server, institute
State very first time sheet and share ratio, and the virtual machine of described preset same virtual cpu core number is not
Timeslice when running on the physical server of same model shares ratio transformational relation, determines that transition physics takes
Business type h;Wherein, described virtual machine to be migrated is at the physical services of described transition physical server model
With the physics of physical server that timeslice ratio is 1 use described transition physical server model on device
Calculated performance during CPU time slice, with described virtual machine to be migrated on the physical server of described source with institute
State very first time sheet and share computational when ratio uses the physical cpu timeslice of described source physical server
Can be identical;
Concrete, t can be passed throughhr=s finds transition physical server model h, and wherein, s is void to be migrated
Very first time sheet when plan machine runs on the physical server of source shares ratio, and r is virtual machine place to be migrated
The model of source physical server, h ∈ 1,2 ..., N}.
Sharing ratio when very first time sheet is not 1, illustrates that virtual machine to be migrated is from another physical server
On move on this source physical server.In the embodiment of the present invention, if very first time sheet shares ratio not
Be 1, then the virtual machine first passing through same virtual cpu core number is transported on the physical server of different model
Timeslice during row is shared ratio transformational relation and is found the timeslice of virtual machine to be migrated to share ratio when being 1
Physical server model, i.e. transition physical server model, then, then by transition physical server
Model, and when the virtual machine of same virtual cpu core number runs on the physical server of different model
Timeslice share ratio transformational relation and find candidate physical server.
According to described transition physical server model, and described preset same virtual cpu core number
Timeslice when virtual machine runs on the physical server of different model is shared ratio transformational relation and is determined time
Select physical server model, and virtual machine to be migrated is at the physical server of candidate physical server model
Upper run time the second timeslice share ratio, wherein, described second timeslice share ratio less than or etc.
In 1.
Concrete, candidate physical server model k can be determined by transitional services type h, wherein,
thk≤ 1, h are transition physical server model, k ∈ 1,2 ..., N}.Now, if purpose physical server
Model is k1, then it is t that the second corresponding with the model of described purpose physical server timeslice shares ratiohk1。
Optionally, the virtual machine of described same virtual cpu core number can be determined by different shaped
Number physical server on timeslice when running share ratio transformational relation, specifically include:
With timeslice, virtual machine that virtual cpu core number is m is shared ratio respectively is 1 to operate in i type
Number physical server and j model physical server on;When specifically testing,
On the physical server of described i model, in the virtual machine that described virtual cpu core number is m
Run different types of live load, the virtual machine that described virtual cpu core number is m is tested
The first calculated performance parameter Ci to the virtual machine that described virtual cpu core number is m;
On the physical server of described j model, in the virtual machine that described virtual cpu core number is m
Run described different types of live load, the virtual machine that described virtual cpu core number is m is surveyed
Examination obtains the second calculated performance parameter Cj of the virtual machine that described virtual cpu core number is m;
Above-mentioned different type may include that CPU intensive type, memory-intensive, disk I/O intensive with
And the combination in any type of these types.
SPEC ((Standard Performance Evaluation Corporation, systematic function can be utilized
Assessment test) etc. benchmark test instrument test virtual machine calculated performance.
Calculated performance parameter can characterize with the instruction number (i.e. instruction number/second) of average execution per second.
If described Ci < Cj, then to the virtual machine physics in j model that described virtual cpu core number is m
The timeslice that can take the physical cpu in the physical server of described j model when running on server is shared
Ratio is adjusted, until the difference of Ci Yu Cj is in default scope, then and tijFor the difference of Ci and Cj in advance
If time in the range of, described virtual cpu core number is that the virtual machine of m is on the physical server of j model
The timeslice that can take the physical cpu in the physical server of described j model during operation shares ratio;
If the first calculated performance parameter is less than the second calculated performance parameter, then find virtual machine in j model
Process corresponding when running in physical machine, and adjust the physical cpu of the j model that this process can take
Timeslice ratio, until the difference of Ci Yu Cj is in default scope.When the difference of Ci Yu Cj is at default model
When enclosing interior, virtual cpu core number is that the virtual machine of m can account for when running on the physical server of j model
Sharing ratio by the timeslice of the physical cpu in the physical server of described j model is tij。
If Ci > Cj, then by the virtual machine physical services in i model that described virtual cpu core number is m
The timeslice that can take the physical cpu in the physical server of described i model when running on device shares ratio
It is adjusted, until the difference of Ci Yu Cj is in default scope, then tijFor the difference of Ci and Cj default
In the range of time, described virtual cpu core number is that the virtual machine of m runs on the physical server of i model
Time can take the timeslice of the physical cpu in the physical server of described i model and share the inverse of ratio;
If the first calculated performance parameter is more than the second calculated performance parameter, then find virtual machine in i model
Process corresponding when running in physical machine, and adjust the physical cpu of the i model that this process can take
Timeslice ratio, until the difference of Ci Yu Cj is in default scope.When the difference of Ci Yu Cj is at default model
When enclosing interior, virtual cpu core number is that the virtual machine of m can account for when running on the physical server of i model
The inverse sharing ratio by the timeslice of the physical cpu in the physical server of described i model is tij。
If Ci=Cj, then tij=1.
Optionally, it is also possible to determine that the virtual machine of described same virtual cpu core number is in difference by calculating
Timeslice when running on the physical server of model shares ratio transformational relation, specifically includes:
Calculating described virtual cpu core number is that the virtual machine of m is when running on the physical server of i model
The first calculated performance parameter Ci;
Calculating described virtual cpu core number is that the virtual machine of m is when running on the physical server of j model
The second calculated performance parameter Cj;
Wherein, tij=Ci/Cj.
In the embodiment of the present invention, the instruction number x of the CPU execution per second of physical server, base can be obtained
In virtual machine monitor (Virtual Machine Monitor, VMM) scheduling physical cpu to virtual machine process
Algorithm to calculate the physical cpu time distributing to virtual machine process the most per second be T, then virtual machine
Calculated performance parameter is x/T.
Corresponding with embodiment of the method, the embodiment of the present invention also provides for a kind of virtual machine (vm) migration device, this
A kind of structural representation of the virtual machine (vm) migration device that bright embodiment provides is as in figure 2 it is shown, may include that
Acquisition module 21, first determines module 22, and second determines module 23 and transferring module 24;Wherein,
Acquisition module 21 is shared for obtaining the virtual machine to be migrated very first time sheet on the physical server of source
Ratio;
Creating in the physical server of virtual machine, a physical cpu both can process virtual cpu thread,
Other thread (non-virtual CPU line journey) can also be processed.Assume that a physical cpu processes one simultaneously
The virtual cpu thread thread1 of virtual machine and non-virtual CPU line journey thread2, the two thread
Time timesharing use physical cpu.If it is 1:1 (i.e. thread1 that the time of physical cpu is shared ratio by them
Timeslice to share ratio be 1), the dispatching cycle of thread is t, then thread1 uses the physics of t time
After CPU, then being used the physical cpu of t time by thread2, then thread1 re-uses the t time
Physical cpu, circulate like this;If the time of physical cpu is shared ratio by thread1 and thread2
For 1:2 (i.e. it is 1/2 that the timeslice of thread1 shares ratio), then thread1 uses the physics of t time
After CPU, thread2 can use the physical cpu of 2t time, and then thread1 uses the physics of t time
CPU, circulates like this.
For ease of narration, in the embodiment of the present invention, by virtual machine to be migrated on the physical server of source time
Between sheet share ratio and be designated as very first time sheet and share ratio.
First determines that module 22 is for sharing ratio, the type of source physical server based on described very first time sheet
Number, and the virtual machine of preset same virtual cpu core number transports on the physical server of different model
Timeslice during row is shared ratio transformational relation and is determined candidate physical server model and virtual machine to be migrated
The second timeslice when running on the physical server of candidate physical server model shares ratio, wherein,
Described second timeslice shares ratio less than or equal to 1;
The computing capability of virtual machine depends on the number of virtual cpu and the performance of physical server, general feelings
Condition next one virtual cpu core correspond to a physical core or the hyperthread logic core of physical cpu.
In the embodiment of the present invention, pre-build that the virtual machine of same virtual cpu core number is in different model
Physical server on timeslice when running share ratio transformational relation.
The virtual cpu core number assuming virtual machine is m, and this virtual cpu core number is the virtual machine of m
On the physical server of the first model with timeslice share ratio for s1 run time calculated performance, quite
It is that the virtual machine of m is shared with timeslice on the physical server of the second model in this virtual cpu core number
Ratio is calculated performance during s2 operation, then, in the embodiment of the present invention, virtual cpu core number is m's
Virtual machine on the physical server of the first model and when running on the physical server of the second model time
Between sheet share ratio transformational relation and be: virtual cpu core number is the virtual machine physics in the first model of m
Calculated performance when sharing the operation of ratio s1 with timeslice on server is equivalent to this virtual cpu core number and is
The virtual machine of m the second model physical server run time calculated performance time, this virtual cpu core
It is s2 that timeslice when the virtual machine that number is m runs on the physical server of the second model shares ratio.
In the embodiment of the present invention, by the same void corresponding with the core number of the CPU of virtual machine to be migrated
The timeslice when virtual machine of plan CPU core calculation runs on the physical server of different model shares ratio
Transformational relation determines candidate physical type of server.
Wherein, owing to virtual machine based on same virtual cpu core number is at the physical server of different model
Upper timeslice when running shares the physical server model that ratio transformational relation determines may be had multiple, and
Calculated performance when virtual machine to be migrated runs on the physical server of these models is equivalent to void to be migrated
When plan machine shares calculated performance when ratio is run with very first time sheet on the physical server of source, to be migrated
The timeslice of virtual machine shares ratio may be more than 1, it is also possible to less than or equal to 1, and the present invention implements
In example, determine timeslice when virtual machine to be migrated runs on physical server share ratio less than or etc.
Physical server model in 1 is candidate physical server model.
Second determine module 23 for determining purpose physical server, the model of described purpose physical server
Belong to described candidate physical server model, the CPU core calculation of described purpose physical server more than or etc.
Virtual cpu core number in described virtual machine to be migrated;
In the embodiment of the present invention, from the physical server that model is candidate physical type number, determine a thing
The CPU core calculation of reason server is more than or equal to the thing of the virtual cpu core number of described virtual machine to be migrated
Physical server for the purpose of reason server.
If not finding purpose physical server, illustrate that virtual machine to be migrated cannot be carried out migrating.
Transferring module 24 for by described virtual machine (vm) migration to be migrated to described purpose physical server, and
The described virtual machine to be migrated timeslice in described purpose physical server is shared ratio be adjusted to and institute
The second timeslice stating the model of purpose physical server corresponding shares ratio.
By in virtual machine (vm) migration to be migrated to purpose physical server, and virtual machine to be migrated is taken in purpose
It is that the second timeslice shares ratio that timeslice in business device shares ratio setting, wherein, and virtual machine to be migrated
The calculated performance shared when ratio is run with the second timeslice on purpose physical server is equivalent to be migrated
Virtual machine shares calculated performance when ratio is run with very first time sheet on the physical server of source.
A kind of virtual machine (vm) migration device that the embodiment of the present invention provides, pre-sets same virtual cpu core
The timeslice when virtual machine of number runs on the physical server of different model shares ratio transformational relation,
When carrying out virtual machine (vm) migration, share ratio transformational relation by above-mentioned timeslice, and to be migrated virtual
Machine very first time sheet on the physical server of source shares ratio, determines candidate physical type of server, with
And the second timeslice that virtual machine to be migrated is when running on the physical server of candidate physical server model
The ratio of sharing, it is then determined that purpose physical server, the model of purpose physical server belongs to described candidate
Physical server model, the CPU core calculation of described purpose physical server is more than or equal to described to be migrated
The virtual cpu core number of virtual machine;By in virtual machine (vm) migration to be migrated to purpose physical server, and will
The virtual machine to be migrated timeslice in described purpose physical server is shared ratio and is adjusted to and described purpose
The second timeslice that the model of physical server is corresponding shares ratio, reduces the reality before and after virtual machine (vm) migration
The difference of border calculated performance.
Optionally, the virtual machine of described same virtual cpu core number is on the physical server of different model
Timeslice during operation is shared ratio transformational relation and be may include that
Virtual cpu core number is the virtual machine of m computational when running on the physical server of j model
Can be equivalent to described virtual cpu core number be the virtual machine of m on the physical server of i model with the time
Sheet shares ratio when being calculated performance during 1 operation, and described virtual cpu core number is that the virtual machine of m exists
Run required timeslice on the physical server of described j model sharing ratio is tij。
Generally, when creating a virtual machine on a physical server, this virtual machine is at physical services
Timeslice on device is shared ratio and is initialized as 1.
For more convenient understanding, in the embodiment of the present invention, matrix T can be usedmCharacterizing virtual cpu core number is
The virtual machine of m is transported on the physical server of different model (by the different model of different digital representation)
Timeslice during row shares ratio transformational relation, and this matrix is as follows:
Wherein, tij(1≤i≤N, 1≤j≤N) represents that virtual cpu core number is that the virtual machine of m is in j model
Physical server on calculated performance when running to be equivalent to virtual cpu core number be that the virtual machine of m is at i
On the physical server of model with timeslice share ratio be calculated performance during 1 operation time, virtual cpu
Core number is that the virtual machine of m timeslice when running on the physical server of j model shares ratio.Also
That is, virtual cpu core number is that the virtual machine of m is total to timeslice on the physical server of i model
The ratio of enjoying is that calculated performance during 1 operation is equivalent to virtual machine that virtual cpu core number is m in j model
Physical server on share ratio as t with timesliceijCalculated performance during operation.
Optionally, first determines that a kind of structural representation of module 22 is as it is shown on figure 3, may include that
First determines that unit 31 and second determines unit 32;Wherein,
If first to determine that unit 31 shares ratio for described very first time sheet be not 1, then according to described source
The model of physical server, described very first time sheet shares ratio, and described preset same virtual cpu
The timeslice when virtual machine of core number runs on the physical server of different model shares ratio conversion pass
System, determines transition physical server model;Wherein, described virtual machine to be migrated takes at described transition physics
It is 1 use described transition physical server model with timeslice ratio on the physical server of business type number
Calculated performance during the physical cpu timeslice of physical server, with described virtual machine to be migrated in described source
Share ratio with described very first time sheet on physical server and use the physical cpu of described source physical server
Calculated performance during timeslice is identical;
Concrete, t can be passed throughhr=s finds transition physical server model h, and wherein, s is void to be migrated
Very first time sheet when plan machine runs on the physical server of source shares ratio, and r is virtual machine place to be migrated
The model of source physical server, h ∈ 1,2 ..., N}.
Sharing ratio when very first time sheet is not 1, illustrates that virtual machine to be migrated is from another physical server
On move on this source physical server.In the embodiment of the present invention, if very first time sheet shares ratio not
Be 1, then the virtual machine first passing through same virtual cpu core number is transported on the physical server of different model
Timeslice during row is shared ratio transformational relation and is found the timeslice of virtual machine to be migrated to share ratio when being 1
Physical server model, i.e. transition physical server model, then, then by transition physical server
Model, and when the virtual machine of same virtual cpu core number runs on the physical server of different model
Timeslice share ratio transformational relation and find candidate physical server.
First determines that unit 31 can be also used for, if it is 1 that very first time sheet shares ratio, then and can be direct
By searching Tm, find out all candidate physical type of servers k, wherein, trk≤ 1, r are to be migrated virtual
The model of source, machine place physical server, k ∈ 1,2 ..., N}.In the embodiment of the present invention, if purpose physics clothes
The model of business device is k1, then the second corresponding with the model of described purpose physical server timeslice shares ratio
Example is trk1。
Second determines that unit 32 is for according to described transition physical server model and described preset same
The timeslice when virtual machine of one virtual cpu core number runs on the physical server of different model is shared
Ratio transformational relation determines candidate server model, and virtual machine to be migrated is in candidate physical server-type
Number physical server on the second timeslice when running share ratio, wherein, described second timeslice is altogether
Ratio of enjoying is less than or equal to 1.
Concrete, candidate physical server model k can be determined by transitional services type h, wherein,
thk≤ 1, h are transition physical server model, k ∈ 1,2 ..., N}.Now, if purpose physical server
Model is k1, then it is t that the second corresponding with the model of described purpose physical server timeslice shares ratiohk1。
Optionally, on the basis of embodiment illustrated in fig. 2, the virtual machine (vm) migration that the embodiment of the present invention provides
Device can also include:
First transformational relation determines module, for being determined by described same virtual cpu core number
Timeslice when virtual machine runs on the physical server of different model shares ratio transformational relation.
Concrete, the first transformational relation that the embodiment of the present invention provides determines a kind of structural representation of module
As shown in Figure 4, may include that
First test cell 41, for sharing with timeslice when the virtual machine that virtual cpu core number is m
Ratio is on 1 physical server operating in i model, is the virtual of m at described virtual cpu core number
When machine runs different types of live load, the virtual machine that described virtual cpu core number is m is carried out
Test obtains the first calculated performance parameter Ci of the virtual machine that described virtual cpu core number is m;
Second test cell 42, for sharing with timeslice when the virtual machine that virtual cpu core number is m
Ratio is on 1 physical server operating in j model, is the virtual of m at described virtual cpu core number
When machine runs described different types of live load, it is the virtual machine of m to described virtual cpu core number
Carry out testing the second calculated performance parameter Cj obtaining the virtual machine that described virtual cpu core number is m;
Above-mentioned different type may include that CPU intensive type, memory-intensive, disk I/O intensive with
And the combination in any type of these types.
SPEC ((Standard Performance Evaluation Corporation, systematic function can be utilized
Assessment test) etc. benchmark test instrument test virtual machine calculated performance.
Calculated performance parameter can characterize with the instruction number (i.e. instruction number/second) of average execution per second.
3rd determines unit 43, if for described Ci < Cj, is then m's to described virtual cpu core number
Virtual machine can take the thing in the physical server of described j model when running on the physical server of j model
The timeslice of reason CPU is shared ratio and is adjusted, until the difference of Ci Yu Cj is in default scope, then
Determine tijDuring for the difference of Ci and Cj in default scope, described virtual cpu core number is the virtual of m
Machine can take the physics in the physical server of described j model when running on the physical server of j model
The timeslice of CPU shares ratio;
If the first calculated performance parameter is less than the second calculated performance parameter, then find virtual machine in j model
Process corresponding when running in physical machine, and adjust the physical cpu of the j model that this process can take
Timeslice ratio, until the difference of Ci Yu Cj is in default scope.When the difference of Ci Yu Cj is at default model
When enclosing interior, virtual cpu core number is that the virtual machine of m can account for when running on the physical server of j model
Sharing ratio by the timeslice of the physical cpu in the physical server of described j model is tij。
4th determines unit 44, if for Ci > Cj, is then the virtual of m by described virtual cpu core number
Machine can take the physics in the physical server of described i model when running on the physical server of i model
The timeslice of CPU is shared ratio and is adjusted, until the difference of Ci Yu Cj is in default scope, the most really
Determine tijDuring for the difference of Ci and Cj in default scope, described virtual cpu core number is the virtual machine of m
The physical server of i model can take when running the physical cpu in the physical server of described ji model
Timeslice share the inverse of ratio;
If the first calculated performance parameter is more than the second calculated performance parameter, then find virtual machine in i model
Process corresponding when running in physical machine, and adjust the physical cpu of the i model that this process can take
Timeslice ratio, until the difference of Ci Yu Cj is in default scope.When the difference of Ci Yu Cj is at default model
When enclosing interior, virtual cpu core number is that the virtual machine of m can account for when running on the physical server of i model
The inverse sharing ratio by the timeslice of the physical cpu in the physical server of described i model is tij。
5th determines unit 45, if for Ci=Cj, it is determined that tij=1.
Optionally, on the basis of embodiment illustrated in fig. 2, the virtual machine (vm) migration that the embodiment of the present invention provides
Device can also include:
Second transformational relation determines module, for determining described same virtual cpu core number by calculating
Timeslice when virtual machine runs on the physical server of different model shares ratio transformational relation.
Concrete, the second transformational relation that the embodiment of the present invention provides determines a kind of structural representation of module
As it is shown in figure 5, may include that
First computing unit 51, is that the virtual machine of m is in i model for calculating described virtual cpu core number
Physical server on the first calculated performance parameter Ci when running;
Second computing unit 52, is that the virtual machine of m is in j model for calculating described virtual cpu core number
Physical server on the second calculated performance parameter Cj when running;
6th determines unit 53, is used for determining tij: tij=Ci/Cj.
In the embodiment of the present invention, the instruction number x of the CPU execution per second of physical server, base can be obtained
In virtual machine monitor (Virtual Machine Monitor, VMM) scheduling physical cpu to virtual machine process
Algorithm to calculate the physical cpu time distributing to virtual machine process the most per second be T, then virtual machine
Calculated performance parameter is x/T.
Described above to the disclosed embodiments, makes professional and technical personnel in the field be capable of or uses
The present invention.Multiple amendment to these embodiments will be aobvious and easy for those skilled in the art
See, generic principles defined herein can without departing from the spirit or scope of the present invention,
Realize in other embodiments.Therefore, the present invention is not intended to be limited to the embodiments shown herein,
And it is to fit to the widest scope consistent with principles disclosed herein and features of novelty.
Claims (10)
1. a virtual machine migration method, it is characterised in that including:
Obtain the virtual machine to be migrated very first time sheet on the physical server of source and share ratio;
Ratio is shared based on described very first time sheet, the model of source physical server, and preset same
The timeslice when virtual machine of virtual cpu core number runs on the physical server of different model shares ratio
Example transformational relation determines that candidate physical server model and virtual machine to be migrated are in candidate physical server-type
Number physical server on the second timeslice when running share ratio, wherein, described second timeslice is altogether
Ratio of enjoying is less than or equal to 1;
Determine that purpose physical server, the model of described purpose physical server belong to described candidate physical clothes
Business type number, the CPU core calculation of described purpose physical server is more than or equal to described virtual machine to be migrated
Virtual cpu core number;
By in described virtual machine (vm) migration to be migrated to described purpose physical server, and by described void to be migrated
Plan machine timeslice in described purpose physical server is shared ratio and is adjusted to and described purpose physical services
The second timeslice that the model of device is corresponding shares ratio.
Method the most according to claim 1, it is characterised in that described same virtual cpu core
The timeslice when virtual machine of number runs on the physical server of different model shares ratio transformational relation bag
Include:
Virtual cpu core number is the virtual machine of m computational when running on the physical server of j model
Can be equivalent to described virtual cpu core number be the virtual machine of m on the physical server of i model with the time
Sheet shares ratio when being calculated performance during 1 operation, and described virtual cpu core number is that the virtual machine of m exists
Run required timeslice on the physical server of described j model sharing ratio is tij。
Method the most according to claim 2, it is characterised in that described based on described very first time sheet
The ratio of sharing, the model of source physical server, and the virtual machine of preset same virtual cpu core number
Timeslice when running on the physical server of different model is shared ratio transformational relation and is determined candidate physical
Server model, and virtual machine to be migrated runs on the physical server of candidate physical server model
Time the second timeslice share ratio and include:
If it is not 1 that described very first time sheet shares ratio, then according to the model of described source physical server, institute
State very first time sheet and share ratio, and the virtual machine of described preset same virtual cpu core number is not
Timeslice when running on the physical server of same model shares ratio transformational relation, determines that transition physics takes
Business type number;Wherein, described virtual machine to be migrated is at the physical services of described transition physical server model
With the physics of physical server that timeslice ratio is 1 use described transition physical server model on device
Calculated performance during CPU time slice, with described virtual machine to be migrated on the physical server of described source with institute
State very first time sheet and share computational when ratio uses the physical cpu timeslice of described source physical server
Can be identical;
According to described transition physical server model, and described preset same virtual cpu core number
Timeslice when virtual machine runs on the physical server of different model is shared ratio transformational relation and is determined time
Election server model, and virtual machine to be migrated transports on the physical server of candidate physical server model
The second timeslice during row shares ratio, and wherein, described second timeslice shares ratio less than or equal to 1.
Method the most according to claim 2, it is characterised in that be determined by described same void
The timeslice when virtual machine of plan CPU core calculation runs on the physical server of different model shares ratio
Transformational relation, including:
With timeslice, virtual machine that virtual cpu core number is m is shared ratio respectively is 1 to operate in i type
Number physical server and j model physical server on;
On the physical server of described i model described virtual cpu core number be m virtual machine in run
Different types of live load, carries out test to the virtual machine that described virtual cpu core number is m and obtains institute
State the first calculated performance parameter Ci of the virtual machine that virtual cpu core number is m;
On the physical server of described j model described virtual cpu core number be m virtual machine in run
Described different types of live load, tests the virtual machine that described virtual cpu core number is m
The second calculated performance parameter Cj to the virtual machine that described virtual cpu core number is m;
If described Ci < Cj, then to the virtual machine physics in j model that described virtual cpu core number is m
The timeslice that can take the physical cpu in the physical server of described j model when running on server is shared
Ratio is adjusted, until the difference of Ci Yu Cj is in default scope, then and tijFor the difference of Ci and Cj in advance
If time in the range of, described virtual cpu core number is that the virtual machine of m is on the physical server of j model
The timeslice that can take the physical cpu in the physical server of described j model during operation shares ratio;
If Ci > Cj, then by the virtual machine physical services in i model that described virtual cpu core number is m
The timeslice that can take the physical cpu in the physical server of described i model when running on device shares ratio
It is adjusted, until the difference of Ci Yu Cj is in default scope, then tijFor the difference of Ci and Cj default
In the range of time, described virtual cpu core number is that the virtual machine of m runs on the physical server of i model
Time can take the timeslice of the physical cpu in the physical server of described i model and share the inverse of ratio;
If Ci=Cj, then tij=1.
Method the most according to claim 2, it is characterised in that determine described same void by calculating
The timeslice when virtual machine of plan CPU core calculation runs on the physical server of different model shares ratio
Transformational relation, including:
Calculating described virtual cpu core number is that the virtual machine of m is when running on the physical server of i model
The first calculated performance parameter Ci;
Calculating described virtual cpu core number is that the virtual machine of m is when running on the physical server of j model
The second calculated performance parameter Cj;
Wherein, tij=Ci/Cj.
6. a virtual machine (vm) migration device, it is characterised in that described device includes:
Acquisition module, shares for obtaining the virtual machine to be migrated very first time sheet on the physical server of source
Ratio;
First determines module, for sharing ratio, the type of source physical server based on described very first time sheet
Number, and the virtual machine of preset same virtual cpu core number transports on the physical server of different model
Timeslice during row is shared ratio transformational relation and is determined candidate physical server model and virtual machine to be migrated
The second timeslice when running on the physical server of candidate physical server model shares ratio, wherein,
Described second timeslice shares ratio less than or equal to 1;
Second determines module, is used for determining purpose physical server, the model of described purpose physical server
Belong to described candidate physical server model, the CPU core calculation of described purpose physical server more than or etc.
Virtual cpu core number in described virtual machine to be migrated;
Transferring module, for by described virtual machine (vm) migration to be migrated to described purpose physical server, and
The described virtual machine to be migrated timeslice in described purpose physical server is shared ratio be adjusted to and institute
The second timeslice stating the model of purpose physical server corresponding shares ratio.
Device the most according to claim 6, it is characterised in that described same virtual cpu core
The timeslice when virtual machine of number runs on the physical server of different model shares ratio transformational relation bag
Include:
Virtual cpu core number is the virtual machine of m computational when running on the physical server of j model
Can be equivalent to described virtual cpu core number be the virtual machine of m on the physical server of i model with the time
Sheet shares ratio when being calculated performance during 1 operation, and described virtual cpu core number is that the virtual machine of m exists
Run required timeslice on the physical server of described j model sharing ratio is tij。
Device the most according to claim 7, it is characterised in that described first determines that module includes:
First determines unit, if sharing ratio for described very first time sheet is not 1, then according to described source thing
The model of reason server, described very first time sheet shares ratio, and described preset same virtual cpu
The timeslice when virtual machine of core number runs on the physical server of different model shares ratio conversion pass
System, determines transition physical server model;Wherein, described virtual machine to be migrated takes at described transition physics
It is 1 use described transition physical server model with timeslice ratio on the physical server of business type number
Calculated performance during the physical cpu timeslice of physical server, with described virtual machine to be migrated in described source
Share ratio with described very first time sheet on physical server and use the physical cpu of described source physical server
Calculated performance during timeslice is identical;
Second determines unit, for according to described transition physical server model and described preset same
The timeslice when virtual machine of one virtual cpu core number runs on the physical server of different model is shared
Ratio transformational relation determines candidate server model, and virtual machine to be migrated is in candidate physical server-type
Number physical server on the second timeslice when running share ratio, wherein, described second timeslice is altogether
Ratio of enjoying is less than or equal to 1.
Device the most according to claim 7, it is characterised in that described device also includes:
First transformational relation determines module, for being determined by described same virtual cpu core number
Timeslice when virtual machine runs on the physical server of different model shares ratio transformational relation, including:
First test cell, for sharing ratio when the virtual machine that virtual cpu core number is m with timeslice
Be on 1 physical server operating in i model described virtual cpu core number be m virtual machine in run
During different types of live load, the virtual machine that described virtual cpu core number is m is carried out test and obtains
Described virtual cpu core number is the first calculated performance parameter Ci of the virtual machine of m;
Second test cell, for sharing ratio when the virtual machine that virtual cpu core number is m with timeslice
Be on 1 physical server operating in j model described virtual cpu core number be m virtual machine in run
During described different types of live load, the virtual machine that described virtual cpu core number is m is tested
Obtain the second calculated performance parameter Cj of the virtual machine that described virtual cpu core number is m;
3rd determines unit, if for described Ci < Cj, is then the void of m to described virtual cpu core number
Plan machine can take the physics in the physical server of described j model when running on the physical server of j model
The timeslice of CPU is shared ratio and is adjusted, until the difference of Ci Yu Cj is in default scope, the most really
Determine tijDuring for the difference of Ci and Cj in default scope, described virtual cpu core number is the virtual machine of m
The physical server of j model can take when running the physical cpu in the physical server of described j model
Timeslice share ratio;
4th determines unit, if for Ci > Cj, is then the virtual machine of m by described virtual cpu core number
The physical server of i model can take when running the physical cpu in the physical server of described i model
Timeslice share ratio and be adjusted, until the difference of Ci Yu Cj is in default scope, it is determined that tij
During for the difference of Ci and Cj in default scope, described virtual cpu core number is that the virtual machine of m is at i
Physical cpu in the physical server of described ji model can be taken when running on the physical server of model
Timeslice shares the inverse of ratio;
5th determines unit, if for Ci=Cj, it is determined that tij=1.
Device the most according to claim 7, it is characterised in that described device also includes:
Second transformational relation determines module, for determining described same virtual cpu core number by calculating
Timeslice when virtual machine runs on the physical server of different model shares ratio transformational relation, including:
First computing unit, is that the virtual machine of m is in i model for calculating described virtual cpu core number
The first calculated performance parameter Ci when running on physical server;
Second computing unit, is that the virtual machine of m is in j model for calculating described virtual cpu core number
The second calculated performance parameter Cj when running on physical server;
6th determines unit, is used for determining tij: tij=Ci/Cj.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510165952.3A CN106155782B (en) | 2015-04-09 | 2015-04-09 | Virtual machine migration method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510165952.3A CN106155782B (en) | 2015-04-09 | 2015-04-09 | Virtual machine migration method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106155782A true CN106155782A (en) | 2016-11-23 |
CN106155782B CN106155782B (en) | 2019-06-25 |
Family
ID=57335916
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510165952.3A Active CN106155782B (en) | 2015-04-09 | 2015-04-09 | Virtual machine migration method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106155782B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108874534A (en) * | 2018-04-18 | 2018-11-23 | 华为技术有限公司 | A kind of dispatching method and device of PCPU resource |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7203944B1 (en) * | 2003-07-09 | 2007-04-10 | Veritas Operating Corporation | Migrating virtual machines among computer systems to balance load caused by virtual machines |
US20090106409A1 (en) * | 2007-10-18 | 2009-04-23 | Fujitsu Limited | Method, apparatus and recording medium for migrating a virtual machine |
CN102253857A (en) * | 2011-06-24 | 2011-11-23 | 华中科技大学 | Xen virtual machine scheduling control method in multi-core environment |
CN103294546A (en) * | 2013-04-03 | 2013-09-11 | 华中科技大学 | Multi-dimensional resource performance interference aware on-line virtual machine migration method and system |
US20130346973A1 (en) * | 2012-06-25 | 2013-12-26 | Fujitsu Limited | Management server, and virtual machine move control method |
CN104156255A (en) * | 2014-07-31 | 2014-11-19 | 华为技术有限公司 | Virtual machine migration method, virtual machine migration device and source physical host |
-
2015
- 2015-04-09 CN CN201510165952.3A patent/CN106155782B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7203944B1 (en) * | 2003-07-09 | 2007-04-10 | Veritas Operating Corporation | Migrating virtual machines among computer systems to balance load caused by virtual machines |
US20090106409A1 (en) * | 2007-10-18 | 2009-04-23 | Fujitsu Limited | Method, apparatus and recording medium for migrating a virtual machine |
CN102253857A (en) * | 2011-06-24 | 2011-11-23 | 华中科技大学 | Xen virtual machine scheduling control method in multi-core environment |
US20130346973A1 (en) * | 2012-06-25 | 2013-12-26 | Fujitsu Limited | Management server, and virtual machine move control method |
CN103294546A (en) * | 2013-04-03 | 2013-09-11 | 华中科技大学 | Multi-dimensional resource performance interference aware on-line virtual machine migration method and system |
CN104156255A (en) * | 2014-07-31 | 2014-11-19 | 华为技术有限公司 | Virtual machine migration method, virtual machine migration device and source physical host |
Non-Patent Citations (1)
Title |
---|
姜雅楠: "云计算环境下虚拟机实时迁移及负载均衡研究", 《中国优秀硕士学位论文全文数据库 信息科技辑》 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108874534A (en) * | 2018-04-18 | 2018-11-23 | 华为技术有限公司 | A kind of dispatching method and device of PCPU resource |
CN108874534B (en) * | 2018-04-18 | 2022-09-16 | 华为技术有限公司 | Method and device for scheduling PCPU (physical packet Unit) resources |
Also Published As
Publication number | Publication date |
---|---|
CN106155782B (en) | 2019-06-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10176004B2 (en) | Workload-aware load balancing to minimize scheduled downtime during maintenance of host or hypervisor of a virtualized computing system | |
CN105843683B (en) | Method, system and equipment for the distribution of dynamic optimization platform resource | |
WO2018099299A1 (en) | Graphic data processing method, device and system | |
US9009707B2 (en) | Sharing reconfigurable computing devices between workloads | |
CN106354616B (en) | Monitor the method, apparatus and high performance computing system of application execution performance | |
US11157302B2 (en) | Idle processor management in virtualized systems via paravirtualization | |
CN104615480A (en) | Virtual processor scheduling method based on NUMA high-performance network processor loads | |
WO2015032201A1 (en) | Virtual machine placing method and device | |
DE102021123338A1 (en) | PREDICTIVE CONTROL USING ONE OR MORE NEURAL NETWORKS | |
Ghribi | Energy efficient resource allocation in cloud computing environments | |
Ahmadi et al. | Performance evaluation of server virtualization in data center applications | |
CN107301088A (en) | A kind of method and apparatus for managing virtual machine batch migration | |
Kim et al. | Fair-share scheduling in single-ISA asymmetric multicore architecture via scaled virtual runtime and load redistribution | |
US20170140839A1 (en) | Address translation stimuli generation for post-silicon functional validation | |
CN106155782A (en) | Virtual machine migration method and device | |
Ismail et al. | CPU and memory performance analysis on dynamic and dedicated resource allocation using XenServer in Data Center environment | |
CN107741868B (en) | Setting method and device for Basic Input Output System (BIOS) | |
US20230195489A1 (en) | Pluggable diagnostic tool for telco ran troubleshooting | |
Raj et al. | Efficient resource allocation in resource provisioning policies over resource cloud communication paradigm | |
US11507437B2 (en) | Deploying multiple different applications into a single short-lived container along with a master runtime | |
US9524193B1 (en) | Transparent virtualized operating system | |
Cabrera et al. | Energy efficient dynamic load balancing over multigpu heterogeneous systems | |
Muñoz et al. | How to run scientific applications with dirac in federated hybrid clouds | |
CN107391228A (en) | A kind of virtual machine migration management and device | |
Prades et al. | Made-to-measure GPUs on virtual machines with rCUDA |
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 |