Invention content
The present invention provides a kind of strategy scheduling system and method for cloud computing, to solve how to ensure scheduling strategy
It is flexible setting, rational management resources of virtual machine the technical issues of.
In order to solve the above technical problems, the present invention provides a kind of tactful scheduling system for cloud computing, the system
Including tactful configuration module, monitoring module, tactful scheduler module and policy enforcement module, wherein
The strategy configuration module, for configuration pin to the strategy of target virtual machine in cloud computing resource pool;
The monitoring module monitors the target virtual machine for knowing the target virtual machine from tactful configuration module
Performance parameter, and the performance parameter is sent to tactful scheduler module;
The strategy scheduler module, for judging whether the target virtual machine performance parameter from the monitoring module meets
The trigger condition of strategy corresponding with the target virtual machine, and meet and the target virtual machine pair in target virtual machine performance parameter
When the trigger condition for the strategy answered, request message is sent out to policy enforcement module;
The policy enforcement module, after receiving the request message from tactful scheduler module, implementation strategy configuration
The strategy for meeting the trigger condition of module configuration.
Further, the strategy of the tactful configuration module configuration includes one or more of:EVM(extended virtual machine), contraction
Virtual machine, virtual machine alarm record and virtual machine alarm notification;
The strategy of the strategy configuration module configuration, which forms, includes:Target virtual machine, tactful trigger condition and policy action.
Further, the tactful configuration module, whether the strategy for being additionally operable to detection configuration clashes, and is detecting
The strategy for going out configuration does not have normally to indicate to the monitoring module sending strategy under conditions of conflicting;
The monitoring module is additionally operable to after receiving the normal instruction of the strategy from tactful configuration module, matches from strategy
It sets module and knows target virtual machine.
Further, the strategy composition of the tactful configuration module configuration further includes:Continuously meet this strategy trigger condition
Number;
The strategy scheduler module, is additionally operable in the case where target virtual machine performance parameter meets the trigger condition,
Statistics continuously meets the number of this strategy trigger condition, judges whether the number for continuously meeting this strategy trigger condition reaches default
Threshold value, in the case where the number for continuously meeting this strategy trigger condition reaches preset threshold value, just to execute described plan
Policy enforcement module slightly sends out request message.
Further, the tactful configuration module, same strategy is corresponded to for configuring multiple target virtual machines, described more
A target virtual machine forms target virtual machine list;
The monitoring module, for the property every the virtual machine for including in one section of predetermined period monitoring objective virtual machine list
It can parameter;
The policy enforcement module is additionally operable in the plan that the tactful configuration module is the configuration of the multiple target virtual machine
When slightly shrinking virtual machine, the policy action for including in the strategy configured according to configuration module executes contraction virtual machine strategy
Afterwards, the target virtual machine that the tactful configuration module forms the virtual machine of contraction from the multiple target virtual machine is informed about to arrange
It is deleted in table;And for being the multiple target virtual machine configuration strategy in the tactful configuration module it is EVM(extended virtual machine)
When, after the policy action that includes in the strategy configured according to configuration module executes EVM(extended virtual machine) strategy, inform about the plan
Slightly the virtual machine of extension is added to the target virtual machine list of the multiple target virtual machine composition by configuration module.
Further, the policy enforcement module is additionally operable in the tactful configuration module be that the multiple virtual machine is matched
The strategy set is when shrinking virtual machine, and the policy action for including in the strategy configured according to configuration module executes contraction virtual machine
Before strategy, the number of target virtual machine in the target virtual machine list is detected, being only more than the minimum of setting in the number matches
When setting target virtual machine number, just continues to execute and shrink virtual machine strategy.
In order to solve the above technical problems, the present invention also provides a kind of tactful dispatching method for cloud computing, the side
Method includes the following steps:
Strategy of the configuration pin to target virtual machine in cloud computing resource pool;
Monitor the performance parameter of the target virtual machine;
Judge whether the performance parameter of the target virtual machine meets the triggering item of strategy corresponding with the target virtual machine
Part executes full when the performance parameter of the target virtual machine meets the trigger condition of strategy corresponding with the target virtual machine
The strategy of the foot trigger condition.
Further, the strategy includes one or more of:EVM(extended virtual machine) shrinks virtual machine, virtual machine alarm
Record and virtual machine alarm notification;
The strategy, which forms, includes:Target virtual machine, tactful trigger condition and policy action.
Further, the method further includes:
After configuration pin is to the strategy of target virtual machine, whether the strategy for detecting configuration clashes, and is detecting configuration
Under conditions of strategy is without conflict, the performance parameter of monitoring objective virtual machine.
Further, it in the case where target virtual machine performance parameter meets the trigger condition, counts continuous and meets this
The number of tactful trigger condition, judges whether the number for continuously meeting this strategy trigger condition reaches preset threshold value, continuous
Meet this strategy trigger condition number reach preset threshold value in the case of, just execute this strategy.
Further, multiple target virtual machines are configured and correspond to same strategy, the multiple target virtual machine forms target
Virtual machine list;
Every the performance parameter for the target virtual machine for including in one section of predetermined period monitoring objective virtual machine list;
When the strategy configured for the multiple target virtual machine is to shrink virtual machine, virtual machine strategy is shunk executing
Afterwards, also the virtual machine of contraction is deleted from the target virtual machine list that the multiple target virtual machine forms;
When being EVM(extended virtual machine) for the multiple target virtual machine configuration strategy, after executing EVM(extended virtual machine) strategy,
The virtual machine of extension is also added to the target virtual machine list of the multiple target virtual machine composition.
Further, when the strategy for the multiple virtual machine configuration is to shrink virtual machine, virtual machine is shunk executing
Before strategy, the number of target virtual machine in the target virtual machine list is detected, being only more than the minimum of setting in the number matches
When setting target virtual machine number, just continues to execute and shrink virtual machine strategy.
Above-mentioned technical proposal can flexible Provisioning Policy;And the triggering of strategy is not only related with the performance of virtual machine, but also should
Performance is the current performance of virtual machine, ensures that scheduling strategy really reflects resource situation;Only to the virtual machine provided with strategy
Detection, avoids the unnecessary consumption of system.
Specific implementation mode
To make the objectives, technical solutions, and advantages of the present invention clearer, below in conjunction with attached drawing to the present invention
Embodiment be described in detail.It should be noted that in the absence of conflict, in the embodiment and embodiment in the application
Feature mutually can arbitrarily combine.
Fig. 1 is the strategy scheduling system module figure for cloud computing of the present embodiment.
The system includes tactful configuration module, monitoring module, tactful scheduler module and policy enforcement module, wherein
The strategy configuration module, for configuration pin to the strategy of target virtual machine in cloud computing resource pool;
The strategy of the strategy configuration module configuration may include one or more of:EVM(extended virtual machine), shrink virtual machine,
Virtual machine alarm record and virtual machine alarm notification;The strategy can be flexibly arranged by user's foundation practical application scene;
The strategy composition of the strategy configuration module configuration may include:Target virtual machine, tactful trigger condition and strategy are dynamic
Make;Certainly, tactful composition is not limited to the above-mentioned parameter enumerated, and may also include strategy mark (ID);Wherein, target virtual machine can
For a virtual machine or more virtual machines, when target virtual machine is more virtual machines, target virtual machine at this time is referred to as target
Virtual robot arm;
Above-mentioned policy action is corresponding, the plan such as when tactful configuration module configuration with the strategy of tactful configuration module configuration
Slightly EVM(extended virtual machine) when, corresponding policy action is to start new virtual machine, completes the initialization of the virtual machine, and load
Related application etc.;Such as when the strategy of tactful configuration module configuration is to shrink virtual machine, corresponding policy action is that closing is related
Using, cleaning virtual-machine data, release virtual machine etc.;
When the strategy of tactful configuration module configuration is to shrink virtual machine, it is empty that corresponding policy action may additionally include contraction
Before quasi- machine, the number of target virtual machine in the target virtual machine list is detected, being only more than the minimum of setting in the number matches
When setting target virtual machine number, contraction virtual machine operations are just continued to execute;It is all retracted to avoid target virtual machine, Wu Fabao
The application for demonstrate,proving user can normal operation;
When the strategy of tactful configuration module configuration is EVM(extended virtual machine), corresponding policy action may also include extension
Virtual machine is added to the target virtual machine list of the multiple target virtual machine composition, so that monitoring module is to the virtual machine of extension
Carry out performance monitoring;
When the strategy of tactful configuration module configuration is to shrink virtual machine, corresponding policy action may also include contraction
Virtual machine is deleted from the target virtual machine list that the multiple target virtual machine forms, to save void of the monitoring module to contraction
The monitoring of quasi- machine, avoids the unnecessary waste of system resource;
To ensure whether the availability of strategy, above-mentioned strategy configuration module, the strategy for being additionally operable to detection configuration clash,
And it is normally indicated to the monitoring module sending strategy under conditions of detecting that the strategy of configuration does not conflict.
The monitoring module monitors the property of the target virtual machine for knowing target virtual machine from tactful configuration module
Energy parameter, and the performance parameter is sent to tactful scheduler module;
In the case where whether tactful configuration module can be used for detecting the strategy configured and clashes, the monitoring module,
It is additionally operable to after receiving the normal instruction of the strategy from tactful configuration module, knows target virtual machine from tactful configuration module;
The performance for the virtual machine that above-mentioned monitoring module can include in one section of predetermined period monitoring objective virtual machine list
Parameter to obtain the performance condition of current goal virtual machine, and then ensures the validity and accuracy of strategy scheduling.
The strategy scheduler module, for judging whether the target virtual machine performance parameter from the monitoring module meets
The trigger condition of strategy corresponding with the target virtual machine, and meet and the target virtual machine pair in target virtual machine performance parameter
When the trigger condition for the strategy answered, request message is sent out to policy enforcement module;The request message may include strategy scheduling mould
The policy action corresponding with the trigger condition that block is obtained from tactful configuration module, or strategy mark corresponding with the trigger condition
Know;
The trigger condition can be preset virtual machine CPU usage, memory usage, hard disk utilization rate etc., this is touched
Clockwork spring part is obtained by tactful scheduler module from tactful configuration module;
The policy enforcement module, after receiving the request message from tactful scheduler module, implementation strategy configuration
The strategy for meeting the trigger condition of module configuration;
The policy enforcement module may include multiple strategy execution submodules, wherein each strategy execution submodule executes not
The strategy that Virtual Machine Manager submodule executes EVM(extended virtual machine), shrinks virtual machine is such as arranged in same strategy, and record alarm is arranged
Module executes virtual machine alarm record and virtual machine alarm notification strategy;
Policy enforcement module can be after receiving the request message, according to the plan for including in the strategy of configuration module configuration
It slightly acts this parameter and executes corresponding strategy;If including policy action in request message, policy enforcement module can direct root
According to the policy action implementation strategy;If in request message comprising strategy mark, policy enforcement module can according to strategy mark from
Tactful configuration module obtains corresponding policy action, then implementation strategy.
If the operation involved in the strategy that policy enforcement module executes to target virtual machine list, can be by policy enforcement module
It directly modifies to the target virtual machine list configured in tactful configuration module, can also be configured from policy enforcement module to strategy
Module sends the amendment advice for carrying strategy mark, then by tactful configuration module according to strategy mark to the destination virtual of configuration
Machine list is modified.
In other embodiments of the invention, it is removed in the composition of the strategy of tactful configuration module configuration and includes above-mentioned parameter
Outside, it also may include continuously meeting the number of this strategy trigger condition this parameter;
Tactful scheduler module at this time, in the case where target virtual machine performance parameter meets the trigger condition, statistics
Continuously meet the number of this strategy trigger condition, and continues to judge that this continuously meets whether the number of this strategy trigger condition reaches
Preset threshold value, in the case where the number for continuously meeting this strategy trigger condition reaches preset threshold value, just to described in execution
The policy enforcement module of this strategy sends out request message, can be reset at this time to the number for continuously meeting tactful trigger condition;In this way
Target virtual machine can be eliminated and erroneous judgement caused by peak value occur.If tactful scheduler module is judged continuously to meet the triggering of this strategy
The number of condition does not reach preset threshold value, to be reset to the number for continuously meeting this strategy trigger condition counted yet,
To ensure that the number of the tactful trigger condition of the satisfaction counted every time is the number for continuously meeting this strategy trigger condition.
Fig. 2 is the tactful dispatching method flow chart for cloud computing of the present embodiment.
Strategy of the S201 configuration pins to target virtual machine in cloud computing resource pool;
It can configure multiple target virtual machines and correspond to same strategy, the multiple target virtual machine composition target virtual machine row
Table;
The strategy includes one or more of:EVM(extended virtual machine) shrinks virtual machine, virtual machine alarm record and virtual
Machine alarm notification;
The strategy, which forms, includes:Target virtual machine, tactful trigger condition and policy action;
After executing step S201, whether the strategy of also detectable configuration clashes, and is detecting that the strategy of configuration do not have
Under conditions of having conflict, step S202 is executed;
S202 monitors the performance parameter of the target virtual machine;
The performance parameter for the target virtual machine for including in above-mentioned target virtual machine list can be monitored every one section of predetermined period;
S203 judges whether the performance parameter of the target virtual machine meets touching for strategy corresponding with the target virtual machine
Clockwork spring part executes if the performance parameter of the target virtual machine meets the trigger condition of strategy corresponding with the target virtual machine
Step S204;Otherwise, step S205 is executed;
In the case where target virtual machine performance parameter meets the trigger condition, it can also first count and continuously meet this strategy
The number of trigger condition, judges whether the number for continuously meeting this strategy trigger condition reaches preset threshold value, is continuously meeting
In the case that the number of this strategy trigger condition reaches preset threshold value, step S204 is executed;
S204 executes the strategy for meeting the trigger condition;
When the strategy for the multiple virtual machine configuration is to shrink virtual machine, before executing contraction virtual machine strategy, inspection
The number of target virtual machine in the target virtual machine list is surveyed, the minimalist configuration destination virtual of setting is only more than in the number
When machine number, just continues to execute and shrink virtual machine strategy;And execute shrink virtual machine strategy after, also by the virtual machine of contraction from
It is deleted in the target virtual machine list of the multiple target virtual machine composition;
When being EVM(extended virtual machine) for the multiple target virtual machine configuration strategy, after executing EVM(extended virtual machine) strategy,
The virtual machine of extension is also added to the target virtual machine list of the multiple target virtual machine composition.
S205 flows terminate.
One of ordinary skill in the art will appreciate that all or part of step in the above method can be instructed by program
Related hardware is completed, and described program can be stored in computer readable storage medium, such as read-only memory, disk or CD
Deng.Optionally, all or part of step of above-described embodiment can also be realized using one or more integrated circuits, accordingly
Ground, the form that hardware may be used in each module/unit in above-described embodiment are realized, the shape of software function module can also be used
Formula is realized.The present invention is not limited to the combinations of the hardware and software of any particular form.
It should be noted that the invention may also have other embodiments, without departing substantially from spirit of that invention and its essence
In the case of, those skilled in the art can make various corresponding change and deformations according to the present invention, but these are corresponding
Change and distortion should all belong to the protection domain of appended claims of the invention.