Summary of the invention
The invention provides and a kind of to bind method of adjustment and device for energy consumption, for the power cap value different according to distinct device demand assignment, thus improve the utilization factor of electric energy.
First aspect of the present invention is to provide a kind of energy consumption and binds method of adjustment, comprising:
The load condition of each equipment in acquisition group;
Running the service priority of business according to each equipment in the load condition of each equipment in described group and described group, each equipment in described group is being sorted;
According to equipment sequence each in described group, obtain the power cap value of each equipment in described group.
In conjunction with first aspect, in the implementation that the first is possible, in described group of described acquisition each equipment load condition before, also comprise:
Obtain the power cap initial value of each equipment in described group;
Obtain the power cap adjustment effective range of each described equipment in described group.
In conjunction with the first possible implementation of first aspect, in the implementation that the second is possible, in described group, the power cap initial value of each equipment is obtained by following formula:
Wherein, described P
xifor the power cap initial value of each equipment in described group, described CPU
xifor the CPU average utilization of i-th equipment in described group, described in
for the average utilization sum of n equipment in described group, described G is group power cap initial value;
Described power cap adjustment effective range, comprising:
In described group, the power cap value of each equipment is more than or equal to the minimum effective power consumption value of each described equipment in described group, and in described group, the power cap value of each equipment is less than or equal to the maximum effective work consumption value of each described equipment in described group.
In conjunction with each possible implementation above-mentioned of first aspect or first aspect, in the implementation that the third is possible, the load condition of each equipment in described group of described acquisition, comprising:
The CPU average utilization of each described equipment in described group is obtained according to historical data;
In the described load condition according to each equipment in described group and described group, each equipment is running the service priority of business, carries out sequence comprise each equipment in described group:
The mean value of the CPU average utilization of armamentarium in described group is obtained by following formula:
Wherein, described in
for the mean value of the CPU average utilization of armamentarium in described group,
for the CPU average utilization sum of armamentarium in described group, described n is armamentarium number in described group;
Armamentarium in described group is divided to the first subgroup or the second subgroup respectively, wherein, described in the CPU average utilization of each equipment of described first subgroup is more than or equal to
described in the CPU average utilization of each equipment of described second subgroup is less than
The service priority of business is being run according to each equipment of described first subgroup, from high to low each equipment of described first subgroup is sorted, if the service priority that described first subgroup at least two equipment are running business is identical, then according to the size of the CPU average utilization of described first subgroup at least two equipment, from high to low described first subgroup at least two equipment are sorted;
The service priority of business is being run according to each equipment of described second subgroup, from low to high each equipment of described second subgroup is sorted, if the service priority that described second subgroup at least two equipment are running business is identical, then according to the size of the CPU average utilization of described second subgroup at least two equipment, from low to high described first subgroup at least two equipment are sorted;
The power cap added value of described first subgroup i-th equipment or the power cap reduced value of described second subgroup i-th equipment are obtained by following formula:
Wherein, Δ
ifor the power cap added value of described first subgroup i-th equipment or the power cap reduced value of described second subgroup i-th equipment, described P
i bfor the power cap value of described second subgroup setting last time, described CPU
i bfor the CPU average utilization of described second subgroup i-th equipment;
The power cap theoretical value of described first subgroup i-th equipment is obtained by following formula:
A
i=P
i A+Δ
i
Wherein, described A
ifor the power cap theoretical value of described first subgroup i-th equipment;
The power cap theoretical value of described second subgroup i-th equipment is obtained by following formula:
B
i=P
i B-Δ
i
Wherein, described B
ifor the power cap theoretical value of described second subgroup i-th equipment;
The power cap value of described first subgroup i-th equipment is obtained by following formula:
Wherein, described newP
i afor the power cap value of described first subgroup i-th equipment, described P
i afor the power cap value of described first i-th equipment last time of subgroup, described P
i bfor the power cap value of described second i-th equipment last time of subgroup, described in
for the minimum effective power consumption value of described second subgroup i-th equipment, described in
be the maximum effective work consumption value of the second subgroup i-th equipment, described in
for the minimum effective power consumption value of described first subgroup i-th equipment, described in
it is the maximum effective work consumption value of the first subgroup i-th equipment;
The power cap value of described second subgroup i-th equipment is obtained by following formula:
Wherein, described newP
i bfor the power cap value of described second subgroup i-th equipment.
Second aspect of the present invention is to provide a kind of energy consumption and binds adjusting gear, comprising:
Acquisition module, for obtaining the load condition of each equipment in group;
Order module, for running the service priority of business according to each equipment in the load condition of each equipment in described group and described group, is sorting to each equipment in described group;
Described acquisition module, also for according to equipment sequence each in described group, obtains the power cap value of each equipment in described group.
In conjunction with second aspect, in the implementation that the first is possible, described acquisition module, also for before obtaining the load condition of each equipment in described group at described acquisition module, obtains the power cap initial value of each equipment in described group;
Described acquisition module, also for obtaining the power cap adjustment effective range of each described equipment in described group.
In conjunction with the first possible implementation of second aspect, in the implementation that the second is possible, in described group, the power cap initial value of each equipment is obtained by following formula:
Wherein, described P
xifor the power cap initial value of each equipment in described group, described CPU
xifor the CPU average utilization of i-th equipment in described group, described in
for the average utilization sum of n equipment in described group, described G is group power cap initial value;
Described power cap adjustment effective range, comprising:
In described group, the power cap value of each equipment is more than or equal to the minimum effective power consumption value of each described equipment in described group, and in described group, the power cap value of each equipment is less than or equal to the maximum effective work consumption value of each described equipment in described group.
In conjunction with each possible implementation above-mentioned of second aspect or second aspect, in the implementation that the third is possible, described acquisition module, specifically for obtaining the CPU average utilization of each described equipment in described group according to historical data;
Described acquisition module, specifically also for being obtained the mean value of the CPU average utilization of armamentarium in described group by following formula:
Wherein, described in
for the mean value of the CPU average utilization of armamentarium in described group,
for the CPU average utilization sum of armamentarium in described group, described n is armamentarium number in described group;
Described order module, specifically for armamentarium in described group is divided to the first subgroup or the second subgroup respectively, wherein, described in the CPU average utilization of each equipment of described first subgroup is more than or equal to
described in the CPU average utilization of each equipment of described second subgroup is less than
Described order module, concrete also for running the service priority of business according to each equipment of described first subgroup, from high to low each equipment of described first subgroup is sorted, if the service priority that described first subgroup at least two equipment are running business is identical, then according to the size of the CPU average utilization of described first subgroup at least two equipment, from high to low described first subgroup at least two equipment are sorted;
Described order module, concrete also for running the service priority of business according to each equipment of described second subgroup, from low to high each equipment of described second subgroup is sorted, if the service priority that described second subgroup at least two equipment are running business is identical, then according to the size of the CPU average utilization of described second subgroup at least two equipment, from low to high described first subgroup at least two equipment are sorted;
Described acquisition module, specifically also for obtaining the power cap added value of described first subgroup i-th equipment or the power cap reduced value of described second subgroup i-th equipment by following formula:
Wherein, Δ
ifor the power cap added value of described first subgroup i-th equipment or the power cap reduced value of described second subgroup i-th equipment, described P
i bfor the power cap value of described second subgroup setting last time, described CPU
i bfor the CPU average utilization of described second subgroup i-th equipment;
Described acquisition module, specifically also for being obtained the power cap theoretical value of described first subgroup i-th equipment by following formula:
A
i=P
i A+Δ
i
Wherein, described A
ifor the power cap theoretical value of described first subgroup i-th equipment;
Described acquisition module, specifically also for being obtained the power cap theoretical value of described second subgroup i-th equipment by following formula:
B
i=P
i B-Δ
i
Wherein, described B
ifor the power cap theoretical value of described second subgroup i-th equipment;
Described acquisition module, specifically also for being obtained the power cap value of described first subgroup i-th equipment by following formula:
Wherein, described newP
i afor the power cap value of described first subgroup i-th equipment, described P
i afor the power cap value of described first i-th equipment last time of subgroup, described P
i bfor the power cap value of described second i-th equipment last time of subgroup, described in
for the minimum effective power consumption value of described second subgroup i-th equipment, described in
be the maximum effective work consumption value of the second subgroup i-th equipment, described in
for the minimum effective power consumption value of described first subgroup i-th equipment, described in
it is the maximum effective work consumption value of the first subgroup i-th equipment;
Described acquisition module, specifically also for being obtained the power cap value of described second subgroup i-th equipment by following formula:
Wherein, described newP
i bfor the power cap value of described second subgroup i-th equipment.
The energy consumption that the present embodiment provides binds method of adjustment and device, by the load condition of equipment each in acquisition group, the service priority of business is being run again according to the interior each equipment of load condition and group organizing interior each equipment, each equipment in group is sorted, and according to interior each equipment sequence, the power cap value of each equipment in acquisition group.Achieve for the different load condition of each equipment and each equipment run business importance distribute different power cap value to different equipment, thus improve the utilization factor of electric energy.
Embodiment
For making the object of the embodiment of the present invention, technical scheme and advantage clearly, below in conjunction with the accompanying drawing in the embodiment of the present invention, technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
Fig. 1 to bind method of adjustment schematic flow sheet for energy consumption that the present embodiment provides, and as shown in Figure 1, the method comprises the steps:
The load condition of each equipment in step 100, acquisition group.
Step 101, running the service priority of business according to each equipment in the load condition of each equipment in group and group, each equipment in group is being sorted.
Step 102, according to each equipment sequence in group, the power cap value of each equipment in acquisition group.
The energy consumption that the present embodiment provides binds method of adjustment, by the load condition of equipment each in acquisition group, the service priority of business is being run again according to the interior each equipment of load condition and group organizing interior each equipment, each equipment in group is sorted, and according to interior each equipment sequence, the power cap value of each equipment in acquisition group.Achieve for the different load condition of each equipment and each equipment run business importance distribute different power cap value to different equipment, thus improve the utilization factor of electric energy.
Further, before Fig. 1 step 100, also comprise:
The power cap initial value of each equipment in step 103, acquisition group.
The power cap adjustment effective range of each equipment in step 104, acquisition group.
Concrete, power cap adjustment effective range, comprise: in group, the power cap value of each equipment is more than or equal to the minimum effective power consumption value of each described equipment in group, and in group, the power cap value of each equipment is less than or equal to the maximum effective work consumption value of each equipment in group.
It should be noted that, the power cap value finally distributing to each equipment should not exceed the power cap adjustment effective range of each equipment in group, application for the power cap adjustment effective range of each equipment in group will be described in detail in Examples below, repeat no more herein.
Preferably, in step 103, in group, the power cap initial value of each equipment is obtained by following formula (1):
Wherein, P
xifor organizing the power cap initial value of interior each equipment, CPU
xifor organizing the CPU average utilization of interior i-th equipment,
for organizing the average utilization sum of an interior n equipment, G is group power cap initial value.
Preferably, in Fig. 1, a kind of possible implementation of step 100 is:
Step 100a, CPU average utilization CPU according to each equipment in historical data acquisition group
xi;
Wherein, historical data by obtaining the cpu busy percentage of each equipment in a period of time, and can obtain the CPU average utilization CPU of each equipment in this period according to these cpu busy percentages
xi.This period is for each equipment distributes a period of time before the moment of power cap value.
Preferably, in Fig. 1, a kind of possible implementation of step 102 is:
Step 102a, mean value by the CPU average utilization of armamentarium in following formula (2) acquisition group
Wherein,
for organizing the mean value of the CPU average utilization of interior armamentarium,
for organizing the CPU average utilization sum of interior armamentarium, n is armamentarium number in group.
Step 102b, armamentarium in group is divided to the first subgroup or the second subgroup respectively, wherein, the CPU average utilization of each equipment of the first subgroup is more than or equal to
the CPU average utilization of each equipment of the second subgroup is less than
Step 102c, running the service priority of business according to each equipment of the first subgroup, from high to low each equipment of the first subgroup is sorted, if the service priority that the first subgroup at least two equipment is running business is identical, then according to the size of the cpu busy percentage of the first subgroup at least two equipment, from high to low the first subgroup at least two equipment are sorted.
Step 102d, running the service priority of business according to each equipment of the second subgroup, from low to high each equipment of the second subgroup is sorted, if the service priority that the second subgroup at least two equipment is running business is identical, then according to the size of the CPU average utilization of the second subgroup at least two equipment, from low to high the first subgroup at least two equipment are sorted.
The power cap added value of step 102e, the first subgroup i-th equipment or the power cap reduced value of the second subgroup i-th equipment are obtained by following formula (3):
Wherein, Δ
ibe the power cap added value of the first subgroup i-th equipment or the power cap reduced value of the second subgroup i-th equipment, P
i bbe the power cap value of the second subgroup setting last time, CPU
i bit is the CPU average utilization of the second subgroup i-th equipment;
The power cap theoretical value of the first subgroup i-th equipment is obtained by following formula (4):
A
i=P
i A+Δ
i(4);
Wherein, A
iit is the power cap theoretical value of the first subgroup i-th equipment;
The power cap theoretical value of the second subgroup i-th equipment is obtained by following formula (5):
B
i=P
i B-Δ
i(5);
Wherein, B
iit is the power cap theoretical value of the second subgroup i-th equipment;
Further, after the power cap theoretical value obtaining the power cap theoretical value of the first subgroup i-th equipment, the second subgroup i-th equipment, need guarantee two power cap theoretical values to meet the power cap adjustment effective range of above-mentioned first subgroup i-th equipment and the second subgroup i-th equipment, thus obtain the power cap value of last first subgroup i-th equipment and the power cap value of the second subgroup i-th equipment.
Concrete, as the power cap theoretical value B of the second subgroup i-th equipment
iwhen being less than the minimum effective power consumption value of the second subgroup i-th equipment, now the power cap value of the first subgroup i-th equipment is obtained by following formula (6):
Or, as the power cap theoretical value A of the first subgroup i-th equipment
iwith the power cap theoretical value B of the second subgroup i-th equipment
iwhen all not exceeding power cap adjustment effective range, now the power cap value of the first subgroup i-th equipment is obtained by following formula (7):
Or, as the power cap theoretical value A of the first subgroup i-th equipment
ibe greater than the maximum effective work consumption value P of the first subgroup i-th equipment
ai maxtime, now the power cap value of the first subgroup i-th equipment is obtained by following formula (8):
Wherein, newP
i abe the power cap value of the first subgroup i-th equipment, P
i abe the power cap value of first i-th equipment last time of subgroup, P
i bbe the power cap value of second i-th equipment last time of subgroup,
be the minimum effective power consumption value of the second subgroup i-th equipment,
be the maximum effective work consumption value of the second subgroup i-th equipment,
be the minimum effective power consumption value of the first subgroup i-th equipment,
it is the maximum effective work consumption value of the first subgroup i-th equipment.
Similar, as the power cap theoretical value B of the second subgroup i-th equipment
iwhen being less than the minimum effective power consumption value of the second subgroup i-th equipment, now the power cap value of the second subgroup i-th equipment is obtained by following formula (9):
Or, as the power cap theoretical value A of the first subgroup i-th equipment
iwith the power cap theoretical value B of the second subgroup i-th equipment
iwhen all not exceeding power cap adjustment effective range, now the power cap value of the second subgroup i-th equipment is obtained by following formula:
Or, as the power cap theoretical value A of the first subgroup i-th equipment
ibe greater than the maximum effective work consumption value P of the first subgroup i-th equipment
ai maxtime, now the power cap value of the second subgroup i-th equipment is obtained by following formula (10):
Wherein, newP
i bit is the power cap value of the second subgroup i-th equipment.
Below by a specific embodiment; the above-mentioned energy consumption method of adjustment that binds is described: if certain frame has 5 servers; frame is maximum is that (the power cap value value of frame is 1500W to 1500W for electrical power consumed; build reference formula (1) above; G=1500W), power cap value dynamic conditioning cycle T=10min; Get previous hour cpu busy percentage data estimation plant capacity cap value.Time initial, obtain the cpu busy percentage mean value of previous hour as table 1.(the less priority of service priority value is higher)
When table 1 is initial, group server load and service priority situation
Step 200, according to table 1, CPU average utilization obtains the initial power cap value of every platform equipment, the power cap value as equipment 1: 1500*(0.32/ (0.32+0.53+0.37+0.41+0.68))=208w; The similar acquisition of other equipment, every platform equipment initial power cap value equipment is as table 2.
In table 2 group, plant capacity binds initial value
Step 201, acquisition power cap adjustment effective range:
For platform equipment every in group, getting the power consumption mean value of cpu busy percentage when 1%-5% is minimum effective power consumption value, and 110% of power consumption when getting cpu busy percentage 100% be the maximum effective work consumption value of the interior each equipment of group.Acquisition result is as shown in table 3.
Table 3 power cap adjustment effective range
When each adjustment cycle arrives, (every T=10min) is with regard to by the step1 in above-mentioned algorithm)-step5) carry out estimated power cap value again.If the complete rear 10min of initialization.
In step 202, acquisition group, every platform equipment CPU average utilization of last hour, as shown in table 4.
Table 4 equipment CPU average utilization and operation service priority situation
The mean value of all devices CPU average utilization in step 203, acquisition group
be 0.418.
Step 204, CPU average utilization is greater than 0.418 assign to the first subgroup A, all the other equipment assign to the second subgroup B; Namely equipment 2,3 belongs to the first subgroup A, and equipment 1,4,5 belongs to the second subgroup B.First sorted from high to low by current operation service priority by equipment in first subgroup A, the equipment then for All factors being equal, preference will be give to level sorts from high to low by CPU average utilization again; I.e. equipment order in the rear first subgroup A of sequence: 2,3.First sort from low to high by service priority for equipment in the second subgroup B, then identical to service priority equipment sorts from low to high by cpu busy percentage again; Then after the drained sequence of the second subgroup B, equipment order is: 4,5,1.
Step 204, power cap value from new estimation device:
The performance number that equipment 4 is cut down is added to equipment 2, equipment 5 cut down the equipment that is added to 3 (because the first subgroup A does not have miscellaneous equipment again, thus equipment 1 this do not adjust power cap value); Namely the power cap value of equipment 2 to 5 resets by the following result that obtains:
The new power cap value of equipment 2: 344+266*(0.418 – 0.27)=383, due to the 383 maximum effective work consumption values being greater than equipment (with reference to table 3, the maximum effective work consumption value of this equipment 2 is 380); Therefore the power cap value of this adjustment equipment 2 is 380; The new power cap value of equipment 4: 266-(380-344)=230;
The new power cap value of equipment 3: 240+442*(0.418 – 0.33)=279 (in power cap adjustment effective ranges); The new power cap value of equipment 5: 442 – 442* (0.418-0.33)=403 (in power cap adjustment effective range).So after this adjustment, in group, the power cap value of each equipment is as shown in table 5.
Power cap value after table 5 adjusts
The above embodiment of the present invention, by considering the priority case of the current operation business of equipment, makes the equipment of current operation high-priority service can suitably distribute some more electric energy; Both power cap was carried out to equipment in group, and can avoid again impacting important service simultaneously as far as possible.And further contemplate again apparatus of load situation, this makes power division can be more reasonable.
Fig. 2 to bind adjusting gear structural representation for energy consumption that the embodiment of the present invention provides, and it should be noted that, this device arranges on the server or has energy consumption to adjust in the cabinet of demand.With reference to Fig. 2, this device comprises: acquisition module 10, order module 11.
Acquisition module 10, for obtaining the load condition of each equipment in group;
Order module 11, for running the service priority of business according to the interior each equipment of load condition and group organizing interior each equipment, is sorting to organizing interior each equipment;
Acquisition module 10, also for sorting according to equipment each in group, the power cap value of each equipment in acquisition group.
The energy consumption that the present embodiment provides binds method of adjustment, the load condition organizing interior each equipment is determined by acquisition module, order module is running the service priority of business according to each equipment in the load condition of each equipment in group and group, each equipment in group is sorted, acquisition module sorts according to interior each equipment, the power cap value of each equipment in acquisition module calculating group.Achieve for the different load condition of each equipment and each equipment run business importance distribute different power cap value to different equipment, thus improve the utilization factor of electric energy.
Further, acquisition module 10, before the load condition also for each equipment in acquisition module 10 acquisition group, the power cap initial value of each equipment in acquisition group;
Acquisition module 10, also for obtaining the power cap adjustment effective range of each equipment in group.
Further, in group, the power cap initial value of each equipment is obtained by following formula:
Wherein, P
xifor organizing the power cap initial value of interior each equipment, CPU
xifor organizing the CPU average utilization of interior i-th equipment,
for organizing the average utilization sum of an interior n equipment, G is group power cap initial value.
Power cap adjustment effective range, comprising:
In group, the power cap value of each equipment is more than or equal to the minimum effective power consumption value of each equipment in group, and in group, the power cap value of each equipment is less than or equal to the maximum effective work consumption value of each equipment in group.
Preferably, acquisition module 10, specifically for the CPU average utilization CPU according to each equipment in historical data acquisition group
xi;
Acquisition module 10, specifically also for the mean value by the CPU average utilization of armamentarium in following formula acquisition group:
Wherein,
for organizing the mean value of the CPU average utilization of interior armamentarium,
for organizing the CPU average utilization sum of interior armamentarium, n is armamentarium number in group;
Order module 11, specifically for armamentarium in group is divided to the first subgroup or the second subgroup respectively, wherein, the CPU average utilization of each equipment of the first subgroup is more than or equal to
the CPU average utilization of each equipment of the second subgroup is less than
Order module 11, concrete also for running the service priority of business according to each equipment of the first subgroup, from high to low each equipment of the first subgroup is sorted, if the service priority that the first subgroup at least two equipment is running business is identical, then according to the size of the CPU average utilization of the first subgroup at least two equipment, from high to low the first subgroup at least two equipment are sorted;
Order module 11, concrete also for running the service priority of business according to each equipment of the second subgroup, from low to high each equipment of the second subgroup is sorted, if the service priority that the second subgroup at least two equipment is running business is identical, then according to the size of the CPU average utilization of the second subgroup at least two equipment, from low to high the first subgroup at least two equipment are sorted;
Acquisition module 10, specifically also for the power cap reduced value of the power cap added value or the second subgroup i-th equipment that are obtained the first subgroup i-th equipment by following formula:
Wherein, Δ
ibe the power cap added value of the first subgroup i-th equipment or the power cap reduced value of the second subgroup i-th equipment, P
i bbe the power cap value of the second subgroup setting last time, CPU
i bit is the CPU average utilization of the second subgroup i-th equipment;
Acquisition module 10, specifically also for being obtained the power cap theoretical value of the first subgroup i-th equipment by following formula:
A
i=P
i A+Δ
i;
Wherein, A
iit is the power cap theoretical value of the first subgroup i-th equipment;
Acquisition module 10, specifically also for being obtained the power cap theoretical value of the second subgroup i-th equipment by following formula:
B
i=P
i B-Δ
i;
Wherein, B
iit is the power cap theoretical value of the second subgroup i-th equipment;
Acquisition module 10, specifically also for being obtained the power cap value of the first subgroup i-th equipment by following formula:
Wherein, newP
i abe the power cap value of the first subgroup i-th equipment, P
i abe the power cap value of first i-th equipment last time of subgroup, P
i bbe the power cap value of second i-th equipment last time of subgroup,
be the minimum effective power consumption value of the second subgroup i-th equipment,
be the maximum effective work consumption value of the second subgroup i-th equipment,
be the minimum effective power consumption value of the first subgroup i-th equipment,
it is the maximum effective work consumption value of the first subgroup i-th equipment;
Acquisition module 10, specifically also for being obtained the power cap value of the second subgroup i-th equipment by following formula:
Wherein,
it is the power cap value of the second subgroup i-th equipment.
One of ordinary skill in the art will appreciate that: all or part of step realizing above-mentioned each embodiment of the method can have been come by the hardware that programmed instruction is relevant.Aforesaid program can be stored in an acquisition machine read/write memory medium.This program, when performing, performs the step comprising above-mentioned each embodiment of the method; And aforesaid storage medium comprises: ROM, RAM, magnetic disc or CD etc. various can be program code stored medium.
Last it is noted that above each embodiment is only in order to illustrate technical scheme of the present invention, be not intended to limit; Although with reference to foregoing embodiments to invention has been detailed description, those of ordinary skill in the art is to be understood that: it still can be modified to the technical scheme described in foregoing embodiments, or carries out equivalent replacement to wherein some or all of technical characteristic; And these amendments or replacement, do not make the essence of appropriate technical solution depart from the scope of various embodiments of the present invention technical scheme.