CN106155782B - Virtual machine migration method and device - Google Patents
Virtual machine migration method and device Download PDFInfo
- Publication number
- CN106155782B CN106155782B CN201510165952.3A CN201510165952A CN106155782B CN 106155782 B CN106155782 B CN 106155782B CN 201510165952 A CN201510165952 A CN 201510165952A CN 106155782 B CN106155782 B CN 106155782B
- Authority
- CN
- China
- Prior art keywords
- physical server
- model
- virtual machine
- 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.)
- Active
Links
Landscapes
- Debugging And Monitoring (AREA)
Abstract
The embodiment of the invention discloses a kind of virtual machine migration method and devices, it presets timeslice of the virtual machine of same virtual cpu core number when running on the physical server of different model and shares ratio transformational relation, when carrying out virtual machine (vm) migration, ratio transformational relation, which is shared, by above-mentioned timeslice determines candidate physical type of server, and second timeslice of the virtual machine to be migrated when running on the physical server of candidate physical server model shares ratio, then purpose physical server is determined, the model of purpose physical server belongs to the candidate physical server model, the CPU core calculation of purpose physical server is greater than or equal to the virtual cpu core number of the virtual machine to be migrated;By virtual machine (vm) migration to be migrated into purpose physical server, and the timeslice of virtual machine to be migrated is shared into ratio and is adjusted to the shared ratio of the second timeslice corresponding with the model of purpose physical server, reduce the difference of the practical calculated performance before and after virtual machine (vm) migration.
Description
Technical field
The present invention relates to field of computer technology, more specifically to a kind of virtual machine migration method and device.
Background technique
Virtualization technology is one of key technology of cloud computing.One physical server is virtualized into more logical Virtuals
Machine can not only greatly promote the utilization efficiency of cloud computing environment computing resource and save energy consumption, while virtualization technology provides
Dynamic migration, scheduling of resource so that the load of cloud computing service is efficiently managed and is extended, so that the clothes of cloud computing
The more flexible and flexibility of business.
Virtual machine (vm) migration refers to the resource allocation for needing to adjust virtual machine between physical server, alternatively, some physics
When server needs repairing, virtual machine is moved to from a physical server process of another physical server.
However, since, there may be performance difference, virtual machine carries out between different physical servers between physical server
When migration, the practical calculated performance of migration front and back can also be had differences.This species diversity will have a direct impact on user and operate in void
Service application in quasi- machine, not can guarantee cloud computing service service-level agreement (service level agreement,
SLA).Therefore, the difference for how reducing the practical calculated performance before and after virtual machine (vm) migration becomes urgent problem to be solved.
Summary of the invention
The object of the present invention is to provide a kind of virtual machine migration method and devices, to reduce the reality before and after virtual machine (vm) migration
The difference of calculated performance.
To achieve the above object, the present invention provides the following technical scheme that
A kind of virtual machine migration method, comprising:
It obtains first time piece of the virtual machine to be migrated on the physical server of source and shares ratio;
Ratio, the model of source physical server and preset same virtual cpu core are shared based on the first time piece
Timeslice of the virtual machine of calculation when running on the physical server of different model shares ratio transformational relation and determines candidate
When managing second of server model and virtual machine to be migrated when running on the physical server of candidate physical server model
Between piece share ratio, wherein second timeslice share ratio be less than or equal to 1;
Determine purpose physical server, the model of the purpose physical server belongs to the candidate physical server-type
Number, the CPU core calculation of the purpose physical server is greater than or equal to the virtual cpu core number of the virtual machine to be migrated;
By the virtual machine (vm) migration to be migrated into the purpose physical server, and by the virtual machine to be migrated in institute
It states the timeslice in purpose physical server and shares ratio and be adjusted to model corresponding second with the purpose physical server
Timeslice shares ratio.
The above method, it is preferred that the virtual machine of the same virtual cpu core number is on the physical server of different model
Timeslice when operation shares ratio transformational relation
Virtual cpu core number for m virtual machine on the physical server of j model run when calculated performance be equivalent to institute
The virtual machine that virtual cpu core number is m is stated to share in terms of when ratio is 1 operation on the physical server of i model by timeslice
When calculating performance, the virtual cpu core number is that the virtual machine of m runs the required time on the physical server of the j model
It is t that piece, which shares ratio,ij。
The above method, it is preferred that it is described based on the first time piece share ratio, the model of source physical server, with
And the shared ratio of timeslice of the virtual machine of preset same virtual cpu core number when being run on the physical server of different model
Example transformational relation determines that candidate physical server model and virtual machine to be migrated take in the physics of candidate physical server model
The second timeslice when running on business device shares ratio
If it is not 1 that the first time piece, which shares ratio, according to the model of the source physical server, when described first
Between piece share the virtual machine of ratio and the preset same virtual cpu core number on the physical server of different model
Timeslice when operation shares ratio transformational relation, determines transition physical server model;Wherein, the virtual machine to be migrated exists
The transition physical server model is used for 1 with timeslice ratio on the physical server of the transition physical server model
Physical server physical cpu timeslice when calculated performance, with the virtual machine to be migrated in the source physical server
On with the first time piece share ratio use the source physical server physical cpu timeslice when calculated performance phase
Together;
Virtual machine according to the transition physical server model and the preset same virtual cpu core number exists
Timeslice when running on the physical server of different model shares ratio transformational relation and determines candidate physical server model, with
And second timeslice of the virtual machine to be migrated when running on the physical server of candidate physical server model shares ratio,
In, second timeslice shares ratio and is less than or equal to 1.
The above method, it is preferred that be determined by the virtual machine of the same virtual cpu core number in different model
Timeslice when running on physical server shares ratio transformational relation, comprising:
It is the 1 physics clothes for operating in i model that the virtual machine that virtual cpu core number is m, which is shared ratio respectively with timeslice,
On business device and the physical server of j model;
It is run in the virtual machine that the virtual cpu core number is m on the physical server of the i model different types of
Workload, the virtual machine for being m to the virtual cpu core number are tested to obtain the virtual cpu core number to be the virtual of m
First calculated performance parameter Ci of machine;
The inhomogeneity is run in the virtual machine that the virtual cpu core number is m on the physical server of the j model
The workload of type, the virtual machine for being m to the virtual cpu core number are tested to obtain the virtual cpu core number to be m's
Second calculated performance parameter Cj of virtual machine;
If Ci < the Cj, the virtual machine that the virtual cpu core number is m is run on the physical server of j model
When can occupy the timeslice of physical cpu in the physical server of the j model and share ratio and be adjusted, until Ci and Cj it
Difference is in default range, then tijFor Ci and Cj difference in default range when, the virtual cpu core number is the virtual of m
The timeslice for the physical cpu in physical server that machine can occupy the j model when running on the physical server of j model is total
Enjoy ratio;
It, can when being run on the physical server of i model by the virtual machine that the virtual cpu core number is m if Ci > Cj
The timeslice for occupying the physical cpu in the physical server of the i model is shared ratio and is adjusted, until the difference of Ci and Cj exists
In default range, then tijFor Ci and Cj difference in default range when, the virtual cpu core number is the virtual machine of m in i
The timeslice shared ratio of the physical cpu in the physical server of the i model can be occupied when running on the physical server of model
The inverse of example;
If Ci=Cj, tij=1.
The above method, it is preferred that the virtual machine of the same virtual cpu core number is determined by calculation in different model
Timeslice when running on physical server shares ratio transformational relation, comprising:
Calculate the virtual cpu core number be m virtual machine on the physical server of i model run when first calculate
Performance parameter Ci;
Calculate the virtual cpu core number be m virtual machine on the physical server of j model run when second calculate
Performance parameter Cj;
Wherein, tij=Ci/Cj.
A kind of virtual machine (vm) migration device, described device include:
Module is obtained, shares ratio for obtaining first time piece of the virtual machine to be migrated on the physical server of source;
First determining module is used for based on the shared ratio of the first time piece, the model of source physical server, and in advance
Timeslice of the virtual machine for the same virtual cpu core number set when running on the physical server of different model is shared ratio and is turned
The relationship of changing determines candidate physical server model and virtual machine to be migrated in the physical server of candidate physical server model
The second timeslice when upper operation shares ratio, wherein second timeslice shares ratio and is less than or equal to 1;
Second determining module, for determining purpose physical server, the model of the purpose physical server belongs to described
The CPU core calculation of candidate physical server model, the purpose physical server is greater than or equal to the virtual machine to be migrated
Virtual cpu core number;
Transferring module, for by the virtual machine (vm) migration to be migrated into the purpose physical server, and will described in
The shared ratio of timeslice of the virtual machine in the purpose physical server is migrated to be adjusted to and the purpose physical server
Corresponding second timeslice of model shares ratio.
Above-mentioned apparatus, it is preferred that the virtual machine of the same virtual cpu core number is on the physical server of different model
Timeslice when operation shares ratio transformational relation
Virtual cpu core number for m virtual machine on the physical server of j model run when calculated performance be equivalent to institute
The virtual machine that virtual cpu core number is m is stated to share in terms of when ratio is 1 operation on the physical server of i model by timeslice
When calculating performance, the virtual cpu core number is that the virtual machine of m runs the required time on the physical server of the j model
It is t that piece, which shares ratio,ij。
Above-mentioned apparatus, it is preferred that first determining module includes:
First determination unit, if sharing ratio for the first time piece is not 1, according to the source physical server
Model, the first time piece shares the virtual machine of ratio and the preset same virtual cpu core number in different shaped
Number physical server on run when timeslice share ratio transformational relation, determine transition physical server model;Wherein, institute
It states virtual machine to be migrated and the mistake is used for 1 with timeslice ratio on the physical server of the transition physical server model
The calculated performance when physical cpu timeslice of the physical server of physical server model is crossed, is existed with the virtual machine to be migrated
The physical cpu timeslice that ratio uses the source physical server is shared with the first time piece on the source physical server
When calculated performance it is identical;
Second determination unit, for according to the transition physical server model and the preset same virtual cpu
Timeslice of the virtual machine of core number when running on the physical server of different model shares ratio transformational relation and determines candidate
Physical server model and virtual machine to be migrated when being run on the physical server of candidate physical server model second
Timeslice shares ratio, wherein second timeslice shares ratio and is less than or equal to 1.
Above-mentioned apparatus, it is preferred that described device further include:
First transformational relation determining module, the virtual machine for being determined by the same virtual cpu core number exist
Timeslice when running on the physical server of different model shares ratio transformational relation, comprising:
First test unit, for be m when virtual cpu core number virtual machine to share ratio with timeslice be 1 to operate in i
When running different types of workload in the virtual machine that the virtual cpu core number is m on the physical server of model, to institute
The virtual machine that virtual cpu core number is m is stated to be tested to obtain the first calculating of the virtual machine that the virtual cpu core number is m
Performance parameter Ci;
Second test cell, for be m when virtual cpu core number virtual machine to share ratio with timeslice be 1 to operate in j
When running the different types of workload in the virtual machine that the virtual cpu core number is m on the physical server of model,
The virtual machine for being m to the virtual cpu core number is tested to obtain the second of the virtual machine that the virtual cpu core number is m
Calculated performance parameter Cj;
Third determination unit, if being used for the Ci < Cj, to the virtual machine that the virtual cpu core number is m in j model
Physical server on can occupy when running physical cpu in the physical server of the j model timeslice share ratio into
Row adjustment, until the difference of Ci and Cj is in default range, it is determined that tijFor Ci and Cj difference in default range when, it is described
Virtual cpu core number is that the virtual machine of m can occupy the physical services of the j model when running on the physical server of j model
The timeslice of physical cpu in device shares ratio;
4th determination unit, if be used for Ci > Cj, by the virtual cpu core number be m virtual machine i model object
The timeslice that the physical cpu in the physical server of the i model can be occupied when running on reason server is shared ratio and is adjusted
It is whole, until the difference of Ci and Cj is in default range, it is determined that tijFor Ci and Cj difference in default range when, it is described virtual
In the physical server that the virtual machine that CPU core calculation is m can occupy the i model when running on the physical server of i model
Physical cpu timeslice share ratio inverse;
5th determination unit, if being used for Ci=Cj, it is determined that tij=1.
Above-mentioned apparatus, it is preferred that described device further include:
Second transformational relation determining module, the virtual machine for the same virtual cpu core number to be determined by calculation exist
Timeslice when running on the physical server of different model shares ratio transformational relation, comprising:
First computing unit, for calculate the virtual cpu core number be m virtual machine i model physical server
The first calculated performance parameter Ci when upper operation;
Second computing unit, for calculate the virtual cpu core number be m virtual machine j model physical server
The second calculated performance parameter Cj when upper operation;
6th determination unit, for determining tij: tij=Ci/Cj.
By above scheme it is found that a kind of virtual machine migration method provided by the present application and device, preset same void
Timeslice of the virtual machine of quasi- CPU core calculation when running on the physical server of different model shares ratio transformational relation,
When carrying out virtual machine (vm) migration, ratio transformational relation and virtual machine to be migrated are shared in source physical services by above-mentioned timeslice
First time piece on device shares ratio, determines that candidate physical type of server and virtual machine to be migrated take in candidate physical
The second timeslice when running on the physical server of business type number shares ratio, then determines purpose physical server, purpose
The model of physical server belongs to the candidate physical server model, and the CPU core calculation of the purpose physical server is greater than
Or the virtual cpu core number equal to the virtual machine to be migrated;By virtual machine (vm) migration to be migrated into purpose physical server, and
Timeslice of the virtual machine to be migrated in the purpose physical server is shared ratio to be adjusted to and the purpose physical services
Corresponding second timeslice of the model of device shares ratio, reduces the difference of the practical calculated performance before and after virtual machine (vm) migration.
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 implementation flow chart of virtual machine migration method provided by the embodiments of the present application;
Fig. 2 is a kind of structural schematic diagram of virtual machine (vm) migration device provided by the embodiments of the present application;
Fig. 3 is a kind of structural schematic diagram of the first determining module provided by the embodiments of the present application;
Fig. 4 is a kind of structural schematic diagram of the first transformational relation determining module provided by the embodiments of the present application;
Fig. 5 is a kind of structural schematic diagram of the second transformational relation determining module provided by the embodiments of the present application.
Specification and claims and term " first " in above-mentioned attached drawing, " second ", " third " " the 4th " etc. (if
In the presence of) it is part for distinguishing similar, without being used to describe a particular order or precedence order.It should be understood that using in this way
Data be interchangeable under appropriate circumstances, so that embodiments herein described herein can be in addition to illustrating herein
Sequence in addition is implemented.
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.
Referring to Fig. 1, Fig. 1 is a kind of implementation flow chart of virtual machine migration method provided by the embodiments of the present application, it can be with
Include:
Step S11: it obtains first time piece of the virtual machine to be migrated on the physical server of source and shares ratio;
In the physical server for creating virtual machine, a physical cpu both can handle virtual cpu thread, also can handle
Other threads (non-virtual CPU line journey).Assuming that a physical cpu handles the virtual cpu thread thread1 of a virtual machine simultaneously
With a non-virtual CPU line journey thread2, timesharing uses physical cpu when the two threads.If they to physical cpu when
Between to share ratio be 1:1 (it is 1 that i.e. the timeslice of thread1, which shares ratio), the dispatching cycle of thread is t, then thread1 use
After the physical cpu of t time, the physical cpu of t time is then used by thread2, then thread1 reuses the physics of t time
CPU is recycled like this;If it is 1:2 (the i.e. time of thread1 that thread1 and thread2, which shares ratio to the time of physical cpu,
It is that 1/2), then after thread1 is using the physical cpu of t time, thread2 will use the physical cpu of 2t time that piece, which shares ratio,
Then thread1 uses the physical cpu of t time, recycles like this.
In the embodiment of the present invention, timeslice of the virtual machine to be migrated on the physical server of source to be shared convenient for describing
Ratio is denoted as first time piece and shares ratio.
Step S12: sharing ratio based on the first time piece, the model of source physical server and preset same
It is true that timeslice of the virtual machine of virtual cpu core number when running on the physical server of different model shares ratio transformational relation
Candidate physical server model and virtual machine to be migrated are determined when running on the physical server of candidate physical server model
The second timeslice share ratio, wherein second timeslice share ratio be less than or equal to 1;
The computing capability of virtual machine depend on virtual cpu number and physical server performance, ordinary circumstance lower
Virtual cpu core corresponds to a physical core or hyperthread logic core for physical cpu.
In the embodiment of the present invention, the virtual machine for having pre-established same virtual cpu core number takes in the physics of different model
Timeslice when running on business device shares ratio transformational relation.
Assuming that the virtual cpu core number of virtual machine is m, object of the virtual machine in the first model which is m
Calculated performance when ratio is s1 operation is shared with timeslice on reason server, being equivalent to the virtual cpu core number is the virtual of m
Machine is sharing calculated performance when ratio is s2 operation on the physical server of the second model with timeslice, then the embodiment of the present invention
In, virtual cpu core number is the virtual machine of m on the physical server of the first model and on the physical server of the second model
Timeslice when operation shares ratio transformational relation are as follows: physical services of the virtual machine in the first model that virtual cpu core number is m
On device with timeslice share ratio s1 operation when calculated performance be equivalent to the virtual cpu core number for m virtual machine second
Model physical server operation when calculated performance when, the virtual cpu core number be m virtual machine the second model physics
It is s2 that timeslice when running on server, which shares ratio,.
In the embodiment of the present invention, pass through same virtual cpu core corresponding with the core number of the CPU of virtual machine to be migrated
Timeslice of several virtual machines when running on the physical server of different model shares ratio transformational relation and determines candidate physical
Type of server.
Wherein, since the virtual machine based on same virtual cpu core number on the physical server of different model when running
Timeslice share physical server model that ratio transformational relation determines may there are many, and virtual machine to be migrated is in these types
Number physical server on calculated performance when running be equivalent to virtual machine to be migrated on the physical server of source at the first time
When piece shares calculated performance when ratio is run, the timeslice of virtual machine to be migrated, which shares ratio, may be greater than 1, it is also possible to
Less than or equal to 1, in the embodiment of the present invention, the shared ratio of timeslice of the virtual machine to be migrated when running on physical server is determined
Example is less than or equal to 1 physical server model candidate physical server model.
Step S13: determining purpose physical server, and the model of the purpose physical server belongs to the candidate physical clothes
Business type number, the CPU core calculation of the purpose physical server are greater than or equal to the virtual cpu core of the virtual machine to be migrated
Number;
In the embodiment of the present invention, a physical server is determined from the physical server of model candidate physical type number
CPU core calculation be greater than or equal to the virtual machine to be migrated virtual cpu core number physical server be purpose physics take
Business device.
If not finding purpose physical server, illustrate that virtual machine to be migrated can not be migrated.
Step S14: by the virtual machine (vm) migration to be migrated into the purpose physical server, and by the void to be migrated
Quasi- timeslice of the machine in the purpose physical server shares ratio and is adjusted to the model pair with the purpose physical server
The second timeslice answered shares ratio.
By virtual machine (vm) migration to be migrated into purpose physical server, and by virtual machine to be migrated in destination server
Timeslice share ratio setting be the second timeslice share ratio, wherein virtual machine to be migrated on purpose physical server with
Calculated performance when second timeslice shares ratio operation is equivalent to virtual machine to be migrated when on the physical server of source with first
Between piece share ratio operation when calculated performance.
A kind of virtual machine migration method provided in an embodiment of the present invention presets the virtual of same virtual cpu core number
Timeslice of the machine when running on the physical server of different model shares ratio transformational relation, when carrying out virtual machine (vm) migration,
It is total that the first time piece of ratio transformational relation and virtual machine to be migrated on the physical server of source is shared by above-mentioned timeslice
Ratio is enjoyed, determines candidate physical type of server and virtual machine to be migrated in the physical services of candidate physical server model
The second timeslice when running on device shares ratio, then determines purpose physical server, the model category of purpose physical server
It is greater than or equal to the void to be migrated in the CPU core calculation of the candidate physical server model, the purpose physical server
The virtual cpu core number of quasi- machine;By virtual machine (vm) migration to be migrated into purpose physical server, and by virtual machine to be migrated in institute
It states the timeslice in purpose physical server and shares ratio and be adjusted to model corresponding second with the purpose physical server
Timeslice shares ratio, reduces the difference of the practical calculated performance before and after virtual machine (vm) migration.
Optionally, the virtual machine of the same virtual cpu core number on the physical server of different model run when
Timeslice shares ratio transformational relation
Virtual cpu core number for m virtual machine on the physical server of j model run when calculated performance be equivalent to institute
The virtual machine that virtual cpu core number is m is stated to share in terms of when ratio is 1 operation on the physical server of i model by timeslice
When calculating performance, the virtual cpu core number is that the virtual machine of m runs the required time on the physical server of the j model
It is t that piece, which shares ratio,ij。
In general, when on a physical server create a virtual machine when, the virtual machine on physical server when
Between piece share ratio be initialized as 1.
Understand to be more convenient, in the embodiment of the present invention, matrix T can be usedmCharacterize the virtual machine that virtual cpu core number is m
Timeslice when running on the physical server of different model (with the different model of different digital representations) is shared ratio and is turned
Relationship is changed, the matrix is as follows:
Wherein, tijPhysical services of the virtual machine in j model that (1≤i≤N, 1≤j≤N) expression virtual cpu core number is m
On device run when calculated performance be equivalent to virtual cpu core number be m virtual machine on the physical server of i model with the time
When piece shares calculated performance when ratio is 1 operation, virtual cpu core number is the virtual machine of m on the physical server of j model
Timeslice when operation shares ratio.That is, virtual cpu core number is the virtual machine of m on the physical server of i model
Shared with timeslice calculated performance when ratio is 1 operation be equivalent to virtual cpu core number for m virtual machine j model object
Ratio is shared for t with timeslice on reason serverijCalculated performance when operation.
Optionally, described that ratio is shared based on the first time piece, the model of source physical server and preset same
Timeslice of the virtual machine of one virtual cpu core number when running on the physical server of different model shares ratio transformational relation
Determine that candidate physical server model and virtual machine to be migrated are run on the physical server of candidate physical server model
When the second timeslice share ratio may include:
If it is 1 that first time piece, which shares ratio, can be directly by searching for Tm, find out all candidate physical server categories
Type k, wherein trk≤ 1, r are the model of source physical server where virtual machine to be migrated, k ∈ { 1,2 ..., N }.The present invention is implemented
In example, if the model k1 of purpose physical server, the second timeslice corresponding with the model of the purpose physical server
Shared ratio is trk1。
If it is not 1 that the first time piece, which shares ratio, according to the model of the source physical server, when described first
Between piece share the virtual machine of ratio and the preset same virtual cpu core number on the physical server of different model
Timeslice when operation shares ratio transformational relation, determines transition physical server model h;Wherein, the virtual machine to be migrated
The transition physical services type is used for 1 with timeslice ratio on the physical server of the transition physical server model
Number physical server physical cpu timeslice when calculated performance, with the virtual machine to be migrated in the source physical services
Calculated performance phase when ratio uses the physical cpu timeslice of the source physical server is shared with the first time piece on device
Together;
Specifically, t can be passed throughhr=s finds transition physical server model h, wherein s is virtual machine to be migrated in source
First time piece when running on physical server shares ratio, and r is the model of source physical server where virtual machine to be migrated,
h∈{1,2,…,N}。
Sharing ratio when first time piece is not 1, illustrates that virtual machine to be migrated is migrated from another physical server
Onto the source physical server.In the embodiment of the present invention, if it is not 1 that first time piece, which shares ratio, same void is first passed through
Timeslice of the virtual machine of quasi- CPU core calculation when running on the physical server of different model is shared ratio transformational relation and is found
The timeslice of virtual machine to be migrated shares physical server model when ratio is 1, i.e. transition physical server model, then,
Again by the virtual machine of transition physical server model and same virtual cpu core number different model physical server
Timeslice when upper operation shares ratio transformational relation and finds candidate physical server.
Virtual machine according to the transition physical server model and the preset same virtual cpu core number exists
Timeslice when running on the physical server of different model shares ratio transformational relation and determines candidate physical server model, with
And second timeslice of the virtual machine to be migrated when running on the physical server of candidate physical server model shares ratio,
In, second timeslice shares ratio and is less than or equal to 1.
Specifically, can determine candidate physical server model k by transitional services type h, wherein thk≤ 1, h are
Transition physical server model, k ∈ { 1,2 ..., N }.At this point, if the model k1 of purpose physical server, with the purpose
It is t that corresponding second timeslice of the model of physical server, which shares ratio,hk1。
Optionally, physics of the virtual machine in different model of the same virtual cpu core number can be determined by
Timeslice when running on server shares ratio transformational relation, specifically includes:
It is the 1 physics clothes for operating in i model that the virtual machine that virtual cpu core number is m, which is shared ratio respectively with timeslice,
On business device and the physical server of j model;When specific test,
On the physical server of the i model, inhomogeneity is run in the virtual machine that the virtual cpu core number is m
The workload of type, the virtual machine for being m to the virtual cpu core number are tested to obtain the virtual cpu core number to be m's
First calculated performance parameter Ci of virtual machine;
On the physical server of the j model, operation is described not in the virtual machine that the virtual cpu core number is m
The workload of same type is tested to obtain the virtual cpu core number to the virtual machine that the virtual cpu core number is m
For the second calculated performance parameter Cj of the virtual machine of m;
Above-mentioned different type may include: CPU intensive type, memory-intensive, disk I/O intensity and these types
Any combination type.
Can use SPEC, ((Standard Performance Evaluation Corporation, system performance are commented
Estimation examination) etc. benchmark tests tool test virtual machine calculated performance.
Calculated performance parameter can use instruction number (i.e. instruction number/second) characterization of average execution per second.
If Ci < the Cj, the virtual machine that the virtual cpu core number is m is run on the physical server of j model
When can occupy the timeslice of physical cpu in the physical server of the j model and share ratio and be adjusted, until Ci and Cj it
Difference is in default range, then tijFor Ci and Cj difference in default range when, the virtual cpu core number is the virtual of m
The timeslice for the physical cpu in physical server that machine can occupy the j model when running on the physical server of j model is total
Enjoy ratio;
If the first calculated performance parameter finds virtual machine in the physical machine of j model less than the second calculated performance parameter
Corresponding process when upper operation, and adjust the timeslice ratio of the physical cpu for the j model that the process can occupy, until Ci with
The difference of Cj is in default range.When the difference of Ci and Cj is in default range, virtual cpu core number is the virtual machine of m in j
The timeslice shared ratio of the physical cpu in the physical server of the j model can be occupied when running on the physical server of model
Example is tij。
It, can when being run on the physical server of i model by the virtual machine that the virtual cpu core number is m if Ci > Cj
The timeslice for occupying the physical cpu in the physical server of the i model is shared ratio and is adjusted, until the difference of Ci and Cj exists
In default range, then tijFor Ci and Cj difference in default range when, the virtual cpu core number is the virtual machine of m in i
The timeslice shared ratio of the physical cpu in the physical server of the i model can be occupied when running on the physical server of model
The inverse of example;
If the first calculated performance parameter is greater than the second calculated performance parameter, virtual machine is found in the physical machine of i model
Corresponding process when upper operation, and adjust the timeslice ratio of the physical cpu for the i model that the process can occupy, until Ci with
The difference of Cj is in default range.When the difference of Ci and Cj is in default range, virtual cpu core number is the virtual machine of m in i
The timeslice shared ratio of the physical cpu in the physical server of the i model can be occupied when running on the physical server of model
The inverse of example is tij。
If Ci=Cj, tij=1.
Optionally, object of the virtual machine in different model of the same virtual cpu core number can also be determined by calculation
It manages timeslice when running on server and shares ratio transformational relation, specifically include:
Calculate the virtual cpu core number be m virtual machine on the physical server of i model run when first calculate
Performance parameter Ci;
Calculate the virtual cpu core number be m virtual machine on the physical server of j model run when second calculate
Performance parameter Cj;
Wherein, tij=Ci/Cj.
In the embodiment of the present invention, the instruction number x of the CPU of available physical server execution per second is supervised based on virtual machine
Visual organ (Virtual Machine Monitor, VMM) scheduling physical cpu calculates physical cpu to the algorithm of virtual machine process and puts down
The time per second for distributing to virtual machine process is T, then the calculated performance parameter of virtual machine is x/T.
Corresponding with embodiment of the method, the embodiment of the present invention also provides a kind of virtual machine (vm) migration device, the embodiment of the present invention
A kind of structural schematic diagram of the virtual machine (vm) migration device of offer is as shown in Fig. 2, may include:
Obtain module 21, the first determining module 22, the second determining module 23 and transferring module 24;Wherein,
It obtains module 21 and shares ratio for obtaining first time piece of the virtual machine to be migrated on the physical server of source;
In the physical server for creating virtual machine, a physical cpu both can handle virtual cpu thread, also can handle
Other threads (non-virtual CPU line journey).Assuming that a physical cpu handles the virtual cpu thread thread1 of a virtual machine simultaneously
With a non-virtual CPU line journey thread2, timesharing uses physical cpu when the two threads.If they to physical cpu when
Between to share ratio be 1:1 (it is 1 that i.e. the timeslice of thread1, which shares ratio), the dispatching cycle of thread is t, then thread1 use
After the physical cpu of t time, the physical cpu of t time is then used by thread2, then thread1 reuses the physics of t time
CPU is recycled like this;If it is 1:2 (the i.e. time of thread1 that thread1 and thread2, which shares ratio to the time of physical cpu,
It is that 1/2), then after thread1 is using the physical cpu of t time, thread2 will use the physical cpu of 2t time that piece, which shares ratio,
Then thread1 uses the physical cpu of t time, recycles like this.
In the embodiment of the present invention, timeslice of the virtual machine to be migrated on the physical server of source to be shared convenient for describing
Ratio is denoted as first time piece and shares ratio.
First determining module 22 is used for based on the shared ratio of the first time piece, the model of source physical server, and
Timeslice of the virtual machine of preset same virtual cpu core number when running on the physical server of different model shares ratio
Transformational relation determines candidate physical server model and virtual machine to be migrated in the physical services of candidate physical server model
The second timeslice when running on device shares ratio, wherein second timeslice shares ratio and is less than or equal to 1;
The computing capability of virtual machine depend on virtual cpu number and physical server performance, ordinary circumstance lower
Virtual cpu core corresponds to a physical core or hyperthread logic core for physical cpu.
In the embodiment of the present invention, the virtual machine for having pre-established same virtual cpu core number takes in the physics of different model
Timeslice when running on business device shares ratio transformational relation.
Assuming that the virtual cpu core number of virtual machine is m, object of the virtual machine in the first model which is m
Calculated performance when ratio is s1 operation is shared with timeslice on reason server, being equivalent to the virtual cpu core number is the virtual of m
Machine is sharing calculated performance when ratio is s2 operation on the physical server of the second model with timeslice, then the embodiment of the present invention
In, virtual cpu core number is the virtual machine of m on the physical server of the first model and on the physical server of the second model
Timeslice when operation shares ratio transformational relation are as follows: physical services of the virtual machine in the first model that virtual cpu core number is m
On device with timeslice share ratio s1 operation when calculated performance be equivalent to the virtual cpu core number for m virtual machine second
Model physical server operation when calculated performance when, the virtual cpu core number be m virtual machine the second model physics
It is s2 that timeslice when running on server, which shares ratio,.
In the embodiment of the present invention, pass through same virtual cpu core corresponding with the core number of the CPU of virtual machine to be migrated
Timeslice of several virtual machines when running on the physical server of different model shares ratio transformational relation and determines candidate physical
Type of server.
Wherein, since the virtual machine based on same virtual cpu core number on the physical server of different model when running
Timeslice share physical server model that ratio transformational relation determines may there are many, and virtual machine to be migrated is in these types
Number physical server on calculated performance when running be equivalent to virtual machine to be migrated on the physical server of source at the first time
When piece shares calculated performance when ratio is run, the timeslice of virtual machine to be migrated, which shares ratio, may be greater than 1, it is also possible to
Less than or equal to 1, in the embodiment of the present invention, the shared ratio of timeslice of the virtual machine to be migrated when running on physical server is determined
Example is less than or equal to 1 physical server model candidate physical server model.
For determining purpose physical server, the model of the purpose physical server belongs to described second determining module 23
The CPU core calculation of candidate physical server model, the purpose physical server is greater than or equal to the virtual machine to be migrated
Virtual cpu core number;
In the embodiment of the present invention, a physical server is determined from the physical server of model candidate physical type number
CPU core calculation be greater than or equal to the virtual machine to be migrated virtual cpu core number physical server be purpose physics take
Business device.
If not finding purpose physical server, illustrate that virtual machine to be migrated can not be migrated.
Transferring module 24 be used for by the virtual machine (vm) migration to be migrated into the purpose physical server, and will described in
The shared ratio of timeslice of the virtual machine in the purpose physical server is migrated to be adjusted to and the purpose physical server
Corresponding second timeslice of model shares ratio.
By virtual machine (vm) migration to be migrated into purpose physical server, and by virtual machine to be migrated in destination server
Timeslice share ratio setting be the second timeslice share ratio, wherein virtual machine to be migrated on purpose physical server with
Calculated performance when second timeslice shares ratio operation is equivalent to virtual machine to be migrated when on the physical server of source with first
Between piece share ratio operation when calculated performance.
A kind of virtual machine (vm) migration device provided in an embodiment of the present invention, presets the virtual of same virtual cpu core number
Timeslice of the machine when running on the physical server of different model shares ratio transformational relation, when carrying out virtual machine (vm) migration,
It is total that the first time piece of ratio transformational relation and virtual machine to be migrated on the physical server of source is shared by above-mentioned timeslice
Ratio is enjoyed, determines candidate physical type of server and virtual machine to be migrated in the physical services of candidate physical server model
The second timeslice when running on device shares ratio, then determines purpose physical server, the model category of purpose physical server
It is greater than or equal to the void to be migrated in the CPU core calculation of the candidate physical server model, the purpose physical server
The virtual cpu core number of quasi- machine;By virtual machine (vm) migration to be migrated into purpose physical server, and by virtual machine to be migrated in institute
It states the timeslice in purpose physical server and shares ratio and be adjusted to model corresponding second with the purpose physical server
Timeslice shares ratio, reduces the difference of the practical calculated performance before and after virtual machine (vm) migration.
Optionally, the virtual machine of the same virtual cpu core number on the physical server of different model run when
Timeslice shares ratio transformational relation
Virtual cpu core number for m virtual machine on the physical server of j model run when calculated performance be equivalent to institute
The virtual machine that virtual cpu core number is m is stated to share in terms of when ratio is 1 operation on the physical server of i model by timeslice
When calculating performance, the virtual cpu core number is that the virtual machine of m runs the required time on the physical server of the j model
It is t that piece, which shares ratio,ij。
In general, when on a physical server create a virtual machine when, the virtual machine on physical server when
Between piece share ratio be initialized as 1.
Understand to be more convenient, in the embodiment of the present invention, matrix T can be usedmCharacterize the virtual machine that virtual cpu core number is m
Timeslice when running on the physical server of different model (with the different model of different digital representations) is shared ratio and is turned
Relationship is changed, the matrix is as follows:
Wherein, tijPhysical services of the virtual machine in j model that (1≤i≤N, 1≤j≤N) expression virtual cpu core number is m
On device run when calculated performance be equivalent to virtual cpu core number be m virtual machine on the physical server of i model with the time
When piece shares calculated performance when ratio is 1 operation, virtual cpu core number is the virtual machine of m on the physical server of j model
Timeslice when operation shares ratio.That is, virtual cpu core number is the virtual machine of m on the physical server of i model
Shared with timeslice calculated performance when ratio is 1 operation be equivalent to virtual cpu core number for m virtual machine j model object
Ratio is shared for t with timeslice on reason serverijCalculated performance when operation.
Optionally, a kind of structural schematic diagram of the first determining module 22 is as shown in figure 3, may include:
First determination unit 31 and the second determination unit 32;Wherein,
If it is not 1 that the first determination unit 31, which shares ratio for the first time piece, according to the source physical services
The model of device, the first time piece share the virtual machine of ratio and the preset same virtual cpu core number in difference
Timeslice when running on the physical server of model shares ratio transformational relation, determines transition physical server model;Wherein,
The virtual machine to be migrated is described in 1 use with timeslice ratio on the physical server of the transition physical server model
Calculated performance when the physical cpu timeslice of the physical server of transition physical server model, with the virtual machine to be migrated
The physical cpu time that ratio uses the source physical server is shared with the first time piece on the source physical server
Calculated performance when piece is identical;
Specifically, t can be passed throughhr=s finds transition physical server model h, wherein s is virtual machine to be migrated in source
First time piece when running on physical server shares ratio, and r is the model of source physical server where virtual machine to be migrated,
h∈{1,2,…,N}。
Sharing ratio when first time piece is not 1, illustrates that virtual machine to be migrated is migrated from another physical server
Onto the source physical server.In the embodiment of the present invention, if it is not 1 that first time piece, which shares ratio, same void is first passed through
Timeslice of the virtual machine of quasi- CPU core calculation when running on the physical server of different model is shared ratio transformational relation and is found
The timeslice of virtual machine to be migrated shares physical server model when ratio is 1, i.e. transition physical server model, then,
Again by the virtual machine of transition physical server model and same virtual cpu core number different model physical server
Timeslice when upper operation shares ratio transformational relation and finds candidate physical server.
First determination unit 31 can be also used for, if first time piece share ratio be 1, can directly by searching for
Tm, find out all candidate physical type of server k, wherein trk≤ 1, r are the type of source physical server where virtual machine to be migrated
Number, k ∈ { 1,2 ..., N }.In the embodiment of the present invention, if the model k1 of purpose physical server, taken with the purpose physics
It is t that corresponding second timeslice of model of business device, which shares ratio,rk1。
Second determination unit 32 is used for according to the transition physical server model and described preset same virtual
Timeslice of the virtual machine of CPU core calculation when running on the physical server of different model shares ratio transformational relation and determines time
Select physical server model and virtual machine to be migrated when being run on the physical server of candidate physical server model the
Two timeslices share ratio, wherein second timeslice shares ratio and is less than or equal to 1.
Specifically, can determine candidate physical server model k by transitional services type h, wherein thk≤ 1, h are
Transition physical server model, k ∈ { 1,2 ..., N }.At this point, if the model k1 of purpose physical server, with the purpose
It is t that corresponding second timeslice of the model of physical server, which shares ratio,hk1。
Optionally, on the basis of embodiment shown in Fig. 2, virtual machine (vm) migration device provided in an embodiment of the present invention can be with
Include:
First transformational relation determining module, the virtual machine for being determined by the same virtual cpu core number exist
Timeslice when running on the physical server of different model shares ratio transformational relation.
Specifically, a kind of structural schematic diagram such as Fig. 4 institute of the first transformational relation determining module provided in an embodiment of the present invention
Show, may include:
First test unit 41 is 1 operation for working as the virtual machine that virtual cpu core number is m to share ratio with timeslice
On the physical server of i model, different types of workload is run in the virtual machine that the virtual cpu core number is m
When, the virtual machine for being m to the virtual cpu core number is tested to obtain the of the virtual machine that the virtual cpu core number is m
One calculated performance parameter Ci;
Second test cell 42 is 1 operation for working as the virtual machine that virtual cpu core number is m to share ratio with timeslice
On the physical server of j model, the different types of work is run in the virtual machine that the virtual cpu core number is m
When load, the virtual machine for being m to the virtual cpu core number is tested to obtain the virtual machine that the virtual cpu core number is m
The second calculated performance parameter Cj;
Above-mentioned different type may include: CPU intensive type, memory-intensive, disk I/O intensity and these types
Any combination type.
Can use SPEC, ((Standard Performance Evaluation Corporation, system performance are commented
Estimation examination) etc. benchmark tests tool test virtual machine calculated performance.
Calculated performance parameter can use instruction number (i.e. instruction number/second) characterization of average execution per second.
Third determination unit 43, if being used for the Ci < Cj, to the virtual machine that the virtual cpu core number is m in j type
Number physical server on can occupy the timeslice of physical cpu in the physical server of the j model when running and share ratio
It is adjusted, until the difference of Ci and Cj is in default range, it is determined that tijFor Ci and Cj difference in default range when, institute
The physics clothes of the j model can be occupied when running on the physical server of j model by stating the virtual machine that virtual cpu core number is m
The timeslice for the physical cpu being engaged in device shares ratio;
If the first calculated performance parameter finds virtual machine in the physical machine of j model less than the second calculated performance parameter
Corresponding process when upper operation, and adjust the timeslice ratio of the physical cpu for the j model that the process can occupy, until Ci with
The difference of Cj is in default range.When the difference of Ci and Cj is in default range, virtual cpu core number is the virtual machine of m in j
The timeslice shared ratio of the physical cpu in the physical server of the j model can be occupied when running on the physical server of model
Example is tij。
4th determination unit 44, if be used for Ci > Cj, by the virtual cpu core number be m virtual machine in i model
The timeslice that the physical cpu in the physical server of the i model can be occupied when running on physical server is shared ratio and is carried out
Adjustment, until the difference of Ci and Cj is in default range, it is determined that tijFor Ci and Cj difference in default range when, the void
Quasi- CPU core calculation is that the virtual machine of m can occupy the physical server of the i model when running on the physical server of i model
In physical cpu timeslice share ratio inverse;
If the first calculated performance parameter is greater than the second calculated performance parameter, virtual machine is found in the physical machine of i model
Corresponding process when upper operation, and adjust the timeslice ratio of the physical cpu for the i model that the process can occupy, until Ci with
The difference of Cj is in default range.When the difference of Ci and Cj is in default range, virtual cpu core number is the virtual machine of m in i
The timeslice shared ratio of the physical cpu in the physical server of the i model can be occupied when running on the physical server of model
The inverse of example is tij。
5th determination unit 45, if being used for Ci=Cj, it is determined that tij=1.
Optionally, on the basis of embodiment shown in Fig. 2, virtual machine (vm) migration device provided in an embodiment of the present invention can be with
Include:
Second transformational relation determining module, the virtual machine for the same virtual cpu core number to be determined by calculation exist
Timeslice when running on the physical server of different model shares ratio transformational relation.
Specifically, a kind of structural schematic diagram such as Fig. 5 institute of the second transformational relation determining module provided in an embodiment of the present invention
Show, may include:
First computing unit 51, for calculate the virtual cpu core number be m virtual machine i model physical services
The first calculated performance parameter Ci when being run on device;
Second computing unit 52, for calculate the virtual cpu core number be m virtual machine j model physical services
The second calculated performance parameter Cj when being run on device;
6th determination unit 53, for determining tij: tij=Ci/Cj.
In the embodiment of the present invention, the instruction number x of the CPU of available physical server execution per second is supervised based on virtual machine
Visual organ (Virtual Machine Monitor, VMM) scheduling physical cpu calculates physical cpu to the algorithm of virtual machine process and puts down
The time per second for distributing to virtual machine process is T, then the calculated performance parameter of virtual machine is x/T.
The foregoing description of the disclosed embodiments enables those skilled in the art to implement or use the present invention.
Various modifications to these embodiments will be readily apparent to those skilled in the art, as defined herein
General Principle can be realized in other embodiments without departing from the spirit or scope of the present invention.Therefore, of the invention
It is not intended to be limited to the embodiments shown herein, and is to fit to and the principles and novel features disclosed herein phase one
The widest scope of cause.
Claims (10)
1. a kind of virtual machine migration method characterized by comprising
It obtains first time piece of the virtual machine to be migrated on the physical server of source and shares ratio;
Ratio, the model of source physical server and preset same virtual cpu core number are shared based on the first time piece
Virtual machine on the physical server of different model run when timeslice share ratio transformational relation determine candidate physical take
The second timeslice of business type number and virtual machine to be migrated when being run on the physical server of candidate physical server model
Shared ratio, wherein second timeslice shares ratio and is less than or equal to 1;
Determine purpose physical server, the model of the purpose physical server belongs to the candidate physical server model, institute
The CPU core calculation for stating purpose physical server is greater than or equal to the virtual cpu core number of the virtual machine to be migrated;
By the virtual machine (vm) migration to be migrated into the purpose physical server, and by the virtual machine to be migrated in the mesh
Physical server in timeslice share ratio be adjusted to the second time corresponding with the model of the purpose physical server
Piece shares ratio.
2. the method according to claim 1, wherein the virtual machine of the same virtual cpu core number is in difference
Timeslice when running on the physical server of model shares ratio transformational relation
Calculated performance of the virtual machine that virtual cpu core number is m when running on the physical server of j model is equivalent to the void
The virtual machine that quasi- CPU core calculation is m shared on the physical server of i model with timeslice it is computational when ratio is 1 operation
When energy, it is total that the virtual machine that the virtual cpu core number is m runs required timeslice on the physical server of the j model
Enjoying ratio is tij。
3. according to the method described in claim 2, it is characterized in that, described share ratio, source object based on the first time piece
The virtual machine of the model and preset same virtual cpu core number of managing server is transported on the physical server of different model
Timeslice when row shares ratio transformational relation and determines candidate physical server model and virtual machine to be migrated in candidate physical
The second timeslice when running on the physical server of server model shares ratio
If it is not 1 that the first time piece, which shares ratio, according to the model of the source physical server, the first time piece
The virtual machine of shared ratio and the preset same virtual cpu core number is run on the physical server of different model
When timeslice share ratio transformational relation, determine transition physical server model;Wherein, the virtual machine to be migrated is described
The object that the transition physical server model is used for 1 with timeslice ratio on the physical server of transition physical server model
Manage server physical cpu timeslice when calculated performance, with the virtual machine to be migrated on the source physical server with
The first time piece shares ratio and uses the calculated performance when physical cpu timeslice of the source physical server identical;
According to the virtual machine of the transition physical server model and the preset same virtual cpu core number in difference
Timeslice when running on the physical server of model shares ratio transformational relation and determines candidate physical server model, and to
It migrates second timeslice of the virtual machine when running on the physical server of candidate physical server model and shares ratio, wherein
Second timeslice shares ratio and is less than or equal to 1.
4. according to the method described in claim 2, it is characterized in that, being determined by the same virtual cpu core number
Timeslice of the virtual machine when running on the physical server of different model shares ratio transformational relation, comprising:
It is 1 physical server for operating in i model that the virtual machine that virtual cpu core number is m, which is shared ratio respectively with timeslice,
On the physical server of j model;
Different types of work is run in the virtual machine that the virtual cpu core number is m on the physical server of the i model
Load, the virtual machine for being m to the virtual cpu core number are tested to obtain the virtual machine that the virtual cpu core number is m
First calculated performance parameter Ci;
It is run in the virtual machine that the virtual cpu core number is m on the physical server of the j model described different types of
Workload, the virtual machine for being m to the virtual cpu core number are tested to obtain the virtual cpu core number to be the virtual of m
Second calculated performance parameter Cj of machine;
It, can when being run on the physical server of j model to the virtual machine that the virtual cpu core number is m if the Ci < Cj
The timeslice for occupying the physical cpu in the physical server of the j model is shared ratio and is adjusted, until the difference of Ci and Cj exists
In default range, then tijFor Ci and Cj difference in default range when, the virtual cpu core number is the virtual machine of m in j
The timeslice shared ratio of the physical cpu in the physical server of the j model can be occupied when running on the physical server of model
Example;
If Ci > Cj, the virtual machine that the virtual cpu core number is m can be occupied when running on the physical server of i model
The timeslice of physical cpu in the physical server of the i model is shared ratio and is adjusted, until the difference of Ci and Cj is default
In the range of, then tijFor Ci and Cj difference in default range when, the virtual cpu core number is the virtual machine of m in i model
Physical server on can occupy the timeslice of physical cpu in the physical server of the i model when running and share ratio
It is reciprocal;
If Ci=Cj, tij=1.
5. according to the method described in claim 2, it is characterized in that, the same virtual cpu core number is determined by calculation
Timeslice of the virtual machine when running on the physical server of different model shares ratio transformational relation, comprising:
Calculate the virtual cpu core number be m virtual machine on the physical server of i model run when the first calculated performance
Parameter Ci;
Calculate the virtual cpu core number be m virtual machine on the physical server of j model run when the second calculated performance
Parameter Cj;
Wherein, tij=Ci/Cj.
6. a kind of virtual machine (vm) migration device, which is characterized in that described device includes:
Module is obtained, shares ratio for obtaining first time piece of the virtual machine to be migrated on the physical server of source;
First determining module, for sharing ratio, the model of source physical server and preset based on the first time piece
Timeslice of the virtual machine of same virtual cpu core number when running on the physical server of different model shares ratio conversion pass
It is to determine that candidate physical server model and virtual machine to be migrated are transported on the physical server of candidate physical server model
The second timeslice when row shares ratio, wherein second timeslice shares ratio and is less than or equal to 1;
Second determining module, for determining purpose physical server, the model of the purpose physical server belongs to the candidate
The CPU core calculation of physical server model, the purpose physical server is greater than or equal to the virtual of the virtual machine to be migrated
CPU core calculation;
Transferring module is used for by the virtual machine (vm) migration to be migrated into the purpose physical server, and will be described to be migrated
Timeslice of the virtual machine in the purpose physical server shares ratio and is adjusted to the model with the purpose physical server
Corresponding second timeslice shares ratio.
7. device according to claim 6, which is characterized in that the virtual machine of the same virtual cpu core number is in difference
Timeslice when running on the physical server of model shares ratio transformational relation
Calculated performance of the virtual machine that virtual cpu core number is m when running on the physical server of j model is equivalent to the void
The virtual machine that quasi- CPU core calculation is m shared on the physical server of i model with timeslice it is computational when ratio is 1 operation
When energy, it is total that the virtual machine that the virtual cpu core number is m runs required timeslice on the physical server of the j model
Enjoying ratio is tij。
8. device according to claim 7, which is characterized in that first determining module includes:
First determination unit, if sharing ratio for the first time piece is not 1, the type according to the source physical server
Number, the first time piece shares the virtual machine of ratio and the preset same virtual cpu core number in different model
Timeslice when running on physical server shares ratio transformational relation, determines transition physical server model;Wherein, it is described to
It migrates virtual machine and the transition object is used for 1 with timeslice ratio on the physical server of the transition physical server model
The calculated performance when physical cpu timeslice of the physical server of server model is managed, with the virtual machine to be migrated described
On the physical server of source with the first time piece share ratio use the source physical server physical cpu timeslice when
Calculated performance is identical;
Second determination unit, for according to the transition physical server model and the preset same virtual cpu core
Timeslice of several virtual machines when running on the physical server of different model shares ratio transformational relation and determines candidate physical
The second time of server model and virtual machine to be migrated when being run on the physical server of candidate physical server model
Piece shares ratio, wherein second timeslice shares ratio and is less than or equal to 1.
9. device according to claim 7, which is characterized in that described device further include:
First transformational relation determining module, for being determined by the virtual machine of the same virtual cpu core number in difference
Timeslice when running on the physical server of model shares ratio transformational relation, comprising:
First test unit, for be m when virtual cpu core number virtual machine to share ratio with timeslice be 1 to operate in i model
Physical server on the virtual cpu core number be in the virtual machine of m when running different types of workload, to the void
The virtual machine that quasi- CPU core calculation is m is tested to obtain the first calculated performance of the virtual machine that the virtual cpu core number is m
Parameter Ci;
Second test cell, for be m when virtual cpu core number virtual machine to share ratio with timeslice be 1 to operate in j model
Physical server on the virtual cpu core number be in the virtual machine of m when running the different types of workload, to institute
The virtual machine that virtual cpu core number is m is stated to be tested to obtain the second calculating of the virtual machine that the virtual cpu core number is m
Performance parameter Cj;
Third determination unit, if be used for the Ci < Cj, to the virtual cpu core number be m virtual machine j model object
The timeslice that the physical cpu in the physical server of the j model can be occupied when running on reason server is shared ratio and is adjusted
It is whole, until the difference of Ci and Cj is in default range, it is determined that tijFor Ci and Cj difference in default range when, it is described virtual
In the physical server that the virtual machine that CPU core calculation is m can occupy the j model when running on the physical server of j model
Physical cpu timeslice share ratio;
4th determination unit takes the virtual machine that the virtual cpu core number is m in the physics of i model if being used for Ci > Cj
The timeslice that the physical cpu in the physical server of the i model can be occupied when running on business device is shared ratio and is adjusted, directly
To Ci and Cj difference in default range, it is determined that tijFor Ci and Cj difference in default range when, the virtual cpu core
The physics in physical server that the virtual machine that calculation is m can occupy the i model when running on the physical server of i model
The timeslice of CPU shares the inverse of ratio;
5th determination unit, if being used for Ci=Cj, it is determined that tij=1.
10. device according to claim 7, which is characterized in that described device further include:
Second transformational relation determining module, for the virtual machine of the same virtual cpu core number to be determined by calculation in difference
Timeslice when running on the physical server of model shares ratio transformational relation, comprising:
First computing unit is transported on the physical server of i model for calculating the virtual machine that the virtual cpu core number is m
The first calculated performance parameter Ci when row;
Second computing unit is transported on the physical server of j model for calculating the virtual machine that the virtual cpu core number is m
The second calculated performance parameter Cj when row;
6th determination unit, 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 CN106155782A (en) | 2016-11-23 |
CN106155782B true 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) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108874534B (en) * | 2018-04-18 | 2022-09-16 | 华为技术有限公司 | Method and device for scheduling PCPU (physical packet Unit) resources |
CN114546637A (en) * | 2022-01-16 | 2022-05-27 | 华东师范大学 | Virtual machine distribution method with limited types |
Citations (4)
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 |
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 |
CN104156255A (en) * | 2014-07-31 | 2014-11-19 | 华为技术有限公司 | Virtual machine migration method, virtual machine migration device and source physical host |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8468230B2 (en) * | 2007-10-18 | 2013-06-18 | Fujitsu Limited | Method, apparatus and recording medium for migrating a virtual machine |
JP6044131B2 (en) * | 2012-06-25 | 2016-12-14 | 富士通株式会社 | Program, management server, and virtual machine migration control method |
-
2015
- 2015-04-09 CN CN201510165952.3A patent/CN106155782B/en active Active
Patent Citations (4)
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 |
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 |
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 |
---|
云计算环境下虚拟机实时迁移及负载均衡研究;姜雅楠;《中国优秀硕士学位论文全文数据库 信息科技辑》;20150228;I137-8 |
Also Published As
Publication number | Publication date |
---|---|
CN106155782A (en) | 2016-11-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Singh et al. | Task scheduling in cloud computing | |
EP3606008B1 (en) | Method and device for realizing resource scheduling | |
US20100306382A1 (en) | Server consolidation using virtual machine resource tradeoffs | |
Zhang et al. | Automatic memory control of multiple virtual machines on a consolidated server | |
US20150286504A1 (en) | Scheduling and execution of tasks | |
CN102801636B (en) | The method of cloud computing platform cloud mainframe network bandwidth restriction | |
US20140373010A1 (en) | Intelligent resource management for virtual machines | |
CN104615480A (en) | Virtual processor scheduling method based on NUMA high-performance network processor loads | |
CN113342534B (en) | Graphics processing resource allocation method, device, equipment and storage medium | |
WO2015032201A1 (en) | Virtual machine placing method and device | |
CN107624181B (en) | Virtual machine management method and apparatus including idling and scheduling of virtual processors | |
Ghribi | Energy efficient resource allocation in cloud computing environments | |
CN106155782B (en) | Virtual machine migration method and device | |
López-Pires et al. | An experimental comparison of algorithms for virtual machine placement considering many objectives | |
CN105653347B (en) | A kind of server, method for managing resource and virtual machine manager | |
US9575788B2 (en) | Hypervisor handling of processor hotplug requests | |
CN111367655B (en) | Method, system and storage medium for GPU resource scheduling in cloud computing environment | |
CN107423114A (en) | A kind of dynamic migration of virtual machine method based on classification of service | |
Shrivastava et al. | An energy efficient VM allocation using best fit decreasing minimum migration in cloud environment | |
Zhang et al. | Repeatable multi-dimensional virtual network embedding in cloud service platform | |
Raj et al. | Efficient resource allocation in resource provisioning policies over resource cloud communication paradigm | |
Di Stefano et al. | Improving the allocation of communication-intensive applications in clouds using time-related information | |
Wang et al. | A scheduling algorithm based on resource overcommitment in virtualization environments | |
CN111522637A (en) | Storm task scheduling method based on cost benefit | |
Dong et al. | Delayed best-fit task scheduling to reduce energy consumption in cloud data centers |
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 |