Summary of the invention
In view of this, the present invention provides a kind of cloud resource dynamic dispatching method, device and equipment, it is intended to solve existing void
Quasi- machine cannot dynamically carry out the problem of resource adjustment scheduling during operation.
On the one hand, the embodiment of the invention provides a kind of cloud resource dynamic dispatching methods, applied in cloud computing platform
Management end, the cloud computing platform include physical host cluster, the cluster virtual machine under several virtualized environment and described
Management end, which comprises
Periodically obtain performance data of the virtual machine before current time node;
According to the performance data of virtual machine, load estimation is carried out to virtual machine, obtains the load estimation knot of virtual machine
Fruit, for the load estimation further according to virtual machine as a result, carrying out load estimation to physical host, the load for obtaining physical host is pre-
Survey result;
According to the load estimation of virtual machine as a result, and combining that management end is prefabricated and/or user's input first is determined
Plan rule is made virtual machine to the virtual machine and is expanded when the virtual machine meets the decision condition of first decision rule
Appearance/expansion decision;
According to the load estimation of physical host as a result, and combine that management end is prefabricated and/or user's input second
Decision rule is made the physical host and is moved when the physical host meets the decision condition of second decision rule
Partial virtual machine decision out;
According to the load estimation of physical host as a result, and combining management end prefabricated and/or the third of user's input
Decision rule is made the physical host and is moved when the physical host meets the decision condition of the third decision rule
Whole virtual machine decisions out, and standby decision is made to the physical host;
According to the load estimation result summation of all physical hosts in open state, and combine management end prefabricated
And/or the 4th decision rule of user's input, when all physical host clusters in open state meet the 4th decision
When the decision condition of rule, wake-up decision is made to one or more physical host being in standby, and to the institute of wake-up
It states physical host and makes virtual machine and move into decision.
Second aspect, the embodiment of the invention provides a kind of cloud resource dynamic schedulers, comprising:
Module is obtained, for periodically obtaining performance data of the virtual machine before current time node;
Prediction module carries out load estimation to virtual machine, obtains virtual machine for the performance data according to virtual machine
Load estimation as a result, the load estimation further according to virtual machine as a result, carry out load estimation to physical host, obtains physics
The load estimation result of host;
First decision-making module, for according to the load estimation of virtual machine as a result, and combine management end prefabricated and/or
First decision rule of user's input, when the virtual machine meets the decision condition of first decision rule, to the void
Quasi- machine makes virtual machine dilatation/expansion decision;
Second decision-making module, for according to the load estimation of physical host as a result, and combine management end it is prefabricated and/
Or the second decision rule of user's input, when the physical host meets the decision condition of second decision rule, to institute
It states physical host and makes partial virtual machine decision of moving out;
Third decision-making module, for according to the load estimation of physical host as a result, and combine management end it is prefabricated and/
Or the third decision rule of user's input, when the physical host meets the decision condition of the third decision rule, to institute
It states physical host and makes whole virtual machine decisions of moving out, and standby decision is made to the physical host;And
4th decision-making module, for the load estimation result summation according to all physical hosts in open state, and
In conjunction with the 4th decision rule that management end is prefabricated and/or user inputs, when all physical host clusters in open state
When meeting the decision condition of the 4th decision rule, wake-up is made to one or more physical host being in standby and is determined
Plan, and virtual machine is made to the physical host of wake-up and moves into decision.
The third aspect, the embodiment of the invention provides a kind of cloud resource dynamic dispatching equipment, including memory, processor and
It is stored in the computer program that can be run on the memory and on a processor, the processor executes the computer program
When, realize cloud resource dynamic dispatching method provided in an embodiment of the present invention.
Compared with prior art, the invention has the following advantages:
1, cloud resource dynamic dispatching method provided in an embodiment of the present invention, first by obtaining virtual machine current time node
Preceding performance data calculates the load estimation of virtual machine and physical host as a result, then according to load estimation as a result, and combining
Management end is prefabricated and/or the decision rule of user's input, makes various for the adjustment of the cloud resource of virtual machine or physical host
Decision, such as virtual machine dilatation decision, virtual machine expand decision, virtual machine is moved out, and decision, virtual machine move into decision, physical host
Wake up decision or the standby decision of physical host.The above method passes through monitor full time cluster virtual machine, periodically availability
Energy data, and load estimation is calculated as a result, realizing to cloud resource so as to periodically make cloud resource adjustment decision
Dynamic adjusts.
2, since the load estimation result can reflect within a period of time in future, the variation feelings of virtual machine load
Condition and the situation of change of physical host load, therefore the cloud resource adjustment decision that control terminal is made with load estimation result has
There is the shortcomings that perspective, the hysteresis quality manually adjusted can be overcome.
3, the present invention is according to load estimation result and management end be prefabricated and/or the decision rule of user's input, to cloud
Resource has carried out the adjustment of the dynamic in three levels.In the present invention, virtual machine dilatation/expansion decision is made as void for virtual machine
The cloud resource dynamic of quasi- machine level adjusts, and can prevent the problem of cloud resource specification of virtual machine is needed lower than business, again
The problem of can preventing the cloud resource specification of virtual machine from needing much higher than business, cloud resource is caused to waste.In the present invention, for object
Reason host make partial virtual machine decision of moving out be virtual machine to physical host mapping level cloud resource dynamic adjustment, can be with
Move to the physical host that will be overloaded on the physical host that will not be overloaded partial virtual machine, with balanced each physical host
Load.In the present invention, wake-up/standby decision for physical host is that the cloud resource dynamic of physical host level adjusts, can be with
Reach using less physical host and meet current virtual machine service, with the effect for improving resource utilization, reducing energy consumption.
Specific embodiment
A specific embodiment of the invention is described below, which is schematical, it is intended to disclose of the invention
Specific work process should not be understood as further limiting scope of protection of the claims.
As shown in Figure 1, providing a kind of cloud resource dynamic dispatching method, the method is applied to the pipe in cloud computing platform
Manage end.As shown in Fig. 2, the cloud computing platform mainly includes virtual under physical host cluster 10, several virtualized environment
Machine cluster 20 and the management end 30 additionally can according to need and be equipped with load balancer 40, database 50, firewall
60, router 70 and intruding detection system 80 etc..For example, the cloud computing platform may include under following various virtualized environments
It is any several in cluster virtual machine: VMware cluster virtual machine, KVM cluster virtual machine, XEN cluster virtual machine, Power VM
Cluster virtual machine, HyperV cluster virtual machine.The cluster virtual machine and phase that the cloud computing platform bottom passes through management isomery
The network answered, storage facility provide virtualization resource, core is completed in management end and manages function, and pass through load balancer
Externally to provide cloud service.The service (such as console service, auxiliary storage service) of some specific uses, because its importance with
And independence, it can be listed in figure with individual in the left side of infrastructure.In addition to this, other kernel services, such as
The functions such as high availability management, multi-tenant service, charging audit and this paper resource dynamic dispatching all give reality in management end
It is existing.
For cloud computing platform, the method that embodiment provides periodically is obtained by monitor full time cluster virtual machine
Performance data is taken, and calculates load estimation accordingly as a result, so as to periodically make cloud resource adjustment decision, realization pair
Dynamically adjust to cloud resource.As shown in Figure 1, described method includes following steps:
Step 101, performance data of the virtual machine before current time node is periodically obtained.
In the embodiment of the present invention, the management end monitor full time cluster virtual machine of cloud computing platform and physical machine cluster
Runnability, specifically, management end can be by the cloud resource utilization rate of monitoring virtual machine, to reflect the runnability of virtual machine.
In lasting monitoring period, management end periodically obtains the performance data.For step 101, the embodiment of the present invention provide with
The citing of lower specific embodiment:
Management end periodically sends data acquisition instructions to each virtual machine under different virtualized environments.As an example,
The cluster virtual machine being currently running in cloud computing platform includes VMware cluster virtual machine, XEN cluster virtual machine and KVM virtual machine
Cluster.Management end obtains each physical host and the thereon performance of the CPU of virtual machine, memory, disk read-write, net reading and writing respectively
Data, these data respectively from vCenter API of VMware, the XAPI of XenServer and KVM libvirt API,
Wherein API (Application Programming Interface) is application programming interface.Under above-mentioned each virtual environment
Cluster virtual machine in, XEN can by direct far call XAPI, VMware can by direct far call vCenter API, and
KVM needs to install special broker program in physical host port, executes what management end issued to establish after communication connection with management end
Control order.Management end calls the XAPI of XEN by XML-RPC agreement (distributed computing protocol of remote procedure call);Pipe
Manage the vCenter API that VMware is called at end by soap protocol (Simple Object Access Protocol);It is needed between management end and KVM
The instruction needed to be implemented and return are encapsulated in a manner of Commands/Answers the Java NIO pipeline established in advance
As a result.Above-mentioned example explanation, management end establish the mode communicated and management end to each with the virtual machine under each virtualized environment
The instruction that virtual machine under virtualized environment is sent, should be adapted with each virtualized environment.Since cloud provided by the invention provides
Source dispatching method is applicable to the cluster virtual machine of isomery, therefore it can be applied to a variety of cloud computing platforms, has preferable
Universality.
Management end receives the initial data of each virtual machine, and pre-processes to the initial data of each virtual machine
And normalized, obtain the performance data.As an example, initial data refer to without pretreatment and normalized it is anti-
Reflect the data of virtual machine performance.In view of there are many virtual machines under virtualized environment for possible configuration on a physical host, often
The format disunity of the initial data of kind virtual machine, for the subsequent load estimation for calculating physical host, it is therefore necessary to
Various initial data are pre-processed and normalized.As an example, the pretreatment and normalization may particularly include to original
Cleaning (such as noise processed), conversion, specification and the integration that data carry out.For example, some virtualization technologies are inconvenient to obtain
The timely rate of network, but the history read-write total amount of network can be obtained, at this point, can be according to the network history obtained twice
Read-write total amount and time interval between the two obtain instant read and write rate of the network in this time interval indirectly.With
The shortening of time interval, obtained indirect consequence more can accurately reflect the instant read and write rate of network in the short time.
The performance data is carried out persistent storage by management end.By by performance data persistence, in case subsequent lookup
With use.As an example, management end is converted data, polymerize and stored, and additions and deletions easily can be carried out to data and looked into
Change.
In addition, management end can also visualize the performance data, make cloud computing platform can by instrument board and its
His user interface shows various achievement datas, particularly, to be opened up respectively for different fine-grained monitoring datas
Show to meet the needs of users.
Step 102, according to the performance data of virtual machine, load estimation is carried out to virtual machine, obtains the negative of virtual machine
Prediction result is carried, the load estimation further according to virtual machine obtains physical host as a result, to physical host progress load estimation
Load estimation result.
In the embodiment of the present invention, management end needs according to specific circumstances, to select prediction model appropriate to carry out timing pre-
It surveys, i.e. load estimation, to obtain the load estimation of respective virtual machine as a result, calculating the load estimation of respective physical host in turn
As a result, the state change of prediction virtual machine and physical host before next dispatching cycle.Such as in the embodiment of the present invention, specifically
It can reflect load estimation result with load estimation curve.Such as in the embodiment of the present invention, specifically can with resource utilization this
One performance monitoring data comes as the indirect feedback of load using at this point, being the prediction to load to the prediction of resource utilization.
For step 102, the embodiment of the present invention provides the citing of following specific embodiments, to calculate the load estimation knot of virtual machine
Fruit:
As shown in figure 3, showing the flow diagram of load predicting method.Step 201, prediction model selects, specially
Can change with time trend according to performance data, select prediction model;Step 202, estimate Model Parameter value, specially
The unknown parameter in the prediction model is estimated using historical data;Step 203, model testing, specially using
The prediction model for estimating the unknown parameter is fitted historical data, according to fitting effect to the prediction model
It tests, if fitting effect reselects prediction model lower than expection;Step 205, load estimation, if being specially fitted
Effect, which is higher than, is expected, then the load estimation result of the virtual machine is calculated using the prediction model and the performance data.
In addition, it can include step 204, model optimization can also execute prediction if specially fitting effect is higher than expection
It is formed in the process according to next observation optimal prediction model, adjusts the valuation of Model Parameter.
More specifically, such as corresponding prediction model can be selected in the following manner.Such as performance data is with linear
The time series of trend can preferentially select linear double smoothing pattern type as prediction model;Such as performance data is small
The data such as sample, non-linear, high dimension, can preferentially select Gaussian process pattern type as prediction model.
In above-mentioned specific embodiment, the load estimation of virtual machine has been calculated using prediction model as a result, the present invention is real
It applies example and the citing of following specific embodiments is also provided, to calculate the load estimation result of physical machine:
In view of the resource of physical host in cloud computing platform is mainly to create virtual machine, finally in the form of virtual machine
Service is externally provided.So to the load estimation of physical host, it is only necessary to consider the load estimation result of all virtual machines thereon
.Such as present embodiment reflects load estimation with resource utilization this performance monitoring data, then for physics
The prediction of the resource utilization status of host only needs to consider the prediction result of resources of virtual machine utilization rate thereon.It is also contemplated that
Although virtualization technology itself needs to occupy certain resource on physical host, the maximum value of this part resource is pacified in first time
It installs into and just has determined (such as Dom0 resource specification etc. of XenServer configuration) later, and this part resource is relatively whole
Very little is influenced for physical host resource.Whole physical resource ratio smaller (such as 3% or less) is occupied in virtualization technology
In the case of, this part resource utilization rate can be ignored.
Based on above-mentioned consideration, in present embodiment, the load estimation knot of whole virtual machines on physical host is obtained
Fruit;It sums to acquired whole load estimation results, obtains the load estimation initial results of the physical host.I.e. with physics
The summation of the load estimation result of all virtual machines on host, the load estimation initial results as physical host.For example, object
All virtual machines all have calculated that the load estimation about CPU usage as a result, then by above-mentioned all virtual machines on reason host
CPU usage it is accumulative after load estimation initial results about CPU usage of the end value as physical host;It should manage
Solution, for physical host about the load estimations initial results such as network rate, memory usage, disk utilization rate,
It is calculated according to the method being equal with the example above.
Although it is also contemplated that virtual machine performance short-term prediction very close true observation, but still can exist and miss
Difference.Slightly higher load estimation at least meets virtual machine service quality assurance, and slightly lower load estimation may result in virtually
Machine quality of service guarantee is unable to satisfy.It, can in present embodiment in order to which redundant error is to guarantee virtual machine service quality
With the load estimation result to load estimation initial results multiplied by the correction factor for being greater than 1, as final physical host.Its
In, the determination method of correction factor are as follows: according to the size of the load estimation initial results of the physical host, map out corresponding
Correction factor.For example, using the prediction of resource utilization as the prediction to load, it can be by physical resource in present embodiment
Utilization rate is divided into several shelves in the form of configuration file and (is formulated according to actual physics host resource total amount by administrator and repaired accordingly
Positive coefficient), as shown in table 1, when calculating the resource utilization prediction result of physical host, according to the resource utilization of physical host
It predicts initial results size, corresponding correction factor is gone out with this Standard Map, so that the resource utilization to physical host is predicted
Initial results carry out redundancy amendment, obtain the resource utilization prediction result of final physical host.It should be appreciated that 1 institute of table
The stepping section shown and correction factor numerical value do not limit the present invention only as the citing of one of several embodiment.
1 physical host resource utilization correction factor configuration file example table of table
Step 103, according to the load estimation of virtual machine as a result, and combining management end prefabricated and/or user's input
The first decision rule the virtual machine is made when the virtual machine meets the decision condition of first decision rule
Virtual machine dilatation/expansion decision.
Specifically, management end obtains the load estimation result of virtual machine;Judge whether the virtual machine will be in the load
It overloads in predicted time section corresponding to prediction result;If by overloading, according to the management end it is prefabricated and/or
First decision rule of user's input, makes dilatation/expansion decision to the virtual machine.For example, with the prediction of resource utilization
When as to the prediction of load, the resource utilization curve of virtual machine will be chronically at peak state, and the resource of peak state
Utilization rate has exceeded the preset threshold value of administrator, when can judge virtual machine accordingly for corresponding to the load estimation result
Between overload in section.The first decision rule that at this time can be prefabricated according to management end, makes dilatation/expansion to the virtual machine
Decision;Warning message can also be sent to user, and receive the first decision rule of user feedback, further according to first decision
Rule makes dilatation/expansion decision to the virtual machine;It can also first attempt to be done according to the first prefabricated decision rule of management end
Dilatation/expansion decision out, if cannot still be kept away after making dilatation/expansion decision according to the first prefabricated decision rule of management end
Exempt to overload, then will send warning message to user, and receive the first new decision rule of user feedback, thus defeated according to user
The the first new decision rule entered further makes dilatation/expansion decision.
As an example, first decision rule can be the overloading ratio according to the overload moment, the dilatation of virtual machine is advised
Lattice are calculated, and if overloading ratio is 20%, then the cloud resource specification of virtual machine are extended for 1.2 times of existing cloud resource specification.
As an example, the decision rule can also calculate virtual machine expansion amount according to the overloading ratio at overload moment, such as overload
Rate is 85%, then can link clone one former virtual machine with load sharing.In addition, management end can also pass through prefabricated rule
Clearly to be specifically selection dilatation decision, or expand decision, as selected dilatation decision when overloading ratio is lower, when overloading ratio is higher
Decision is expanded in selection.
It should be appreciated that management end can also according to the load estimation of virtual machine as a result, and combine management end it is prefabricated and/
Or the first decision rule of user's input, compression decision is made to the cloud resource specification of virtual machine, or do to virtual machine quantity
Reduce decision out.Such as when the load estimation of virtual machine is the result shows that the load of virtual machine will be in next precursor dispatching cycle under
Drop, cause the cloud resource utilization rate of virtual machine relatively low, then can the cloud resource specification to virtual machine make compression decision.
Step 104, according to the load estimation of physical host as a result, and combination management end is prefabricated and/or user is defeated
The second decision rule entered, when the physical host meets the decision condition of second decision rule, to the physics master
Machine makes partial virtual machine decision of moving out.
Specifically, management end obtains the load estimation result of physical host;Judge whether the physical host will be described
It overloads in predicted time section corresponding to load estimation result;If by overloading, according to management end it is prefabricated and/or
Second decision rule of user's input, makes partial virtual machine decision of moving out to the physical host.
For example, referring to table 2, table 2 is physical host resource utilization correction result example, is made with the prediction of resource utilization
For the prediction to load.In this example, there are 6 time series forecasting initial results before resource dynamic scheduling period next time, respectively
It is multiplied to obtain revised time series forecasting result with it using the configuration of above-mentioned correction factor.Physical host overload detection exactly utilizes
The threshold value that these revised results and administrator specify predicts whether to have the overload condition beyond threshold value and occurs.If
Prediction physical host will overload, and provide specific overload time of origin prediction result.Then it makes from the physical host
In move out the decision of partial virtual machine, overload to avoid physical host.As an example, in table 2 first timing point it is pre-
Surveying initial results is 25%, according to the correction factor configuration file that table 1 provides, 25% fall into [20%, 30%) section, it maps out
The correction factor of the prediction initial results is 1.35, therefore the final prediction result of physical host is 25% to multiply with 1.35
Product, as 34%.As an example, the threshold value that administrator specifies is 85%, then according to the prediction result of table 2, the physical host
It will overload at the 4th timing point.
2 physical host resource utilization correction result sample table of table
More specifically, physical host can select when to external migration virtual machine according to the respective transit time cost of virtual machine
Corresponding virtual machine is selected to move out.Wherein the transit time cost of virtual machine is the time spent needed for the virtual machine is moved out.
It is implemented as follows:
The transit time cost of each virtual machine on the physical host is calculated, and according to transit time cost ascending or descending order
Arrange each virtual machine.Specifically, can learn transit time and virtual machine using linear regression by the analysis to running log
Memory size be positively correlated.Therefore it can be directed to different cluster environment (hypervisor), returned by testing in advance using linear
The model returned carries out parameter Estimation, obtains corresponding transit time cost Calculating model, each virtual so as to calculate
The transit time cost of machine.
Each virtual machine is traversed, determines a quasi- virtual machine of moving out, decision of moving out is made to the quasi- virtual machine of moving out, it is described
The condition that quasi- virtual machine of moving out should meet are as follows: the quasi- virtual machine of moving out can be completed to move before physical host overloads
It moves, and the physical host after migration can be made no longer to overload at the time of original prediction overloads.As an example, can
With according to transit time cost from small to large/each virtual machine of order traversal from big to small, meet as long as one can be searched out
The virtual machine of condition is stated, can stop traversing, and make the decision that the virtual machine is moved out.
If selecting transit time on the virtual machine there is no the virtual machine for meeting above-mentioned condition on the physical host
The smallest virtual machine of cost is used as by virtual machine of moving out, and is made and moved out certainly to the smallest virtual machine of transit time cost
Plan.As an example, can be after making the decision that the smallest virtual machine of transit time cost is moved out, then traversed, with true
Surely meet the virtual machine of above-mentioned condition;Can also after making the decision that the smallest virtual machine of transit time cost is moved out, then
The virtual machine small to transit time cost second makes decision of moving out, until it will not overload.It should be appreciated that above-mentioned
Two kinds of examples are only the citing in numerous embodiments, do not limit the present invention.Such as the present invention can also will be migrated making
After the decision that the smallest virtual machine of time cost is moved out, remaining decision is not done.
After the virtual machine of moving out that selected needs are moved out, need for its specified physical host to be moved to.The application can
Selection can accommodate this virtual machine without in all physical hosts for overloading, the least physical host conduct of surplus resources
The purpose physical host to be moved to.Need to start the physics master of an idle standby mode if without such physical host
Machine host as a purpose, or alarm is directly transmitted to administrator.The beneficial effect of the mode of above-mentioned selection purpose physical host
It is, can maximumlly improves the resource utilization of each physical host in physical host cluster, and does not will cause physics master again
Machine overload.
In addition, the migration decision of virtual machine can also be adjusted virtual machine (vm) migration decision after considering other factors.
Such as the close virtual machine of cyberrelationship is deployed in as far as possible on same physical host;Mutually redundant Database Virtual Machine is as far as possible
It is deployed on different physical hosts;Resource classification is carried out according to hardware reliability etc. to physical host, runs the void of key business
Quasi- machine is deployed on high-grade physical host etc. as far as possible.
Step 105, according to the load estimation of physical host as a result, and combination management end is prefabricated and/or user is defeated
The third decision rule entered, when the physical host meets the decision condition of the third decision rule, to the physics master
Machine makes whole virtual machine decisions of moving out, and makes standby decision to the physical host.
Wherein, physical host is standby primarily to meet current virtual machine service using less physical host, with
It improves resource utilization, reduce energy consumption.Based on this, the present invention analyzes all physical hosts for being not previously predicted overload,
Determine that all virtual machines on which physical host can move to other physical hosts, and then can be standby by this physical host.
As an example, using the prediction of physical host resource utilization as the prediction loaded to physical host, it can be to cloud
All physical hosts in open state are on Resource Calculation platform with the arrangement of resource utilization ascending or descending order;Then by resource
Whole virtual machines on the minimum physical host of utilization rate move to the highest one or more physical hosts of resource utilization, and protect
The physical host that card moves into virtual machine will not overload;It again will be all virtual on the next to the lowest physical host of resource utilization
Machine moves to the higher physical host of remaining resource utilization, and guarantees that the physical host for moving into virtual machine will not overload.
Step 106, according to the load estimation result summation of all physical hosts in open state, and management end is combined
4th decision rule of prefabricated and/or user input, when all physical host clusters in open state meet described the
When the decision condition of four decision rules, wake-up decision made to one or more physical host being in standby, and to calling out
The awake physical host makes virtual machine and moves into decision.
Specifically, management end obtains the load estimation result of each physical host;Calculate the load estimation of all physical hosts
As a result summation, the load estimation result as the physical host cluster;Judge whether the physical host cluster will be described
It overloads in predicted time section corresponding to load estimation result;If by overloading, according to management end it is prefabricated and/or
4th decision rule of user's input makes wake-up decision to one or more physical host being in standby, and to calling out
The awake physical host makes virtual machine and moves into decision, so that physical host cluster resource utilization rate drops under threshold value.
Presented above includes method of the step 101 to step 106, passes through monitor full time cluster virtual machine, week
Performance data is obtained to phase property, and calculates load estimation as a result, so as to periodically make cloud resource adjustment decision, in fact
Now to cloud resource dynamic adjusts.
As an example, for the various decisions that above-mentioned steps 103 and step 104 are made, such as when physical host will not
When the virtual machine on overload and physical host occurs by overloading, virtual machine can be carried out directly on the physical host
Dilatation/expansion;Such as when physical host will occur overload and physical host on virtual machine also by overloading when, Ke Yixian
Carry out virtual machine (vm) migration operation, then again to need dilatation/expansion virtual machine carry out dilatation/expansion.For above-mentioned steps 105
The various decisions made with step 106, for example, can after executing the step 103 and the various decisions made of step 104,
The various decisions that step 105 and step 106 are made are executed again;Such as portion of moving out made by step 104 can also executed
When point virtual machine decision, as described above, may be selected can to accommodate this virtual machine without in all physical hosts for overloading,
The least physical host of surplus resources is as the purpose physical host to be moved to, the method for above-mentioned selection purpose physical host, i.e.,
Consider step 105 and step 106.
In addition, it is contemplated that the present invention can be comprising steps of the virtual machine dilatation decision ought be made, virtual machine expansion is determined
Plan, virtual machine move out decision or after virtual machine move into decision, according to the virtualized environment of virtual machine corresponding to each decision, by institute
It states decision and is mapped to corresponding instruction, and described instruction is sent into the virtualization layer where the virtual machine.
Command mappings are to be mapped to implement the decision that cloud resource dynamic dispatching is made according to specific virtualized environment
Correctly instruction execute instruction can in virtualization layer.The decision is parsed into corresponding virtualization technology by virtualization layer
API。
Referring to shown in Fig. 4, a kind of cloud resource dynamic scheduler is provided, applied to the management end of cloud computing platform, institute
Stating cloud resource dynamic scheduler includes:
Module 701 is obtained, for periodically obtaining performance data of the virtual machine before current time node;
Prediction module 702 carries out load estimation to virtual machine, obtains void for the performance data according to virtual machine
The load estimation of quasi- machine is as a result, the load estimation further according to virtual machine obtains as a result, to physical host progress load estimation
The load estimation result of physical host;
First decision-making module 703, for the load estimation according to virtual machine as a result, and combining management end prefabricated
And/or the first decision rule of user's input, when the virtual machine meets the decision condition of first decision rule, to institute
It states virtual machine and makes virtual machine dilatation/expansion decision;
Second decision-making module 704, for the load estimation according to physical host as a result, and combining management end prefabricated
And/or the second decision rule of user's input, it is right when the physical host meets the decision condition of second decision rule
The physical host makes partial virtual machine decision of moving out;
Third decision-making module 705, for the load estimation according to physical host as a result, and combining management end prefabricated
And/or the third decision rule of user's input, it is right when the physical host meets the decision condition of the third decision rule
The physical host makes whole virtual machine decisions of moving out, and makes standby decision to the physical host;And
4th decision-making module 706, for the load estimation result summation according to all physical hosts in open state,
And combine management end prefabricated and/or the 4th decision rule of user's input, when all physical host collection in open state
When group meets the decision condition of the 4th decision rule, wake-up is made to one or more physical host being in standby
Decision, and virtual machine is made to the physical host of wake-up and moves into decision.
Optionally, referring to Figure 5, on the basis of above-mentioned Fig. 4, the cloud resource dynamic scheduler can also include
Mapping block 707, the mapping block 707, which is used to work as, makes the virtual machine dilatation decision, virtual machine expansion decision, virtual machine
After decision of moving out or virtual machine move into decision, according to the virtualized environment of virtual machine corresponding to each decision, the decision is reflected
Corresponding instruction is penetrated into, and described instruction is sent into the virtualization layer where the virtual machine.
Optionally, on the basis of above-mentioned Fig. 4, the acquisition module 701 be may particularly include:
Sending module, for periodically sending data acquisition instructions to each virtual machine under different virtualized environments;
Receiving module, for receiving the initial data of each virtual machine, and to the initial data of each virtual machine into
Row pretreatment and normalized, obtain the performance data;And
Persistence module, for the performance data to be carried out persistent storage.
Optionally, on the basis of above-mentioned Fig. 4, the prediction module 702 may particularly include the first sub- prediction module and
Two sub- prediction modules.
Wherein, the described first sub- prediction module may particularly include:
Model selection module, for selecting prediction model, and using historical data to the unknown ginseng in the prediction model
Number is estimated;And
Virtual machine loads computing module, for utilizing the prediction model for having estimated the unknown parameter to history number
It according to being fitted, is tested according to fitting effect to the prediction model, if fitting effect reselects pre- lower than expection
Model is surveyed, is expected if fitting effect is higher than, calculates the virtual machine using the prediction model and the performance data
Load estimation result.
Wherein, the described second sub- prediction module may particularly include:
Summation module, for obtaining the load estimation of whole virtual machines on the physical host as a result, and to acquired
Whole load estimation results summation, obtain the load estimation initial results of the physical host;
Mapping block is mapped out and is repaired accordingly for the size according to the load estimation initial results of the physical host
Positive coefficient, the correction factor are greater than 1;And
Physical host loads computing module, for by the product of the load estimation initial results and the correction factor,
Load estimation result as the physical host.
Optionally, on the basis of above-mentioned Fig. 4, first decision-making module 703 be may particularly include:
Judgment module, for obtaining the load estimation of virtual machine as a result, and judging whether the virtual machine will be described negative
It carries and overloads in predicted time section corresponding to prediction result;And
Decision-making block, it is prefabricated according to the management end for when the judgment module, which will be judged, to overload
And/or user input the first decision rule, dilatation/expansion decision is made to the virtual machine.
Optionally, on the basis of above-mentioned Fig. 4, second decision-making module 704 be may particularly include:
Judgment module, for obtaining the load estimation of physical host as a result, and judging whether the physical host will be in institute
It states and overloads in predicted time section corresponding to load estimation result;And
Decision-making block, for when the judgment module, which will be judged, to overload, according to management end it is prefabricated and/
Or the second decision rule of user's input, partial virtual machine decision of moving out is made to the physical host.
In addition, second decision-making module 704 can also include:
Transit time cost computing module, for calculating the transit time cost of each virtual machine on the physical host, and
Each virtual machine is arranged according to transit time cost ascending or descending order;
Spider module determines a quasi- virtual machine of moving out, makes to the quasi- virtual machine of moving out for traversing each virtual machine
It moves out decision, the condition that the quasi- virtual machine of moving out should meet are as follows: the quasi- virtual machine of moving out can occur super in physical host
Migration is completed before carrying, and the physical host after migration can be made no longer super at the time of original prediction overloads
It carries;And
Spare decision-making module, for when the virtual machine for meeting above-mentioned condition is not present on the physical host, then selecting
The smallest virtual machine of transit time cost is used as by virtual machine of moving out on the virtual machine, and minimum to the transit time cost
Virtual machine make decision of moving out.
Optionally, on the basis of above-mentioned Fig. 4, the 4th decision-making module 706 be may particularly include:
Cluster load estimation result computing module, for obtaining the load estimation of each physical host as a result, and calculating all
The load estimation result summation of physical host, the load estimation result as the physical host cluster;
Judgment module, for judging the physical host cluster whether by the prediction corresponding to the load estimation result
It overloads in period;And
Decision-making block, for when the judgment module, which will be judged, to overload, according to management end it is prefabricated and/
Or the 4th decision rule of user's input, wake-up decision is made to one or more physical host being in standby, and right
The physical host waken up makes virtual machine and moves into decision.
Cloud resource dynamic scheduler provided in an embodiment of the present invention can realize management end in any of the above-described embodiment of the method
The each process realized, to avoid repeating, which is not described herein again.
In addition, the embodiment of the invention also provides a kind of cloud resource dynamic dispatching equipment comprising memory, processor and
It is stored in the computer program that can be run on the memory and on a processor, the processor executes the computer program
When, it can be achieved that each process that management end is realized in any of the above-described embodiment of the method.
In the instructions provided here, numerous specific details are set forth.It is to be appreciated, however, that implementation of the invention
Example can be practiced without these specific details.In some instances, well known method, structure is not been shown in detail
And technology, so as not to obscure the understanding of this specification.
Similarly, it should be understood that in order to simplify the disclosure and help to understand one or more of the various inventive aspects, In
Above in the description of exemplary embodiment of the present invention, each feature of the invention is grouped together into single implementation sometimes
In example, figure or descriptions thereof.However, the disclosed method should not be interpreted as reflecting the following intention: i.e. required to protect
Shield the present invention claims features more more than feature expressly recited in each claim.More precisely, as following
Claims reflect as, inventive aspect is all features less than single embodiment disclosed above.Therefore,
Thus the claims for following specific embodiment are expressly incorporated in the specific embodiment, wherein each claim itself
All as a separate embodiment of the present invention.
Those skilled in the art will understand that can be carried out adaptively to the module in the equipment in embodiment
Change and they are arranged in one or more devices different from this embodiment.It can be the module or list in embodiment
Member or component are combined into a module or unit or component, and furthermore they can be divided into multiple submodule or subelement or
Sub-component.Other than such feature and/or at least some of process or unit exclude each other, it can use any
Combination is to all features disclosed in this specification (including adjoint claim, abstract and attached drawing) and so disclosed
All process or units of what method or apparatus are combined.Unless expressly stated otherwise, this specification is (including adjoint power
Benefit require, abstract and attached drawing) disclosed in each feature can carry out generation with an alternative feature that provides the same, equivalent, or similar purpose
It replaces.
In addition, it will be appreciated by those of skill in the art that although some embodiments described herein include other embodiments
In included certain features rather than other feature, but the combination of the feature of different embodiments mean it is of the invention
Within the scope of and form different embodiments.For example, in the following claims, embodiment claimed is appointed
Meaning one of can in any combination mode come using.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and ability
Field technique personnel can be designed alternative embodiment without departing from the scope of the appended claims.In the claims,
Any reference symbol between parentheses should not be configured to limitations on claims.Word "comprising" does not exclude the presence of not
Element or step listed in the claims.Word "a" or "an" located in front of the element does not exclude the presence of multiple such
Element.The present invention can be by means of including the hardware of several different elements and being come by means of properly programmed computer real
It is existing.In the unit claims listing several devices, several in these devices can be through the same hardware branch
To embody.The use of word first, second, and third does not indicate any sequence.These words can be explained and be run after fame
Claim.