CN103559093A - Resource allocation method and device for servers - Google Patents
Resource allocation method and device for servers Download PDFInfo
- Publication number
- CN103559093A CN103559093A CN201310574598.0A CN201310574598A CN103559093A CN 103559093 A CN103559093 A CN 103559093A CN 201310574598 A CN201310574598 A CN 201310574598A CN 103559093 A CN103559093 A CN 103559093A
- Authority
- CN
- China
- Prior art keywords
- load
- server
- virtual machine
- resource
- state information
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Landscapes
- Debugging And Monitoring (AREA)
- Computer And Data Communications (AREA)
Abstract
The invention discloses a resource allocation method and device for servers. The method and the device are applied to a server resource pool. The server resource pool comprises at least one server, and at least one virtual machine is arranged on each server. The method comprises the steps as follows: loads of the servers corresponding to current application requests are monitored, and load state information is acquired; when the load state information meets a first alarm rule, resource addition instructions containing addition values are generated according to the load state information; first target virtual machines with the quantity corresponding to the addition values are started in the server resource pool; and the first target virtual machines are added into the loads of the servers. According to an embodiment of the method and the device, when alarming of the loads of the servers corresponding to current application requests is performed, the virtual machines can be added to the loads of the servers dynamically, and expansion of server resources is realized; and when normal server resources are guaranteed to be provided for the current application requests, the current application requests don't occupy extra space resources, and the utilization rate of the server resources is increased.
Description
Technical field
The application relates to resource distribution technical field, particularly a kind of collocation method of server resource and device.
Background technology
At present, in the configuration of server resource, conventionally adopt the scheme to a server cluster of a class application request configuration, in this server cluster, can comprise one or more server.When processor receives such application request, one or more server in invoking server cluster responds and provides resource to this request.
But for same application request needed server resource may be different in the same time, therefore, conventionally exist the server resource quantity used while processing this application request much smaller than the situation of the fixed server total resources configuring for this application, thereby cause in server cluster corresponding to this application request a plurality of server resources in idle situation generation.
Therefore,, in the allocation plan of existing server resource, can cause the utilization factor of server resource lower.
Summary of the invention
The application's technical matters to be solved is to provide a kind of collocation method and device of server resource, in order to solve in prior art at a time in application server cluster, the server resource quantity being used is much smaller than the fixed server total resources for this application request configuration, in server cluster corresponding to this application request, a plurality of server resources, in idle state, make the lower technical matters of utilization factor of server resource.
The application provides a kind of collocation method of server resource, is applied to default server resource pond, and described server resource pond comprises at least one station server, on every described server, is respectively equipped with at least one virtual machine, and described method comprises:
The server load corresponding with current application request monitored, obtain load state information;
Judge whether described load state information meets the first default alarm rule, if so, generate resource add instruction according to described load state information, described resource is added instruction and is comprised interpolation numerical value;
According to described resource, add instruction, in described server resource pond, start the first object virtual machine with described interpolation numerical value respective amount;
Described first object virtual machine is added in described server load.
Said method, preferred, described obtain load state information after, described method also comprises:
Judge whether described load state information meets the second default alarm rule, if so, according to described load state information, generates resource unloading command, and described resource unloading command comprises unloading numerical value;
In described server load, close the second target virtual machine with described unloading numerical value respective amount;
Described the second target virtual machine is unloaded back in described server resource pond.
Said method, preferred, described the first alarm rule comprises that current load value corresponding to described load state information is greater than default first threshold, wherein, describedly judges that whether described load state information meets the first default alarm rule, comprising:
Resolve described load state information, obtain the current load value of described server load;
Judge whether described current load value is greater than described first threshold.
Said method, preferred, described load state information comprises the current amount of space of having stored of described server load, wherein, the described load state information of described foundation generates resource and adds instruction, comprising:
According to the current amount of space of having stored of server load described in described load state information, obtain the current needed target amount of memory of described server load;
According to described target amount of memory, generate resource and add instruction, described resource is added instruction and is comprised the interpolation numerical value corresponding with the size of described target amount of memory.
Said method, preferred, the described resource of described foundation is added instruction, and the first object virtual machine of startup and described interpolation numerical value respective amount in described server resource pond, comprising:
Determine the idle virtual machine in idle condition in described server resource pond;
In described idle virtual machine, start the first object virtual machine with described interpolation numerical value respective amount.
The application also provides a kind of inking device of server resource, is applied to default server resource pond, and described server resource pond comprises at least one station server, on every described server, is respectively equipped with at least one virtual machine, and described device comprises:
Load detecting module, for the server load corresponding with current application request monitored, obtains load state information;
The first judge module, for judging that whether described load state information meets the first default alarm rule, if so, triggers the first instruction generation module;
The first instruction generation module, adds instruction for generating resource according to described load state information, and described resource is added instruction and comprised interpolation numerical value;
Virtual machine activation module for adding instruction according to described resource, starts the first object virtual machine with described interpolation numerical value respective amount in described server resource pond;
Virtual machine adds module, for described first object virtual machine is added into described server load.
Said apparatus, preferred, also comprise:
The second judge module, for after described load detecting module obtains load state information, judges that whether described load state information meets the second default alarm rule, if so, triggers the second instruction generation module;
The second instruction generation module, for generating resource unloading command according to described load state information, described resource unloading command comprises unloading numerical value;
Virtual machine closing module, for closing the second target virtual machine with described unloading numerical value respective amount in described server load;
Virtual machine Unload module, for unloading go back to described server resource pond by described the second target virtual machine.
Said apparatus, preferred, described the first alarm rule comprises that current load value corresponding to described load state information is greater than default first threshold, wherein, described the first judge module comprises:
Information analysis submodule, for resolving described load state information, obtains the current load value of described server load;
Load value judgement submodule, for judging whether described current load value is greater than described first threshold.
Said apparatus, preferred, described load state information comprises the current amount of space of having stored of described server load, wherein, described the first instruction generation module comprises:
Object space obtains submodule, for according to the current amount of space of having stored of server load described in described load state information, obtains the current needed target amount of memory of described server load;
Instruction generates submodule, for according to described target amount of memory, generates resource and adds instruction, and described resource is added instruction and comprised the interpolation numerical value corresponding with the size of described target amount of memory.
Said apparatus, preferred, described virtual machine activation module comprises:
Idle definite submodule, for determining the idle virtual machine of described server resource pond in idle condition;
Target start submodule, for the first object virtual machine with described interpolation numerical value respective amount in described idle virtual machine startup.
Known in such scheme, the collocation method of a kind of server resource that the application provides and device, by setting in advance server resource pond, and in this server resource pond, be provided with many virtual machines, in real time the corresponding server load of current application request is monitored, obtain load state information, and then generation contains the resource interpolation instruction of adding numerical value when this load state information meets the first alarm rule, according to this resource, add instruction thus starts first object virtual machine and this first object virtual machine is added in server load in server resource pond, realize the application and server resource is carried out to the configuration operations such as dynamic appending.When the application reports to the police in server load corresponding to current application request, dynamically server load is appended to virtual machine, realize the expansion of server resource, avoided in prior art application request fixed configurations server resource, make server resource to cause the situation that server resource utilization factor is low in idle condition, the application is when guaranteeing that request provides normal server resource to current application, current application request does not take unnecessary idling-resource, improves the resource utilization of server resource.
Accompanying drawing explanation
In order to be illustrated more clearly in the technical scheme in the embodiment of the present application, below the accompanying drawing of required use during embodiment is described is briefly described, apparently, accompanying drawing in the following describes is only some embodiment of the application, for those of ordinary skills, do not paying under the prerequisite of creative work, can also obtain according to these accompanying drawings other accompanying drawing.
The process flow diagram of the collocation method embodiment mono-of a kind of server resource that Fig. 1 provides for the application;
The part process flow diagram of the collocation method embodiment bis-of a kind of server resource that Fig. 2 provides for the application;
The part process flow diagram of the collocation method embodiment tri-of a kind of server resource that Fig. 3 provides for the application;
The part process flow diagram of the collocation method embodiment tetra-of a kind of server resource that Fig. 4 provides for the application;
The structural representation of the inking device embodiment five of a kind of server resource that Fig. 5 provides for the application;
The part-structure schematic diagram of the inking device embodiment six of a kind of server resource that Fig. 6 provides for the application;
The part-structure schematic diagram of the inking device embodiment seven of a kind of server resource that Fig. 7 provides for the application;
The part-structure schematic diagram of the inking device embodiment eight of a kind of server resource that Fig. 8 provides for the application;
The part-structure schematic diagram of the collocation method embodiment nine of a kind of server resource that Fig. 9 provides for the application.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present application, the technical scheme in the embodiment of the present application is clearly and completely described, obviously, described embodiment is only the application's part embodiment, rather than whole embodiment.Embodiment based in the application, those of ordinary skills are not making the every other embodiment obtaining under creative work prerequisite, all belong to the scope of the application's protection.
In the prior art, can be realized by two schemes, a kind of: for current application request arranges the Service Source of minimum standard, when this current application request needs more resource, to adding the load of Service Source, directly increase server newly, realize the configuration to idle server resource.But this scheme needs manual operation intervention, affects work efficiency.
Another kind of scheme is to utilize existing virtual machine dynamic migration technology, when virtual machine service resource at current application request place is not enough, by the task transfers of this current services request to having in the virtual machine of larger Service Source.But this scheme performance expansion is limited, can only realize the performance adjustment of separate unit virtual machine, also needs centralized storage, and cost strengthens, and practicality is lower.
Thus, the application solves above-mentioned variety of issue by proposing a kind of collocation method of server resource.With reference to figure 1, the process flow diagram of the collocation method embodiment mono-of a kind of server resource providing for the application, described method is applied in default server resource pond, described server resource pond comprises at least one station server, on every described server, be respectively arranged with a virtual machine, described method can comprise the following steps:
Step 101: the server load corresponding with current application request monitored, obtain load state information.
Wherein, described current application request refers to the request that the external world need to call the resource in server resource pond, in the embodiment of the present application, for each application request, can set in advance the virtual machine of an initial number, when server resource pond receives a certain application request, in it, the virtual machine of initial number provides resource service as application server resource to this application request.Described server load is the virtual machine of above-mentioned initial number, and the virtual machine of this initial number is providing described application request as resource service such as calculating or storages as server load.Wherein, described initial number can be determined according to the Minimum requirements value of described application request.
Described load state information is the load state information of the virtual machine of described fixed qty.For example, described current application request is during to the request of computational resource, the virtual machine that described server load is initial number provides calculation services to described current application request, its current calculated amount is described load state information, or the vacant amount of current calculated performance of the virtual machine of this initial number is described load state information.For another example, described current application request is during to the request of storage resources, the virtual machine that described server load is initial number provides storage server to described current application request, its current memory space is described load state information, or the vacant amount of the current memory space of the virtual machine of this initial number is described load state information.
It should be noted that, in described step 101, described server load is monitored, can in real time, (being each moment) monitor described server load, or, also can for regularly, (long every Preset Time) monitor described server load.
Step 102: judge that whether described load state information meets the first default alarm rule, if so, performs step 103.
Wherein, in described step 102, judge whether described load state information meets described the first alarm rule and refer to, whether described load state information is shown to described server load need to append the state of resource and judge, that is to say whether described server load is needed to append resource can normally providing service to judge to described current application request.
Described the first alarm rule can be set voluntarily for user, and for example, the current load value of the described server load that described load state information is corresponding surpasses preset first threshold value; Or whether the vacant amount of the present load of the described server load that described load state information is corresponding is lower than default Second Threshold etc.
Step 103: generate resource according to described load state information and add instruction, described resource is added instruction and comprised interpolation numerical value.
Wherein, described interpolation numerical value refers to the quantity of the virtual machine (resource) that need to add described server load.
It should be noted that, described step 103 can realize in the following manner:
Resolve described load state information, obtain current load value or the vacant amount of present load in described load state information, and then the calculating interpolation numerical value corresponding with described current load value or the vacant amount of described present load, recycle resource described in described interpolation numerical generation and add instruction.
Step 104: add instruction according to described resource, start the first object virtual machine with described interpolation numerical value respective amount in described server resource pond.
Wherein, described step 104 refers to, generate described resource interpolation instruction in described step 103 after, described resource is added to instruction to be responded, in described server resource pond, start resource virtual machine to be added, be, start the first object virtual machine with described interpolation numerical value respective amount.
Step 105: described first object virtual machine is added in described server load.
Wherein, start described first object virtual machine in described server resource pond in described step 104 after, in described step 105, the first object virtual machine after starting is added in described server load and provides resource service to described current application request, as computational resource service or storage resources service etc.
It should be noted that, in described step 105, the interpolation of described first object virtual machine is worth in described server load and is referred to, described first object virtual machine is connected with other virtual machines in described server load, jointly to described current application request, provides Service Source.
Known in such scheme, the collocation method embodiment mono-of a kind of server resource that the application provides, by setting in advance server resource pond, and in this server resource pond, be provided with many virtual machines, in real time the corresponding server load of current application request is monitored, obtain load state information, and then generation contains the resource interpolation instruction of adding numerical value when this load state information meets the first alarm rule, according to this resource, add instruction thus starts first object virtual machine and this first object virtual machine is added in server load in server resource pond, realize the application and server resource is carried out to the configuration operations such as dynamic appending.When the embodiment of the present application one is reported to the police in server load corresponding to current application request, dynamically server load is appended to virtual machine, realize the expansion of server resource, avoided in prior art application request fixed configurations server resource, make server resource to cause the situation that server resource utilization factor is low in idle condition, the application is when guaranteeing that request provides normal server resource to current application, current application request does not take unnecessary idling-resource, improves the resource utilization of server resource.
With reference to figure 2, the part process flow diagram of the collocation method embodiment bis-of a kind of server resource providing for the application, wherein, after described step 101, described method can also comprise:
Step 106: judge that whether described load state information meets the second default alarm rule, if so, performs step 107.
Wherein, in described step 106, judge whether described load state information meets described the second alarm rule and refer to, whether described load state information is shown to the state that described server load need to unload resource judges, that is to say whether need the resource in idle condition in offload server load to judge to described server load.
Described the second alarm rule can be set voluntarily for user, and for example, the current load value of the described server load that described load state information is corresponding is lower than default the 3rd threshold value; Or whether the vacant amount of the present load of the described server load that described load state information is corresponding is higher than default the 4th threshold value etc.
Step 107: generate resource unloading command according to described load state information, described resource unloading command comprises unloading numerical value.
Wherein, described unloading numerical value refers to the quantity of the virtual machine (resource) that need to unload in described server load.
It should be noted that, described step 107 can realize in the following manner:
Resolve described load state information, obtain current load value or the vacant amount of present load in described load state information, and then the calculating unloading numerical value corresponding with described current load value or the vacant amount of described present load, recycle resource described in described unloading numerical generation and add instruction.
Step 108: close the second target virtual machine with described unloading numerical value respective amount in described server load.
Wherein, described step 108 refers to, generate described resource unloading command in described step 107 after, described resource unloading command is responded, in described server load, close resource virtual machine to be unloaded, be, close the second target virtual machine with described unloading numerical value respective amount.
Step 109: described the second virtual machine is unloaded back in described server resource pond.
Wherein, close described the second target virtual machine in described server load in described step 108 after, in described step 109, the second target virtual machine after closing is offloaded in described server resource pond, so that restart interpolation as current application request or other application request when server load is not enough, thus, avoid the application request that cannot be needed by other in idle virtual machine in the server load of application request to call, when guaranteeing that current application request normally obtains Service Source, improve the utilization factor of server resource.
Wherein, in actual applications, described the first alarm rule can comprise that current load value corresponding to described load state information is greater than default first threshold.Thus, with reference to figure 3, the process flow diagram of step 102 described in the collocation method embodiment tri-of a kind of server resource providing for the application, wherein, described step 102 can comprise the following steps:
Step 301: resolve described load state information, obtain the current load value of described server load.
Wherein, the current load value of described server load refers to calculated amount that described server load has been carried or memory space etc.
Step 302: judge whether described current load value is greater than described first threshold.
Wherein, described first threshold can arrange voluntarily for user, as, calculated amount limit value or memory space limit value etc.In described step 302, when described current load value is greater than described first threshold, show that described server load need to add resource as virtual machine, perform step thus 103.
In addition, described the first alarm rule also can be for the vacant amount of present load corresponding to described load state information is less than default Second Threshold, and now, described step 102 can be:
Resolve described load state information, obtain the vacant amount of present load of described server load, then judge whether the vacant amount of described present load is less than described Second Threshold.The vacant amount of present load of described server load refers to calculated amount or the memory space that described server load can also be carried, and described Second Threshold can be arranged voluntarily by user, when the vacant amount of described present load is less than described Second Threshold, show that described server load need to add resource as virtual machine etc., perform step thus 103.
Accordingly, described the second alarm rule can be less than the 3rd default threshold value for current load value corresponding to described load state information, and now, described step 106 can be in specific implementation:
Resolve described load state information, obtain the current load value of described server load, then judge whether described current load value is less than described the 3rd threshold value.The current load value of described server load refers to calculated amount or the memory space that described server load has been carried, and described Second Threshold can be arranged voluntarily by user, when described current load value is less than described the 3rd threshold value, show that described server load need to unload resource if virtual machine etc. is to call to other application request unloading in idle virtual machine in server load, performs step 107 thus.
Wherein, described the second alarm rule also can be for the vacant amount of present load corresponding to described complex state information is greater than the 4th default threshold value, and now, described step 106 can be:
Resolve described load state information, obtain the vacant amount of present load of described server load, then judge whether the vacant amount of described present load is greater than described the 4th threshold value.The vacant amount of present load of described server load refers to calculated amount or the memory space that described server load can also be carried, and described the 4th threshold value can be arranged voluntarily by user, when the vacant amount of described present load is greater than described the 4th threshold value, show that described server load need to unload resource if virtual machine etc. is to call to other application request unloading in idle virtual machine in server load, performs step 107 thus.
In above-mentioned each embodiment, described interpolation numerical value can be the fixed value setting in advance, as long as, when judging described server load and need to add resource, the virtual machine that starts this fixed value quantity in server resource pond adds in server load.Described interpolation numerical value can be also the numerical value changing according to the current state of server load, being the load state information of server load described in described interpolation numerical basis obtains, now, described load state information can comprise the current amount of space of having stored of described server load, wherein, described step 103 is specifically as follows:
According to the current amount of space of having stored of server load described in described load state information, obtain the current needed target amount of memory of described server load, again according to described target amount of memory, generate resource and add instruction, described resource is added instruction and is comprised the interpolation numerical value corresponding with the size of described target amount of memory.
With reference to figure 4, the process flow diagram of step 104 described in the collocation method embodiment tetra-of a kind of server resource providing for the application, wherein, described step 104 can comprise the following steps:
Step 401: determine the idle virtual machine in idle condition in described server resource pond.
It should be noted that, described server resource pond comprises the virtual machine of two states: the virtual machine in idle condition and the called virtual machine that is added into server load.Described in each, on virtual machine, be provided with state tag, at virtual machine, during in idle condition, its state tag is idle condition label, virtual machine is called be added into server load in after its state tag be busy state tag.Thus, in described step 401, during the described idle virtual machine of determining in described server resource pond, can be by reading the state tag of virtual machine in server resource pond, and then determine the idle virtual machine in idle condition in server resource pond.
Step 402: start the first object virtual machine with described interpolation numerical value respective amount in described idle virtual machine.
Wherein, described step 402 can be in described idle virtual machine the first object virtual machine of random start and described interpolation numerical value respective amount.
In addition, described step 104 also can realize in the following manner in realization:
In described server resource pond, the state tag of each virtual machine is read to identification, identifying its tag state, it is idle condition and during with the idle virtual machine of described interpolation numerical value respective amount, stop identification, using the idle virtual machine identifying as first object virtual machine.
With reference to figure 5, the structural representation of the inking device embodiment five of a kind of server resource providing for the application, be applied to default server resource pond, described server resource pond comprises at least one station server, on every described server, be respectively equipped with at least one virtual machine, described device can comprise:
Wherein, described current application request refers to the request that the external world need to call the resource in server resource pond, in the embodiment of the present application, for each application request, can set in advance the virtual machine of an initial number, when server resource pond receives a certain application request, in it, the virtual machine of initial number provides resource service as application server resource to this application request.Described server load is the virtual machine of above-mentioned initial number, and the virtual machine of this initial number is providing described application request as resource service such as calculating or storages as server load.Wherein, described initial number can be determined according to the Minimum requirements value of described application request.
Described load state information is the load state information of the virtual machine of described fixed qty.For example, described current application request is during to the request of computational resource, the virtual machine that described server load is initial number provides calculation services to described current application request, its current calculated amount is described load state information, or the vacant amount of current calculated performance of the virtual machine of this initial number is described load state information.For another example, described current application request is during to the request of storage resources, the virtual machine that described server load is initial number provides storage server to described current application request, its current memory space is described load state information, or the vacant amount of the current memory space of the virtual machine of this initial number is described load state information.
It should be noted that, 501 pairs of described server loads of described load detecting module are monitored, can in real time, (being each moment) monitor described server load, or, also can for regularly, (long every Preset Time) monitor described server load.
The first judge module 502, for judging that whether described load state information meets the first default alarm rule, if so, triggers the first instruction generation module 503.
Wherein, described the first judge module 502 judges whether described load state information meets described the first alarm rule and refer to, whether described load state information is shown to described server load need to append the state of resource and judge, that is to say whether described server load is needed to append resource can normally providing service to judge to described current application request.
Described the first alarm rule can be set voluntarily for user, and for example, the current load value of the described server load that described load state information is corresponding surpasses preset first threshold value; Or whether the vacant amount of the present load of the described server load that described load state information is corresponding is lower than default Second Threshold etc.
The first instruction generation module 503, adds instruction for generating resource according to described load state information, and described resource is added instruction and comprised interpolation numerical value.
Wherein, described interpolation numerical value refers to the quantity of the virtual machine (resource) that need to add described server load.
It should be noted that, described the first instruction generation module 503 can be realized in the following manner:
Resolve described load state information, obtain current load value or the vacant amount of present load in described load state information, and then the calculating interpolation numerical value corresponding with described current load value or the vacant amount of described present load, recycle resource described in described interpolation numerical generation and add instruction.
Virtual machine activation module 504 for adding instruction according to described resource, starts the first object virtual machine with described interpolation numerical value respective amount in described server resource pond.
Wherein, described virtual machine activation module 504 refers to, after described the first instruction generation module 503 generates described resource interpolation instruction, described resource is added to instruction to be responded, in described server resource pond, start resource virtual machine to be added, be, start the first object virtual machine with described interpolation numerical value respective amount.
Virtual machine adds module 505, for described first object virtual machine is added into described server load.
Wherein, after described virtual machine activation module 504 starts described first object virtual machine in described server resource pond, in adding the first object virtual machine after starting to described server load, described virtual machine interpolation module 505 provides resource service to described current application request, as computational resource service or storage resources service etc.
It should be noted that, described virtual machine adds module 505 interpolation of described first object virtual machine is worth in described server load and is referred to, described first object virtual machine is connected with other virtual machines in described server load, jointly to described current application request, provides Service Source.
Known in such scheme, the inking device embodiment five of a kind of server resource that the application provides, by setting in advance server resource pond, and in this server resource pond, be provided with many virtual machines, in real time the corresponding server load of current application request is monitored, obtain load state information, and then generation contains the resource interpolation instruction of adding numerical value when this load state information meets the first alarm rule, according to this resource, add instruction thus starts first object virtual machine and this first object virtual machine is added in server load in server resource pond, realize the application and server resource is carried out to the configuration operations such as dynamic appending.When the embodiment of the present application five is reported to the police in server load corresponding to current application request, dynamically server load is appended to virtual machine, realize the expansion of server resource, avoided in prior art application request fixed configurations server resource, make server resource to cause the situation that server resource utilization factor is low in idle condition, the application is when guaranteeing that request provides normal server resource to current application, current application request does not take unnecessary idling-resource, improves the resource utilization of server resource.
With reference to figure 6, the part-structure schematic diagram of the inking device embodiment six of a kind of server resource providing for the application, wherein, described device can also comprise:
The second judge module 506, for after described load detecting module 501 obtains load state information, judges that whether described load state information meets the second default alarm rule, if so, triggers the second instruction generation module 507.
Wherein, described the second judge module 506 judges whether described load state information meets described the second alarm rule and refer to, whether described load state information is shown to the state that described server load need to unload resource judges, that is to say whether need the resource in idle condition in offload server load to judge to described server load.
Described the second alarm rule can be set voluntarily for user, and for example, the current load value of the described server load that described load state information is corresponding is lower than default the 3rd threshold value; Or whether the vacant amount of the present load of the described server load that described load state information is corresponding is higher than default the 4th threshold value etc.
The second instruction generation module 507, for generating resource unloading command according to described load state information, described resource unloading command comprises unloading numerical value.
Wherein, described unloading numerical value refers to the quantity of the virtual machine (resource) that need to unload in described server load.
It should be noted that, described the second instruction generation module 507 can be realized in the following manner:
Resolve described load state information, obtain current load value or the vacant amount of present load in described load state information, and then the calculating unloading numerical value corresponding with described current load value or the vacant amount of described present load, recycle resource described in described unloading numerical generation and add instruction.
Virtual machine closing module 508, for closing the second target virtual machine with described unloading numerical value respective amount in described server load.
Wherein, described virtual machine closing module 508 refers to, after described the second instruction generation module 507 generates described resource unloading command, described resource unloading command is responded, in described server load, close resource virtual machine to be unloaded, be, close the second target virtual machine with described unloading numerical value respective amount.
Virtual machine Unload module 509, for unloading go back to described server resource pond by described the second target virtual machine.
Wherein, after described virtual machine closing module 508 is closed described the second target virtual machine in described server load, in described virtual machine Unload module 509, the second target virtual machine after closing is offloaded in described server resource pond, so that restart interpolation as current application request or other application request when server load is not enough, thus, avoid the application request that cannot be needed by other in idle virtual machine in the server load of application request to call, when guaranteeing that current application request normally obtains Service Source, improve the utilization factor of server resource.
Wherein, in actual applications, described the first alarm rule can comprise that current load value corresponding to described load state information is greater than default first threshold.Thus, with reference to figure 7, the structural representation of the first judge module 502 described in the inking device embodiment seven of a kind of server resource providing for the application, wherein, described the first judge module 502 can comprise:
Wherein, the current load value of described server load refers to calculated amount that described server load has been carried or memory space etc.
Load value judgement submodule 522, for judging whether described current load value is greater than described first threshold.
Wherein, described first threshold can arrange voluntarily for user, as, calculated amount limit value or memory space limit value etc.Described load value judgement submodule 522, when described current load value is greater than described first threshold, shows that described server load need to add resource as virtual machine, triggers thus described the first instruction generation module 503.
In addition, described the first alarm rule also can be for the vacant amount of present load corresponding to described load state information is less than default Second Threshold, and now, described the first judge module 502 specifically can be realized in the following manner:
Resolve described load state information, obtain the vacant amount of present load of described server load, then judge whether the vacant amount of described present load is less than described Second Threshold.The vacant amount of present load of described server load refers to calculated amount or the memory space that described server load can also be carried, and described Second Threshold can be arranged voluntarily by user, when the vacant amount of described present load is less than described Second Threshold, show that described server load need to add resource as virtual machine etc., trigger described the first instruction generation module 503.
Accordingly, described the second alarm rule can be less than the 3rd default threshold value for current load value corresponding to described load state information, and now, described the second judge module 506 specifically can be realized in the following manner:
Resolve described load state information, obtain the current load value of described server load, then judge whether described current load value is less than described the 3rd threshold value.The current load value of described server load refers to calculated amount or the memory space that described server load has been carried, and described Second Threshold can be arranged voluntarily by user, described the second judge module 506 is when described current load value is less than described the 3rd threshold value, show that described server load need to unload resource if virtual machine etc. is to call to other application request unloading in idle virtual machine in server load, triggers described the second instruction generation module 507 thus.
Wherein, described the second alarm rule also can be for the vacant amount of present load corresponding to described complex state information is greater than the 4th default threshold value, and now, described the second judge module 506 specifically can be realized in the following manner:
Resolve described load state information, obtain the vacant amount of present load of described server load, then judge whether the vacant amount of described present load is greater than described the 4th threshold value.The vacant amount of present load of described server load refers to calculated amount or the memory space that described server load can also be carried, and described the 4th threshold value can be arranged voluntarily by user, described the second judge module 506 is when the vacant amount of described present load is greater than described the 4th threshold value, show that described server load need to unload resource if virtual machine etc. is to call to other application request unloading in idle virtual machine in server load, triggers described the second instruction generation module 507 thus.
In above-mentioned each embodiment, described interpolation numerical value can be the fixed value setting in advance, as long as, when judging described server load and need to add resource, the virtual machine that starts this fixed value quantity in server resource pond adds in server load.Described interpolation numerical value can be also the numerical value changing according to the current state of server load, being the load state information of server load described in described interpolation numerical basis obtains, now, described load state information can comprise the current amount of space of having stored of described server load, with reference to figure 8, the structural representation of the first instruction generation module 503 described in the inking device embodiment eight of a kind of server resource providing for the application, wherein, described the first instruction generation module 503 can comprise:
Object space obtains submodule 531, for according to the current amount of space of having stored of server load described in described load state information, obtains the current needed target amount of memory of described server load.
Instruction generates submodule 532, for according to described target amount of memory, generates resource and adds instruction, and described resource is added instruction and comprised the interpolation numerical value corresponding with the size of described target amount of memory.
With reference to figure 9, the structural representation of virtual machine activation module 504 described in the collocation method embodiment nine of a kind of server resource providing for the application, wherein, described virtual machine activation module 504 can realize by following structure:
Idle definite submodule 541, for determining the idle virtual machine of described server resource pond in idle condition.
It should be noted that, described server resource pond comprises the virtual machine of two states: the virtual machine in idle condition and the called virtual machine that is added into server load.Described in each, on virtual machine, be provided with state tag, at virtual machine, during in idle condition, its state tag is idle condition label, virtual machine is called be added into server load in after its state tag be busy state tag.Thus, the described free time determines that submodule 541 is when the described idle virtual machine of determining in described server resource pond, can be by reading the state tag of virtual machine in server resource pond, and then determine the idle virtual machine in idle condition in server resource pond.
Wherein, described target start submodule 542 can be in described idle virtual machine the first object virtual machine of random start and described interpolation numerical value respective amount.
In addition, described virtual machine activation module 504 also can realize in the following manner in realization:
In described server resource pond, the state tag of each virtual machine is read to identification, identifying its tag state, it is idle condition and during with the idle virtual machine of described interpolation numerical value respective amount, stop identification, using the idle virtual machine identifying as first object virtual machine.
It should be noted that, each embodiment in this instructions all adopts the mode of going forward one by one to describe, and each embodiment stresses is the difference with other embodiment, between each embodiment identical similar part mutually referring to.
Finally, also it should be noted that, in this article, relational terms such as the first and second grades is only used for an entity or operation to separate with another entity or operational zone, and not necessarily requires or imply and between these entities or operation, have the relation of any this reality or sequentially.And, term " comprises ", " comprising " or its any other variant are intended to contain comprising of nonexcludability, thereby the process, method, article or the equipment that make to comprise a series of key elements not only comprise those key elements, but also comprise other key elements of clearly not listing, or be also included as the intrinsic key element of this process, method, article or equipment.The in the situation that of more restrictions not, the key element being limited by statement " comprising ... ", and be not precluded within process, method, article or the equipment that comprises described key element and also have other identical element.
Collocation method and the device of a kind of server resource above the application being provided are described in detail, applied specific case herein the application's principle and embodiment are set forth, the explanation of above embodiment is just for helping to understand the application's method and core concept thereof; Meanwhile, for one of ordinary skill in the art, the thought according to the application, all will change in specific embodiments and applications, and in sum, this description should not be construed as the restriction to the application.
Claims (10)
1. a collocation method for server resource, is characterized in that, is applied to default server resource pond, and described server resource pond comprises at least one station server, on every described server, is respectively equipped with at least one virtual machine, and described method comprises:
The server load corresponding with current application request monitored, obtain load state information;
Judge whether described load state information meets the first default alarm rule, if so, generate resource add instruction according to described load state information, described resource is added instruction and is comprised interpolation numerical value;
According to described resource, add instruction, in described server resource pond, start the first object virtual machine with described interpolation numerical value respective amount;
Described first object virtual machine is added in described server load.
2. method according to claim 1, is characterized in that, described obtain load state information after, described method also comprises:
Judge whether described load state information meets the second default alarm rule, if so, according to described load state information, generates resource unloading command, and described resource unloading command comprises unloading numerical value;
In described server load, close the second target virtual machine with described unloading numerical value respective amount;
Described the second target virtual machine is unloaded back in described server resource pond.
3. method according to claim 1 and 2, it is characterized in that, described the first alarm rule comprises that current load value corresponding to described load state information is greater than default first threshold, wherein, describedly judge that whether described load state information meets the first default alarm rule, comprising:
Resolve described load state information, obtain the current load value of described server load;
Judge whether described current load value is greater than described first threshold.
4. method according to claim 1 and 2, is characterized in that, described load state information comprises the current amount of space of having stored of described server load, and wherein, the described load state information of described foundation generates resource and adds instruction, comprising:
According to the current amount of space of having stored of server load described in described load state information, obtain the current needed target amount of memory of described server load;
According to described target amount of memory, generate resource and add instruction, described resource is added instruction and is comprised the interpolation numerical value corresponding with the size of described target amount of memory.
5. method according to claim 1 and 2, is characterized in that, the described resource of described foundation is added instruction, and the first object virtual machine of startup and described interpolation numerical value respective amount in described server resource pond, comprising:
Determine the idle virtual machine in idle condition in described server resource pond;
In described idle virtual machine, start the first object virtual machine with described interpolation numerical value respective amount.
6. an inking device for server resource, is characterized in that, is applied to default server resource pond, and described server resource pond comprises at least one station server, on every described server, is respectively equipped with at least one virtual machine, and described device comprises:
Load detecting module, for the server load corresponding with current application request monitored, obtains load state information;
The first judge module, for judging that whether described load state information meets the first default alarm rule, if so, triggers the first instruction generation module;
The first instruction generation module, adds instruction for generating resource according to described load state information, and described resource is added instruction and comprised interpolation numerical value;
Virtual machine activation module for adding instruction according to described resource, starts the first object virtual machine with described interpolation numerical value respective amount in described server resource pond;
Virtual machine adds module, for described first object virtual machine is added into described server load.
7. device according to claim 6, is characterized in that, also comprises:
The second judge module, for after described load detecting module obtains load state information, judges that whether described load state information meets the second default alarm rule, if so, triggers the second instruction generation module;
The second instruction generation module, for generating resource unloading command according to described load state information, described resource unloading command comprises unloading numerical value;
Virtual machine closing module, for closing the second target virtual machine with described unloading numerical value respective amount in described server load;
Virtual machine Unload module, for unloading go back to described server resource pond by described the second target virtual machine.
8. according to the device described in claim 6 or 7, it is characterized in that, described the first alarm rule comprises that current load value corresponding to described load state information is greater than default first threshold, and wherein, described the first judge module comprises:
Information analysis submodule, for resolving described load state information, obtains the current load value of described server load;
Load value judgement submodule, for judging whether described current load value is greater than described first threshold.
9. according to the device described in claim 6 or 7, it is characterized in that, described load state information comprises the current amount of space of having stored of described server load, and wherein, described the first instruction generation module comprises:
Object space obtains submodule, for according to the current amount of space of having stored of server load described in described load state information, obtains the current needed target amount of memory of described server load;
Instruction generates submodule, for according to described target amount of memory, generates resource and adds instruction, and described resource is added instruction and comprised the interpolation numerical value corresponding with the size of described target amount of memory.
10. according to the device described in claim 6 or 7, it is characterized in that, described virtual machine activation module comprises:
Idle definite submodule, for determining the idle virtual machine of described server resource pond in idle condition;
Target start submodule, for the first object virtual machine with described interpolation numerical value respective amount in described idle virtual machine startup.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310574598.0A CN103559093B (en) | 2013-11-15 | 2013-11-15 | The collocation method of a kind of server resource and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310574598.0A CN103559093B (en) | 2013-11-15 | 2013-11-15 | The collocation method of a kind of server resource and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103559093A true CN103559093A (en) | 2014-02-05 |
CN103559093B CN103559093B (en) | 2016-11-16 |
Family
ID=50013345
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310574598.0A Active CN103559093B (en) | 2013-11-15 | 2013-11-15 | The collocation method of a kind of server resource and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103559093B (en) |
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105407115A (en) * | 2014-09-03 | 2016-03-16 | 中国石油化工股份有限公司 | Load balance method and system based on VNC dispatching |
CN105786587A (en) * | 2014-12-23 | 2016-07-20 | 华为技术有限公司 | Expansion method and device for virtual machine VM |
CN107292741A (en) * | 2017-07-24 | 2017-10-24 | 中国银联股份有限公司 | A kind of resource allocation methods and device |
CN107766146A (en) * | 2016-08-23 | 2018-03-06 | 上海诺基亚贝尔股份有限公司 | Method and corresponding equipment for resource reconfiguration |
CN110502761A (en) * | 2019-08-27 | 2019-11-26 | 北京金山数字娱乐科技有限公司 | A kind of transcription platform and its load regulation method |
CN110620798A (en) * | 2018-06-19 | 2019-12-27 | 北京京东尚科信息技术有限公司 | Control method, system, equipment and storage medium for FTP connection |
CN111625334A (en) * | 2020-05-21 | 2020-09-04 | 慧众行知科技(北京)有限公司 | Service migration method and system |
CN112486682A (en) * | 2020-11-27 | 2021-03-12 | 德萱(天津)科技发展有限公司 | Server resource configuration processing method and system |
CN113472849A (en) * | 2021-05-31 | 2021-10-01 | 济南浪潮数据技术有限公司 | Node management method, system, device and medium |
CN113507441A (en) * | 2021-06-08 | 2021-10-15 | 中国联合网络通信集团有限公司 | Security resource expansion method, security protection management platform and data node |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101593133A (en) * | 2009-06-29 | 2009-12-02 | 北京航空航天大学 | Load balancing of resources of virtual machine method and device |
US20100162236A1 (en) * | 2008-12-22 | 2010-06-24 | Witchey Nicholas J | Using Stored State To Instantiate A Virtual Computer |
CN102279771A (en) * | 2011-09-02 | 2011-12-14 | 北京航空航天大学 | Method and system for adaptively allocating resources as required in virtualization environment |
CN102427475A (en) * | 2011-12-08 | 2012-04-25 | 曙光信息产业(北京)有限公司 | Load balance scheduling system in cloud computing environment |
CN102932418A (en) * | 2012-09-27 | 2013-02-13 | 东软集团股份有限公司 | Cloud application deploying method and device |
-
2013
- 2013-11-15 CN CN201310574598.0A patent/CN103559093B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100162236A1 (en) * | 2008-12-22 | 2010-06-24 | Witchey Nicholas J | Using Stored State To Instantiate A Virtual Computer |
CN101593133A (en) * | 2009-06-29 | 2009-12-02 | 北京航空航天大学 | Load balancing of resources of virtual machine method and device |
CN102279771A (en) * | 2011-09-02 | 2011-12-14 | 北京航空航天大学 | Method and system for adaptively allocating resources as required in virtualization environment |
CN102427475A (en) * | 2011-12-08 | 2012-04-25 | 曙光信息产业(北京)有限公司 | Load balance scheduling system in cloud computing environment |
CN102932418A (en) * | 2012-09-27 | 2013-02-13 | 东软集团股份有限公司 | Cloud application deploying method and device |
Cited By (18)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105407115A (en) * | 2014-09-03 | 2016-03-16 | 中国石油化工股份有限公司 | Load balance method and system based on VNC dispatching |
US10789084B2 (en) | 2014-12-23 | 2020-09-29 | Huawei Technologies Co., Ltd. | Virtual machine scaling method and device |
CN105786587A (en) * | 2014-12-23 | 2016-07-20 | 华为技术有限公司 | Expansion method and device for virtual machine VM |
CN107766146B (en) * | 2016-08-23 | 2021-11-05 | 上海诺基亚贝尔股份有限公司 | Method for resource reconfiguration and corresponding device |
CN107766146A (en) * | 2016-08-23 | 2018-03-06 | 上海诺基亚贝尔股份有限公司 | Method and corresponding equipment for resource reconfiguration |
US10904863B2 (en) | 2016-08-23 | 2021-01-26 | Alcatel Lucent | Method and device for resource reconfiguration |
WO2019019807A1 (en) * | 2017-07-24 | 2019-01-31 | 中国银联股份有限公司 | Resource allocation method and device |
CN107292741A (en) * | 2017-07-24 | 2017-10-24 | 中国银联股份有限公司 | A kind of resource allocation methods and device |
CN107292741B (en) * | 2017-07-24 | 2023-09-01 | 中国银联股份有限公司 | Resource allocation method and device |
CN110620798A (en) * | 2018-06-19 | 2019-12-27 | 北京京东尚科信息技术有限公司 | Control method, system, equipment and storage medium for FTP connection |
CN110620798B (en) * | 2018-06-19 | 2023-08-04 | 北京京东尚科信息技术有限公司 | Control method, system, equipment and storage medium for FTP connection |
CN110502761A (en) * | 2019-08-27 | 2019-11-26 | 北京金山数字娱乐科技有限公司 | A kind of transcription platform and its load regulation method |
CN110502761B (en) * | 2019-08-27 | 2023-09-19 | 北京金山数字娱乐科技有限公司 | Translation platform and load adjustment method thereof |
CN111625334A (en) * | 2020-05-21 | 2020-09-04 | 慧众行知科技(北京)有限公司 | Service migration method and system |
CN112486682A (en) * | 2020-11-27 | 2021-03-12 | 德萱(天津)科技发展有限公司 | Server resource configuration processing method and system |
CN113472849A (en) * | 2021-05-31 | 2021-10-01 | 济南浪潮数据技术有限公司 | Node management method, system, device and medium |
CN113472849B (en) * | 2021-05-31 | 2022-10-28 | 济南浪潮数据技术有限公司 | Node management method, system, device and medium |
CN113507441A (en) * | 2021-06-08 | 2021-10-15 | 中国联合网络通信集团有限公司 | Security resource expansion method, security protection management platform and data node |
Also Published As
Publication number | Publication date |
---|---|
CN103559093B (en) | 2016-11-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103559093A (en) | Resource allocation method and device for servers | |
CN108287669B (en) | Date storage method, device and storage medium | |
CN107622091B (en) | Database query method and device | |
CN102362464B (en) | Memory access monitoring method and device | |
CN102929783B (en) | The methods, devices and systems that a kind of data store | |
CN115277566B (en) | Load balancing method and device for data access, computer equipment and medium | |
CN111638953B (en) | Method, device and storage medium for realizing GPU virtualization | |
CN108063784A (en) | The methods, devices and systems of application cluster resource allocation under a kind of cloud environment | |
CN112269661B (en) | Partition migration method and device based on Kafka cluster | |
US20190012087A1 (en) | Method, apparatus, and system for preventing loss of memory data | |
CN108376110A (en) | A kind of automatic testing method, system and terminal device | |
CN114462786A (en) | Line loss judgment method, device, equipment, storage medium and program product | |
CN115033551A (en) | Database migration method and device, electronic equipment and storage medium | |
CN112559565B (en) | Abnormality detection method, system and device | |
CN117435129A (en) | Storage cluster expansion method and device, computer equipment and storage medium | |
CN116302580B (en) | Method and device for scheduling calculation force resources of nano relay | |
CN117149382A (en) | Virtual machine scheduling method, device, computer equipment and storage medium | |
CN110866127A (en) | Method for establishing index and related device | |
CN114064806A (en) | Distributed serial number generation method and device, computer equipment and storage medium | |
CN113051143A (en) | Detection method, device, equipment and storage medium for service load balancing server | |
CN111817895B (en) | Master control node switching method, device, equipment and storage medium | |
CN105763508A (en) | Data access method and application server | |
CN110968370B (en) | Data processing method and device | |
CN104750689A (en) | Picture display method and device used for browser startup process and terminal equipment | |
CN114610575B (en) | Method, apparatus, device and medium for calculating updated peak value of branch |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant |