Summary of the invention
Technical problem to be solved by this invention is, provide a kind of under cloud computing environment the method for dynamic assignment resource, need the user initiatively to apply for the lower problem of VS treatment effeciency that resource causes to solve in the prior art.
Another object of the present invention is that above-mentioned design is applied in the concrete applied environment, provide a kind of under cloud computing environment the device of dynamic assignment resource, thereby guarantee the realization and the application of this method.
For solving the problems of the technologies described above, the embodiment of the invention provide a kind of under cloud computing environment the method for dynamic assignment resource, comprising:
After the user logins current virtual server VS, monitor said current VS in real time and be current task and distribute the performance performance number when obtaining in fact after the initial cloud resource;
Judge whether said real-time performance value reaches the first preset load threshold value; If; Then detecting said current VS continues to handle the required very first time of said current task; And whether judge the said very first time greater than the second preset time, if then be that said current VS distributes it to continue to handle the required extra cloud resource of said current task;
Wherein, said first load threshold value is the performance number of said current VS load when the heaviest, and said second time is the Preset Time of said current VS Resources allocation.
Preferably, also comprise:
After the user logined current virtual server VS, whether the resource utilization of monitoring said current VS in real time reached preset resource threshold, if then lock said current VS.
Preferably, said user is the enterprise customer, and said is that said current VS distributes it to continue to handle before the required extra cloud resource of said current task, also comprises:
Judge that whether the real-time performance value of other VS that belongs to a local area network (LAN) with said current VS is less than the second preset load threshold value, if be that said current VS distributes the required extra cloud resource of the continuation said current task of processing from said other VS then.
Preferably, said user is the enterprise customer, and said is that said current VS distributes it to continue to handle before the required extra cloud resource of said current task, also comprises:
Whether judgement is lock-out state with other VS that said current VS belongs to a local area network (LAN); If not; Judge that then whether the real-time performance value of other VS that belongs to a local area network (LAN) with said current VS is less than the second preset load threshold value; If be that said current VS distributes continuation to handle the required extra cloud resource of said current task then from said other VS.
Preferably, the step from said other VS are the required cloud resource of said current VS allocation process current task specifically comprises:
Choose a real-time performance value less than the VS of the second preset load threshold value as VS to be allocated; Judge whether the idle cloud resource of said VS to be allocated handles the required extra cloud resource of current task more than or equal to said continuation; If then directly be that said current VS distributes continuation to handle the required extra cloud resource of said current task from said VS to be allocated;
If not; Then the idle cloud resource of said VS to be allocated is all distributed to said current VS; Choose again next real-time performance value less than the VS of the second preset load threshold value as VS to be allocated; And whether carry out the said idle cloud resource of judging VS to be allocated more than or equal to the step that continues to handle the required extra cloud resource of current task, till can becoming the distribution of work to continue to handle the required extra cloud resource of current task for said current VS.
Preferably, said choose a real-time performance value less than the VS of the second preset load threshold value as VS to be allocated before, also comprise:
Obtain the routed path length information between said other VS and the current VS;
Then said choose a real-time performance value less than the VS of the second preset load threshold value as VS to be allocated, be specially:
Choose and said current VS between the shortest and real-time performance value of routed path less than other VS of the second preset load threshold value as VS to be allocated.
Preferably, under the situation of real-time performance value less than the 3rd preset load threshold value of the said VS that monitoring in real time obtains, said method also comprises:
Discharge the required extra cloud resource of said processing current task that continues distribution.
The embodiment of the invention also provide a kind of under cloud computing environment the device of dynamic assignment resource, comprising:
Real-time monitoring module is used for after the user logins current virtual server VS, monitors said current VS in real time and is current task and distribute the performance performance number when obtaining in fact after the initial cloud resource;
First judge module is used to judge whether said real-time performance value reaches the first preset load threshold value; Said first load threshold value is the performance number of said current VS load when the heaviest;
The time detecting module, the result who is used at said first judge module is under the situation that is, detects said current VS and continues to handle the required very first time of said current task;
Second judge module is used to judge that whether the said very first time is greater than the second preset time; Said second time is the Preset Time of said current VS Resources allocation;
Distribution module, the result who is used at said second judge module is under the situation that is, continues to handle the required extra cloud resource of said current task for said current VS distributes it.
Preferably, also comprise:
Locking module is used for locking when resource utilization at said current VS reaches preset resource threshold said current VS.
Preferably, also comprise:
The 4th judge module is used to judge that whether the real-time performance value of other VS that belongs to a local area network (LAN) with said current VS is less than the second preset load threshold value;
Trigger module, the result who is used at said the 4th judge module is under the situation that is, triggers said distribution module and continues to handle the required extra cloud resource of said current task from said other VS for said current VS distributes.
Preferably, also comprise:
The 3rd judge module is used to judge whether other VS that belong to a local area network (LAN) with said current VS are lock-out state;
The 4th judge module, be used for the result of said the 3rd judge module for situation not under, judge that whether the real-time performance value of other VS that belongs to a local area network (LAN) with said current VS is less than the second preset load threshold value;
Trigger module, the result who is used at said the 4th judge module is under the situation that is, triggers said distribution module and continues to handle the required extra cloud resource of said current task from said other VS for said current VS distributes.
Preferably, said trigger module specifically comprises:
Choose submodule, be used to choose a real-time performance value less than the VS of the second preset load threshold value as VS to be allocated;
First judges submodule, and whether the idle cloud resource that is used to judge said VS to be allocated is more than or equal to continuing to handle the required extra cloud resource of current task;
Distribution sub module is used for judging that said first the result of submodule is under the situation that is, directly is that said current VS distributes continuation to handle the required extra cloud resource of said current task from said VS to be allocated;
Trigger submodule; Be used for judging that said first the result of submodule is under the situation not; Trigger said distribution sub module the idle cloud resource of said VS to be allocated is all distributed to said current VS; And trigger said choose submodule choose next real-time performance value less than the VS of the second preset load threshold value as VS to be allocated; And, trigger said first and judge submodule judges whether the idle cloud resource of VS to be allocated handles the required extra cloud resource of current task more than or equal to continuation, till can becoming the required cloud resource of the said processing current task of the distribution of work for said current VS.
Preferably, said trigger module also comprises:
Obtain submodule, be used to obtain the routed path length information between said other VS and the current VS;
The said submodule of choosing, also be used to choose and said current VS between the shortest and real-time performance value of routed path less than other VS of the second preset load threshold value as VS to be allocated.
Preferably, also comprise:
The resource release module is used for discharging the required extra cloud resource of said processing current task that continues distribution monitoring in real time under the situation of real-time performance value less than the 3rd preset load threshold value of the said VS that obtains.
Can find out from above-mentioned technical scheme; The embodiment of the invention is that current task distributes performance after the initial cloud resource to carry out real-time performance to detect through the VS to user login; And carry out the comparison of real-time performance value and preset performance threshold; Automatic dynamic continues to handle the required extra cloud resource of said current task for this VS distributes flexibly, does not need the user initiatively to initiate resource allocation request, thereby has improved the data-handling efficiency of VS.
Embodiment
For realizing goal of the invention of the present invention; The present invention provide a kind of under cloud computing environment the method and the device of dynamic assignment resource; This method can be that current task distributes performance after the initial cloud resource to carry out real-time performance to detect through the VS to user login; System is through the comparison of real-time performance value with the performance threshold of presetting; Can continue to handle the required extra cloud resource of said current task for this VS distributes it flexibly, not need the user initiatively to initiate resource allocation request, thereby also improved the treatment effeciency of VS.
It more than is core concept of the present invention; In order to make those skilled in the art person understand the present invention program better; To combine the accompanying drawing in the embodiment of the invention below, the technical scheme in the embodiment of the invention carried out clear, intactly description, obviously; Described embodiment only is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills are not making the every other embodiment that is obtained under the creative work prerequisite, all belong to the scope of the present invention's protection.
Referring to Fig. 1, show of the present invention a kind of under cloud computing environment the flow chart of the method embodiment 1 of dynamic assignment resource, can may further comprise the steps:
Step 101: after the user logins current virtual server VS, monitor said current VS in real time and be current task and distribute the performance performance number when obtaining in fact after the initial cloud resource.
The user here refers to personal user or the enterprise customer who successfully applies for the cloud resource at this VS; And described VS promptly is the virtual server for this user processing task; In case the user successfully login VS and bring into use VS be current task distribute initial cloud resource Processing tasks the time; Just begin this VS is monitored in real time, to obtain the real-time performance value of this VS in real time.
Step 102: judge whether said real-time performance value reaches the first preset load threshold value, if then get into step 103.
Wherein, Said first load threshold value is the performance number of said current VS load when the heaviest, promptly is in the process of this VS of monitoring in real time, judges that whether current real-time performance value is more than or equal to first load threshold value of presetting; If current real-time performance value is more than or equal to the first preset load threshold value; This VS then is described at the full load Processing tasks, need distribute other cloud resource this moment for this VS, abnormal conditions occur to avoid this VS.
Need to prove,, then can not do following processing, proceed monitoring and get final product if judge that obtaining the real-time performance value does not reach the first preset load threshold value.
Step 103: detect said current VS and continue to handle the required very first time of said current task.
Under the situation that VS operates with full load; Detect this VS and handle how long current task needed remaining time is; The very first time here refers to this VS and handles the needed All Time of current task, comprises handling current task consumed time and the time of continuing to handle the current task needs down at full capacity.Concrete, can be when handling current task according to VS, task for processing percentage and time of having taken, the All Time that comes this required by task of computing to want.
Step 104: judge that whether the said very first time is greater than the second preset time, if then get into step 105.
Wherein, second time was the Preset Time of said current VS Resources allocation, and promptly the user is in the initial cloud resource of application, and server is the up time of this initial cloud resource of user's setting.This second time can be used as the trigger condition into this current VS Resources allocation; When detected very first time during greater than preset second time; Explanation can not finished the work in the second predetermined time under the existing cloud resource allocation conditions; Need the extra cloud resource of application to finish the work, meet this trigger condition, promptly get into step 105 in the second predetermined time.When the detected very first time is less than or equal to the second preset time, explain in the second predetermined time, finishing the work under the existing cloud resource allocation conditions, need not apply for extra cloud resource.
Step 105: continue to handle the required extra cloud resource of said current task for said current VS distributes it.
Under the situation of the very first time greater than second time, for distributing it, current VS continues to handle the needed extra cloud resource of said current task, and said extra cloud resource is that current VS accomplishes the required extra cloud resource of current task in the second predetermined time.Newly assigned extra cloud resource can be the idle cloud resource of other VS of linking to each other with current VS, and wherein, the cloud resource can be CPU, memory source etc., also can be the hard disk resource.
Present embodiment provide a kind of under cloud computing environment the method for dynamic assignment resource; This method can be that current task distributes performance after the initial cloud resource to carry out real-time performance to detect through the VS to Processing tasks after the user login; Again real-time performance value and preset performance threshold are compared; Can for distributing it, this VS continue to handle the required extra cloud resource of said current task flexibly according to comparative result; No longer need the user initiatively to initiate resource allocation request, also improved the treatment effeciency of VS, the utilance of the idle cloud resource of other VS of while is also compared prior art and is improved.
Referring to Fig. 2, show of the present invention a kind of under cloud computing environment the flow chart of the method embodiment 2 of dynamic assignment resource, the user in the present embodiment is the personal user, this embodiment can may further comprise the steps:
Step 201: after the personal user logins current virtual server VS, monitor said current VS in real time and be current task and distribute the performance performance number when obtaining in fact after the initial cloud resource.
The personal user logins oneself among the VS of success application, and VS at first can all resources of auto-initiation, start the real-time performance monitoring function, get access to the first load threshold value H, and H is the performance number of current VS load when the heaviest.
Step 202: judge whether said real-time performance value reaches the first preset load threshold value, if then get into step 203.
When this personal user brings into use the cloud resource Processing tasks of oneself; Suppose that real-time monitoring and detection real-time performance value is H1; Suppose user applies in the present embodiment to the cloud resource be 10G; And the H that is provided with is 90%, and when H1 reached 10*90%=9G, just explanation had reached the first preset load threshold value so.
Step 203: detect said current VS and handle the required very first time of current task, and judge that whether the said very first time is greater than the second preset time, if then get into step 204.
This moment can initiating task incident E; And the processing priority of E is not the highest; Be used to detect the very first time (being assumed to be T1) of the handled task needs of user, so need to judge that T1 is whether greater than second time (being assumed to be T) of the automatic Resources allocation of the predefined startup of system.
Step 204: whether need the dynamic assignment resource through human-computer interaction interface prompting personal user.
If T1 greater than T, then can point out the user whether to need the dynamic assignment resource through the UI interface, certainly, in practical application, also can not point out the user directly to distribute the cloud resource for current VS.
Step 205: under the situation that the user selects to be, be that said current VS distributes it to continue to handle the required extra cloud resource of said current task according to the unit value of resource allocation.
If the personal user selects the dynamic assignment resource, VS can carry out resource allocation according to the unit value (unit like CPU be " GHz ", and internal memory unit is " GB ") of allocation resource, distribute successfully after, the extra cloud resource that the use that the user just can be level and smooth increases newly.
Step 206: be less than or equal under the situation of the 3rd preset load threshold value in the real-time real-time performance value of monitoring the said VS that obtains, discharge the required extra cloud resource of said processing current task that continues distribution.
In the present embodiment; All the time startability monitoring supposes that the 3rd load threshold value here is 1/2H, so when H1<=1/2H; Represent that current VS is in underrun state or idle condition; Can discharge this moment just has been the newly-increased dynamic assignment resource of this VS, and when this personal user logined next time so, the resource among the VS still was initial cloud resource.
In the present embodiment, when the personal user uses the cloud resource, through the operating position of real-time performance monitoring Function detection personal user to resource; When the VS of personal user login when lots of data causes CUP and internal memory to use; Perhaps disk is write when full soon, and whether can be chosen in UI interface prompt personal user needs dynamically to increase Resources allocation, and when personal user's selection is; Then can give this personal user's dynamic assignment resource according to the real-time performance value automatically; So just reduce the number of times and the time of personal user oneself operation, not only can promote the treatment effeciency of VS, also can improve user's experience; Further, after the VS of this personal user's login load alleviated, system will discharge the resource of dynamic assignment, guarantees that so also idle cloud resource also can be used fully.
Referring to Fig. 3, show of the present invention a kind of under cloud computing environment the flow chart of the method embodiment 3 of dynamic assignment resource, said user is the enterprise customer, this embodiment can may further comprise the steps:
Step 301: the enterprise customer logins after the current virtual server VS, monitors said current VS in real time and is current task and distribute the performance performance number when obtaining in fact after the initial cloud resource.
Involved enterprise customer is preferably the enterprise customer of medium-sized and small enterprises in the present embodiment.In the present embodiment; An overall performance C of Surveillance center and global resource S need be provided; S is the resource summation that all enterprise customers applied in this enterprise; This overall situation performance Surveillance center can monitor the resource operating position of each VS in real time, and S can be distributed into many concrete VS by enterprise self-determining.
Need to prove that in the present embodiment, the arbitrary VS that logins with any enterprise customer is that example is introduced, and the processing mode of other VS is similar.
Need to prove; After step 301, current VS can monitor the resource utilization of himself in real time, thereby can be when resource utilization reaches predetermined resource threshold; Just lock himself, make other VS not obtain the cloud resource from the VS of locking.Lock step specifically can comprise:
Steps A: after the user logined current VS, whether the resource utilization of monitoring said current VS in real time reached preset resource threshold, if then lock said current VS.
In the present embodiment, after the user logined current VS, current VS can monitor its resource utilization in real time and whether reach preset resource threshold; For example; When the resource utilization of current VS (supposing A) reaches the predefined resource threshold N of system, will be by chains, A is just no longer given other VS by Surveillance center of overall importance Resources allocation; The VS that promptly is to use rate to be lower than above-mentioned N just can be assigned with resource, has so just guaranteed that the resource use of A is rational always.Wherein, Whether each VS all can reach preset resource threshold is judged resource utilization separately; In case find to reach preset resource threshold; Then himself is locked, make other VS not go up (promptly being on the VS of locking) and obtain extra cloud resource, just guaranteed that so also the cloud resource that resource utilization reaches each VS of predetermined resource threshold value can not be assigned to other VS uses from the VS that resource utilization reach resource threshold.
Step 302: judge whether said real-time performance value reaches the first preset load threshold value, if then get into step 303.
In this step, suppose that the used VS of any enterprise customer is A, when real-time performance value during more than or equal to first load threshold value, expression A is being in full load condition so.In addition, if the judged result of this step then can continue to monitor in real time VS, and not carry out following steps for not.Wherein, said first load threshold value is the performance number of said current VS load when the heaviest.
Step 303: detect said current VS and handle the required very first time of current task, and judge that whether the said very first time is greater than the second preset time, if then get into step 304.
When A is in full load condition, initiating task incident E, the processing priority of E is not the highest, is used to detect very first time time (T1) of enterprise customer's the handled task needs of VS.Very first time T1 refers to this VS and handles the needed All Time of current task, comprises handling current task consumed time and the time of continuing to handle the current task needs down at full capacity.Wherein, said second time (T) is expressed as the Preset Time of said current VS Resources allocation.
Step 304: judge whether other VS that said and said current VS belongs to a local area network (LAN) are in the lock state, if not, then get into step 305;
If belong to other VS of a local area network (LAN) is in the lock state with said current VS; Explain that its resource utilization has reached predefined resource threshold; Just no longer carry out following operation this moment, has only other VS of not locking just might extra cloud resource be provided for current VS.
Because in practical application; Inevitably might can need lots of data suddenly by other VS (for example B); The load of B will reach at full capacity like this; This moment, B can obtain resource through Surveillance center of overall importance from other low VS of other applied load (for example D, E etc.) so, in like manner analogized, can be by overall performance other each VS of poll of Surveillance center when the inadequate resource of any VS; And dynamically be this VS Resources allocation according to the load condition of other VS, but this VS just can not provide the cloud resource for other VS again.
Step 305: judge that whether the real-time performance value of other VS that belongs to a local area network (LAN) with said current VS is less than the second preset load threshold value, if then get into step 306.
When if T1 starts second time T of automatic Resources allocation greater than default; Overall situation performance Surveillance center can real time polling its institute administer the situation of the real-time performance value of interior other VS; For example; Suppose that this step inquires the other VS (be assumed to be B) of real-time performance value less than predefined second load threshold value (for example can be the half the of value at full capacity, promptly be H/2).
Step 306: from said other VS is that said current VS distributes continuation to handle the required extra cloud resource of current task.
Said extra cloud resource is that current VS accomplishes the required extra cloud resource of current task in the second predetermined time T.Then this step can be handled the needed cloud resource of current task for A distributes A from B; Suppose that the extra cloud resource that A processing current task needs is s; Then virtual server A will obtain resource s from B; Wherein, the method for obtaining is to obtain according to the unit value of allocation resource (for example the unit of CPU is " GHz ", and internal memory unit is " GB ").Wherein, this obtains because be between VS, to carry out moment, so do not influence the use of A and B.
Step 307:, discharge the required extra cloud resource of said processing current task that continues distribution monitoring in real time under the situation of real-time performance value of the said VS that obtains less than the 3rd preset load threshold value.
In the present embodiment, under the real-time performance value of A also situation, can discharge the resource s that it obtains from B, and give global resource S, recover the source material size up to A with s less than the 3rd preset load threshold value.Overall situation performance Surveillance center can distribute to high utilization rate and that few VS of resource to s according to utilization rate and the resource size of each VS that is polled to.
It is thus clear that in the present embodiment; Can be whole enterprise an overall VS is provided, the quantity configuration of a simple VS is provided simultaneously, so just can pass through each VS of poll; Reasonably be assigned to total resources S among each VS dynamically; And the enterprise customer just can guarantee some enterprise customers when using concrete a certain VS when enterprises is used the cloud resource, can be under the situation that this VS excess load operates be in from other VS of underload dynamically to obtain the cloud resource.
Need to prove that step 304 belongs to preferred implementation in the present embodiment, if after step 301, do not do the judgement and the relevant locking processing that whether will lock current VS, then step 304 can be saved.
Description through above method embodiment; The those skilled in the art can be well understood to the present invention and can realize by the mode that software adds essential general hardware platform; Can certainly pass through hardware, but the former is better execution mode under a lot of situation.Based on such understanding; The part that technical scheme of the present invention contributes to prior art in essence in other words can be come out with the embodied of software product; This computer software product is stored in the storage medium; Comprise some instructions with so that computer equipment (can be personal computer, server, the perhaps network equipment etc.) carry out all or part of step of the said method of each embodiment of the present invention.And aforesaid storage medium comprises: various media that can be program code stored such as read-only memory (ROM), random-access memory (ram), magnetic disc or CD.
With reference to shown in Figure 4, a realization flow figure for step 306 specifically can comprise:
Step 401: choose a real-time performance value less than the VS of the second preset load threshold value as VS to be allocated;
Step 402: whether the idle cloud resource of judging said VS to be allocated handles the required extra cloud resource of current task more than or equal to said continuation, if then get into step 403, if not, then get into step 404;
Suppose that with virtual server B be VS to be allocated; At this moment; Judge that the idle cloud resource SB that can distribute among the B is whether more than or equal to the extra cloud resource SA of the needed processing current task of A; If the result is for being, even if explain that perhaps all distributing to A just can guarantee that A continues to handle current task with idle cloud resource part all among the B, if the result is for denying; Explain that A can only obtain the needed part cloud of oneself continuation processing current task resource from B, need further from other VS, obtain extra cloud resource.
Step 403: directly be that said current VS distributes continuation to handle the required extra cloud resource of said current task from said VS to be allocated;
This step then needs directly from B, to continue to handle the extra cloud resource of deserving preceding required by task for A distributes;
Step 404: the idle cloud resource of said VS to be allocated is all distributed to said current VS; Choose again next real-time performance value less than the VS of the second preset load threshold value as VS to be allocated; And whether carry out the said idle cloud resource of judging VS to be allocated more than or equal to the step that continues to handle the required extra cloud resource of current task, till can becoming the distribution of work to continue to handle the required extra cloud resource of current task for said current VS.
If the idle cloud resource among the B not enough; Then can the idle cloud resource among the B be distributed to A earlier; The required extra cloud resource of A this moment is (SA-SB); Choose successively more next real-time performance value less than the VS of the second preset load threshold value as VS to be allocated (being assumed to be C); Continue to judge whether the idle cloud resource SC among the C continues to handle the extra cloud resource (SA-SB) of deserving preceding task needs more than or equal to the A that has distributed the idle cloud resource among the B, by that analogy, till successfully having distributed it to continue to handle the needed whole extra cloud resources of current task for A.
In different application scenes; Be outside the current VS allocation during cloud resource from other VS; Can also select VS to be allocated with reference to the path length short message between each other VS and the current VS, concrete, with reference to shown in Figure 5; For confirming the realization flow figure of VS to be allocated, specifically can comprise:
Step 501: obtain the routed path length information between said other VS and the current VS;
At first get access to the routed path length information between each other VS and the current VS according to other VS and the residing position of current VS relation.
Step 502: choose successively and said current VS between the shortest and real-time performance value of routed path less than other VS of the second preset load threshold value as VS to be allocated.
In this step, the routed path length information between other VS and the current VS relatively successively, the shortest VS of the routed path between selection and the said current VS is as VS to be allocated; When realizing, can sort and preserve a table above-mentioned each path length short message, thus can from the beginning of sequence or ending is chosen and said current VS between routed path other the shortest VS be used as VS to be allocated; The VS to be allocated that this step is confirmed then be and said current VS between the shortest and real-time performance value of routed path less than other VS of second load threshold value of presetting.
Corresponding to top method embodiment, the embodiment of the invention also provide a kind of under cloud computing environment the device of dynamic assignment resource.Referring to Fig. 6, show a kind of under cloud computing environment the structural representation of the device embodiment 1 of dynamic assignment resource, can comprise:
Real-time monitoring module 601 is used for after the user logins current virtual server VS, monitors said current VS in real time and is current task and distribute the performance performance number when obtaining in fact after the initial cloud resource;
First judge module 602 is used to judge whether said real-time performance value reaches the first preset load threshold value; Said first load threshold value is the performance number of said current VS load when the heaviest;
Time detecting module 603, the result who is used at said first judge module is under the situation that is, detects said current VS and continues to handle the required very first time of said current task;
Second judge module 604 is used to judge that whether the said very first time is greater than the second preset time; Said second time is the Preset Time of said current VS Resources allocation;
Distribution module 605, the result who is used at said second judge module is under the situation that is, continues to handle the required extra cloud resource of said current task for said current VS distributes it.
Present embodiment provides a kind of under cloud computing environment the device of dynamic assignment resource; Can be that current task distributes performance after the initial cloud resource to carry out real-time performance to detect through VS to Processing tasks after the user login; Again real-time performance value and preset performance threshold are compared; Can distribute other idle cloud resources for this VS flexibly according to comparative result; No longer need the user initiatively to initiate resource allocation request, also improved the treatment effeciency of VS, the utilance of the idling-resource of other VS of while is also compared prior art and is improved.
Referring to Fig. 7, show a kind of under cloud computing environment the structural representation of the device embodiment 2 of dynamic assignment resource, in the present embodiment, the user can comprise for the personal user:
Real-time monitoring module 601 is used for after the user logins current virtual server VS, the performance of monitoring said current VS in real time performance number when obtaining in fact;
First judge module 602 is used to judge whether said real-time performance value reaches the first preset load threshold value; Said first load threshold value is used to represent the performance number when said current VS load is the heaviest;
Time detecting module 603, the result who is used at said first judge module is under the situation that is, detects said current VS and handles the required very first time of current task;
Second judge module 604 is used to judge that whether the said very first time is greater than the second preset time; Said second time representation is the Preset Time of said current VS Resources allocation;
Reminding module 701 is used for whether needing the dynamic assignment resource through human-computer interaction interface prompting user;
Then said distribution module 605 specifically is used for: under the situation that the user selects to be, be that said current VS distributes it to handle the required idle cloud resource of said current task according to the unit value of resource allocation.
Resource release module 702 is used under the situation of real-time performance value less than the 3rd preset load threshold value of the said VS that monitoring in real time obtains, discharging the required idle cloud resource of said processing current task of distributing.
In the present embodiment, when the personal user uses the cloud resource, through the operating position of real-time performance monitoring Function detection personal user to resource; When the VS of personal user login when lots of data causes CUP and internal memory to use; Perhaps disk is write when full soon, and whether can be chosen in UI interface prompt personal user needs dynamically to increase Resources allocation, and when personal user's selection is; Then can give this personal user's dynamic assignment resource according to the real-time performance value automatically; So just reduce the number of times and the time of personal user oneself operation, not only can promote the treatment effeciency of VS, also can improve user's experience; Further, after the VS of this personal user's login load alleviated, system will discharge the resource of dynamic assignment, guarantees that so also idle cloud resource also can be used fully.
Referring to Fig. 8, show a kind of under cloud computing environment the structural representation of the device embodiment 3 of dynamic assignment resource, can comprise:
Real-time monitoring module 601 is used for after the user logins current virtual server VS, the performance of monitoring said current VS in real time performance number when obtaining in fact;
First judge module 602 is used to judge whether said real-time performance value reaches the first preset load threshold value; Said first load threshold value is used to represent the performance number when said current VS load is the heaviest;
Time detecting module 603, the result who is used at said first judge module is under the situation that is, detects said current VS and handles the required very first time of current task;
Second judge module 604 is used to judge that whether the said very first time is greater than the second preset time; Said second time representation is the Preset Time of said current VS Resources allocation;
The 4th judge module 801 is used to judge that whether the real-time performance value of other VS that belongs to a local area network (LAN) with said current VS is less than the second preset load threshold value;
Trigger module 802, the result who is used at said the 4th judge module is under the situation that is, triggering distribution module is the required cloud resource of said current VS allocation process current task from said other VS.
Resource release module 702 is used under the situation of real-time performance value less than the 3rd preset load threshold value of the said VS that monitoring in real time obtains, discharging the required idle cloud resource of said processing current task of distributing.
Need to prove that in the present embodiment, said device can also comprise under the preferable case:
Locking module is used for locking when resource utilization at said current VS reaches preset resource threshold said current VS.
It is understandable that the arbitrary moment after triggering said real-time monitoring module 601 all can be triggered said locking module.
Then can also comprise at said device: the 3rd judge module is used to judge whether other VS that belong to a local area network (LAN) with said current VS are lock-out state;
801 of then said the 4th judge modules specifically be used for the result of said the 3rd judge module for situation not under, judge that whether the real-time performance value of other VS that belongs to a local area network (LAN) with said current VS is less than the second preset load threshold value.
With reference to shown in Figure 9, be the structural representation of said trigger module 802, trigger module 802 specifically can comprise:
Choose submodule 901, be used to choose a real-time performance value less than the VS of the second preset load threshold value as VS to be allocated;
First judges submodule 902, and whether the idle cloud resource that is used to judge said VS to be allocated is more than or equal to continuing to handle the required extra cloud resource of current task;
Distribution sub module 903 is used for judging that first the result of submodule 902 is under the situation that is, directly is that said current VS distributes continuation to handle the required extra cloud resource of said current task from said VS to be allocated;
Trigger submodule 904; Be used for judging that said first the result of submodule is under the situation not; Trigger distribution sub module 903 the idle cloud resource of said VS to be allocated is all distributed to said current VS; And trigger first and choose submodule 901 and choose next VS to be allocated; And, trigger first and judge submodule 902 judges whether the idle cloud resource of VS to be allocated handles the required extra cloud resource of current task more than or equal to continuation, till can becoming the required cloud resource of the said processing current task of the distribution of work for said current VS.
Wherein, in various embodiment, with reference to shown in 10, said trigger module 802 can also comprise:
Obtain submodule 1001, be used to obtain the routed path length information between said other VS and the current VS;
Choose submodule 901, also be used to choose and said current VS between the shortest and real-time performance value of routed path less than other VS of the second preset load threshold value as VS to be allocated.First judges submodule 902, and whether the idle cloud resource that is used to judge said VS to be allocated is more than or equal to continuing to handle the required extra cloud resource of current task;
Distribution sub module 903 is used for judging that first the result of submodule 902 is under the situation that is, directly is that said current VS distributes continuation to handle the required extra cloud resource of said current task from said VS to be allocated;
Trigger submodule 904; Be used for judging that first the result of submodule 902 is under the situation not; Trigger distribution sub module 903 the idle cloud resource of said VS to be allocated is all distributed to said current VS; And trigger second and choose submodule 1002 and choose next VS to be allocated; And, trigger first and judge submodule 902 judges whether the idle cloud resource of VS to be allocated handles the required extra cloud resource of current task more than or equal to continuation, till can becoming the required cloud resource of the said processing current task of the distribution of work for said current VS.
Be applied to the VS of enterprise customer's login at the disclosed device of present embodiment; This device provides an overall VS for whole enterprise; The quantity configuration of a simple VS is provided simultaneously; Through each VS of poll, reasonably be assigned to total resources S dynamically among each VS, the enterprise customer is when enterprises is used the cloud resource like this; Just can guarantee some enterprise customers when using concrete a certain VS, can be under the situation of this VS excess load running be in the VS of underload and dynamically obtain the cloud resource from other.
It is understandable that the present invention can be used in numerous general or special purpose computingasystem environment or the configuration.For example: personal computer, server computer, handheld device or portable set, plate equipment, multicomputer system, the system based on microprocessor, set top box, programmable consumer-elcetronics devices, network PC, minicom, mainframe computer, comprise DCE of above any system or equipment or the like.
The present invention can describe in the general context of the computer executable instructions of being carried out by computer, for example program module.Usually, program module comprises the routine carrying out particular task or realize particular abstract, program, object, assembly, data structure or the like.Also can in DCE, put into practice the present invention, in these DCEs, by through communication network connected teleprocessing equipment execute the task.In DCE, program module can be arranged in this locality and the remote computer storage medium that comprises memory device.
Need to prove; In this article; Relational terms such as first and second grades only is used for an entity or operation are made a distinction with another entity or operation, and not necessarily requires or hint relation or the order that has any this reality between these entities or the operation.And; Term " comprises ", " comprising " or its any other variant are intended to contain comprising of nonexcludability; Thereby make and comprise that process, method, article or the equipment of a series of key elements not only comprise those key elements; But also comprise other key elements of clearly not listing, or also be included as this process, method, article or equipment intrinsic key element.Under the situation that do not having much more more restrictions, the key element that limits by statement " comprising ... ", and be not precluded within process, method, article or the equipment that comprises said key element and also have other identical element.
For device embodiment, because it corresponds essentially to method embodiment, so relevant part gets final product referring to the part explanation of method embodiment.Device embodiment described above only is schematic; Wherein said unit as the separating component explanation can or can not be physically to separate also; The parts that show as the unit can be or can not be physical locations also; Promptly can be positioned at a place, perhaps also can be distributed on a plurality of NEs.Can realize the purpose of present embodiment scheme according to the needs selection some or all of module wherein of reality.Those of ordinary skills promptly can understand and implement under the situation of not paying creative work.
The above only is an embodiment of the present invention; Should be pointed out that for those skilled in the art, under the prerequisite that does not break away from the principle of the invention; Can also make some improvement and retouching, these improvement and retouching also should be regarded as protection scope of the present invention.