CN105653459A - Application power consumption measuring method and device - Google Patents

Application power consumption measuring method and device Download PDF

Info

Publication number
CN105653459A
CN105653459A CN201610021875.9A CN201610021875A CN105653459A CN 105653459 A CN105653459 A CN 105653459A CN 201610021875 A CN201610021875 A CN 201610021875A CN 105653459 A CN105653459 A CN 105653459A
Authority
CN
China
Prior art keywords
power consumption
application
parameter sets
target
intended application
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.)
Pending
Application number
CN201610021875.9A
Other languages
Chinese (zh)
Inventor
付长春
杜广源
娄宏骏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
BGP Inc
CNPC Beijing Richfit Information Technology Co Ltd
Original Assignee
BGP Inc
CNPC Beijing Richfit Information Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by BGP Inc, CNPC Beijing Richfit Information Technology Co Ltd filed Critical BGP Inc
Priority to CN201610021875.9A priority Critical patent/CN105653459A/en
Publication of CN105653459A publication Critical patent/CN105653459A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management

Abstract

The invention discloses an application power consumption measuring method and device and belongs to the technical field of computers. The method includes the steps that two or more initial power consumption parameter sets obtained when a target application operates are obtained; a target power consumption parameter set is determined according to the two or more initial power consumption parameter sets, and the target power consumption parameter set is the average value of the two or more initial power consumption parameter sets; a three-dimensional lookup table (LUT) is established according to the target power consumption parameter set; a set of target variable parameters obtained when the target application operates is obtained; the target dynamic power consumption corresponding to the set of target variable parameters is searched for in the three-dimensional LUT; the overall power consumption of the target application is determined according to the target dynamic power consumption. The application power consumption measuring method and device solve the problem that application power consumption measurement is poor in accuracy, accuracy of application power consumption measurement is improved, and the application power consumption measuring method and device are used for power consumption measurement of applications.

Description

Application power consumption measurement method and device
Technical field
The present invention relates to field of computer technology, particularly to one application power consumption measurement method and device.
Background technology
Computer can run multiple application, in order to the multiple application run on computer are managed, it is necessary to the overall power measurement to each application run on computer.
The overall power of application is made up of the dynamic power consumption of the quiescent dissipation applied and application. In correlation technique, linear function model is used to use the relation of state value to be described with computer the dynamic power consumption of application. First, in the process that application runs, it is possible to gather the use state value of dynamic power consumption and the computer do not applied in the same time, then, with the use state value of computer for variable, with the dynamic power consumption of application for functional value, linear function model is set up. When needing to measure this application overall power at a time, the quiescent dissipation of this application can be obtained, then the use state value at this moment computer is obtained, the state value that uses of this moment computer is substituted into the linear function model established, draw the dynamic power consumption that this moment applies, and using overall power as this application of the quiescent dissipation of this application and dynamic power consumption sum.
Owing to the functional value of linear function model has the feature of linear change, but the dynamic power consumption of certain some application does not have the feature of linear change, use linear function model cannot measure the dynamic power consumption without linear change feature accurately, and then the overall power of application cannot be measured accurately, therefore, the accuracy applying measurement of power loss is poor.
Summary of the invention
In order to solve the poor problem of accuracy of application measurement of power loss, the invention provides a kind of application power consumption measurement method and device. Described technical scheme is as follows:
On the one hand, it is provided that a kind of application power consumption measurement method, described method includes:
Obtain the initial power consumption parameter sets of at least two when intended application is run, each initial power consumption parameter sets includes at least one power consumption parameter subset, each power consumption parameter subset includes: one group of variable parameter and dynamic power consumption corresponding to described one group of variable parameter, described one group of variable parameter includes: central processor CPU utilization rate, most last level cache LLC miss rate and magnetic disc access rate, each initial power consumption parameter sets includes: in described intended application running, different cpu busy percentages, different LLC miss rates and different magnetic disc access rate;
According to the initial power consumption parameter sets of described at least two, it is determined that target power consumption parameter sets, described target power consumption parameter sets is the average of the initial power consumption parameter sets of described at least two;
According to described target power consumption parameter sets, set up three dimensional lookup table LUT, when described three-dimensional LUT is used for recording the operation of described intended application, the often corresponding relation of group variable parameter and dynamic power consumption;
Obtain one group of target variable parameter when described intended application is run;
Described three-dimensional LUT searches the target dynamic power consumption that described one group of target variable parameter is corresponding;
The overall power of described intended application is determined according to described target dynamic power consumption.
Optionally, described intended application is run on computers, and before the initial power consumption parameter sets of at least two when described acquisition intended application is run, described method also includes:
On described computer during any application of off-duty, obtain the quiescent dissipation of described computer;
The overall power of described intended application is determined according to described target dynamic power consumption, including:
Obtain the number of the application run on described computer;
The number of the application run on the quiescent dissipation according to described computer, described computer and quiescent dissipation computing formula, it is determined that quiescent dissipation when described intended application is run, described quiescent dissipation computing formula is:
PApp(i)_static=PHost_static/NApp;
Wherein, described PApp(i)_staticQuiescent dissipation when running for described intended application, described PHost_staticFor the quiescent dissipation of described computer, described NAppThe number of the application for running on described computer;
Quiescent dissipation when running according to described intended application, described target dynamic power consumption and overall power computing formula, it is determined that the overall power of described intended application, described overall power computing formula is:
PApp(i)=PApp(i)_static+PApp(i)_dynamic;
Wherein, described PApp(i)For the overall power of described intended application, described PApp(i)_dynamicFor the dynamic power consumption of described correspondence, described PApp(i)_staticQuiescent dissipation for described intended application.
Optionally, according to described target power consumption parameter sets, set up three-dimensional LUT, including:
According to described target power consumption parameter sets, it is determined that the excursion of the excursion of cpu busy percentage, the excursion of described LLC miss rate and described magnetic disc access rate;
Excursion according to described cpu busy percentage, the excursion of described LLC miss rate, the excursion of described magnetic disc access rate and described target power consumption parameter sets, set up initial LUT, described initial LUT is provided with at least one position, each position is corresponding with one group of variable parameter, on the position that in described target power consumption parameter sets, arbitrary group of variable parameter is corresponding, record has the dynamic power consumption that described arbitrary group of variable parameter is corresponding;
According to the dynamic power consumption in described target power consumption parameter sets, it is determined that the room dynamic power consumption that room variable parameter is corresponding, the position that described room variable parameter is corresponding does not record dynamic power consumption;
Described room dynamic power consumption is inserted the position that described room variable parameter is corresponding, obtains described three-dimensional LUT.
Optionally, the initial power consumption parameter sets of at least two when described acquisition intended application is run, including:
Determining n at least two boot sequence applied, described n application includes described intended application, and described n is more than or equal to 1;
On described computer during off-duty application, according to the first boot sequence, described computer starts described n application successively, as i > 1, and when starting i+1 application, the 1st all operates on described computer to i-th application, and described first boot sequence is the arbitrary boot sequence in described at least two boot sequence, described i is more than or equal to 1, and less than or equal to n;
After starting i-th application, obtain the initial power consumption parameter sets when application of described i-th runs.
Optionally, the initial power consumption parameter sets of at least two when described acquisition intended application is run, including:
Determining n at least two boot sequence applied, described n application includes described intended application, and described n is more than or equal to 1;
On described computer during off-duty application, according to the first boot sequence, described computer starts described n application successively, when starting i-th application, on described computer, off-duty has any application, described first boot sequence is the arbitrary boot sequence in described at least two boot sequence, and described i is more than or equal to 1, and less than or equal to n;
When starting i-th application, obtain the initial power consumption parameter sets when application of described i-th runs.
Optionally, the excursion of described cpu busy percentage is: [0%, 400%); The unit of described LLC miss rate be 1000000 times per second, the excursion of described LLC miss rate is: [0,500), the unit of described magnetic disc access rate be 1000 times per second, the excursion of described magnetic disc access rate is: [0,50).
Optionally, described target power consumption parameter sets includes: in described intended application running, all different cpu busy percentages, all different LLC miss rates and all different magnetic disc access rate.
On the other hand, it is provided that a kind of application measurement of power loss device, described application measurement of power loss device includes:
First acquisition module, for obtaining the initial power consumption parameter sets of at least two when intended application is run, each initial power consumption parameter sets includes at least one power consumption parameter subset, each power consumption parameter subset includes: one group of variable parameter and dynamic power consumption corresponding to described one group of variable parameter, described one group of variable parameter includes: central processor CPU utilization rate, most last level cache LLC miss rate and magnetic disc access rate, described target power consumption parameter sets includes: in described intended application running, different cpu busy percentages, different LLC miss rates and different magnetic disc access rate,
First determines module, and for according to the initial power consumption parameter sets of described at least two, it is determined that target power consumption parameter sets, described target power consumption parameter sets is the average of the initial power consumption parameter sets of described at least two;
Set up module, for according to described target power consumption parameter sets, setting up three dimensional lookup table LUT, when described three-dimensional LUT is used for recording the operation of described intended application, the often corresponding relation of group variable parameter and dynamic power consumption;
Second acquisition module, for obtaining one group of target variable parameter when described intended application is run;
Search module, for searching, in described three-dimensional LUT, the target dynamic power consumption that described one group of target variable parameter is corresponding;
Second determines module, for determining the overall power of described intended application according to described target dynamic power consumption.
Optionally, described intended application is run on computers, and described application measurement of power loss device also includes:
3rd acquisition module, during application any for off-duty on described computer, obtains the quiescent dissipation of described computer;
Described second determines that module is additionally operable to:
Obtain the number of the application run on described computer;
The number of the application run on the quiescent dissipation according to described computer, described computer and quiescent dissipation computing formula, it is determined that quiescent dissipation when described intended application is run, described quiescent dissipation computing formula is:
PApp(i)_static=PHost_static/NApp;
Wherein, described PApp(i)_staticQuiescent dissipation when running for described intended application, described PHost_staticFor the quiescent dissipation of described computer, described NAppThe number of the application for running on described computer;
Quiescent dissipation when running according to described intended application, described target dynamic power consumption and overall power computing formula, it is determined that the overall power of described intended application, described overall power computing formula is:
PApp(i)=PApp(i)_static+PApp(i)_dynamic;
Wherein, described PApp(i)For the overall power of described intended application, described PApp(i)_dynamicFor the dynamic power consumption of described correspondence, described PApp(i)_staticQuiescent dissipation for described intended application.
Optionally, described module of setting up is additionally operable to:
According to described target power consumption parameter sets, it is determined that the excursion of the excursion of cpu busy percentage, the excursion of described LLC miss rate and described magnetic disc access rate;
Excursion according to described cpu busy percentage, the excursion of described LLC miss rate, the excursion of described magnetic disc access rate and described target power consumption parameter sets, set up initial LUT, described initial LUT is provided with at least one position, each position is corresponding with one group of variable parameter, on the position that in described target power consumption parameter sets, arbitrary group of variable parameter is corresponding, record has the dynamic power consumption that described arbitrary group of variable parameter is corresponding;
According to the dynamic power consumption in described target power consumption parameter sets, it is determined that the room dynamic power consumption that room variable parameter is corresponding, the position that described room variable parameter is corresponding does not record dynamic power consumption;
Described room dynamic power consumption is inserted the position that described room variable parameter is corresponding, obtains described three-dimensional LUT.
Optionally, described first acquisition module is additionally operable to:
Determining n at least two boot sequence applied, described n application includes described intended application, and described n is more than or equal to 1;
On described computer during off-duty application, according to the first boot sequence, described computer starts described n application successively, as i > 1, and when starting i+1 application, the 1st all operates on described computer to i-th application, and described first boot sequence is the arbitrary boot sequence in described at least two boot sequence, described i is more than or equal to 1, and less than or equal to n;
After starting i-th application, obtain the initial power consumption parameter sets when application of described i-th runs.
Optionally, described first acquisition module is additionally operable to:
Determining n at least two boot sequence applied, described n application includes described intended application, and described n is more than or equal to 1;
On described computer during off-duty application, according to the first boot sequence, described computer starts described n application successively, when starting i-th application, on described computer, off-duty has any application, described first boot sequence is the arbitrary boot sequence in described at least two boot sequence, and described i is more than or equal to 1, and less than or equal to n;
When starting i-th application, obtain the initial power consumption parameter sets when application of described i-th runs.
Optionally, the excursion of described cpu busy percentage is: [0%, 400%); The unit of described LLC miss rate be 1000000 times per second, the excursion of described LLC miss rate is: [0,500), the unit of described magnetic disc access rate be 1000 times per second, the excursion of described magnetic disc access rate is: [0,50).
Optionally, described target power consumption parameter sets includes: in described intended application running, all different cpu busy percentages, all different LLC miss rates and all different magnetic disc access rate.
The invention provides a kind of application power consumption measurement method and device, before the overall power measuring intended application, establish three-dimensional LUT, and this three-dimensional LUT applies for record object when running, the often corresponding relation of group variable parameter and dynamic power consumption, and this three-dimensional LUT can be applicable to measure the dynamic power consumption without linear change feature, therefore, the overall power of application can be measured accurately, improve the accuracy of application measurement of power loss.
It should be appreciated that it is only exemplary and explanatory that above general description and details hereinafter describe, the present invention can not be limited.
Accompanying drawing explanation
In order to be illustrated more clearly that the technical scheme in the embodiment of the present invention, below the accompanying drawing used required during embodiment is described is briefly described, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the premise not paying creative work, it is also possible to obtain other accompanying drawing according to these accompanying drawings.
A kind of method flow diagram applying power consumption measurement method that Fig. 1 provides for the embodiment of the present invention;
The method flow diagram of the another kind application power consumption measurement method that Fig. 2-1 provides for the embodiment of the present invention;
The schematic diagram of a kind of initial LUT that Fig. 2-2 provides for the embodiment of the present invention;
The schematic diagram of the two-dimensional table in a kind of initial LUT that Fig. 2-3 provides for the embodiment of the present invention;
The schematic diagram of the two-dimensional table in a kind of three-dimensional LUT that Fig. 2-4 provides for the embodiment of the present invention;
A kind of structural representation applying measurement of power loss device that Fig. 3-1 provides for the embodiment of the present invention;
The structural representation of the another kind application measurement of power loss device that Fig. 3-2 provides for the embodiment of the present invention.
By above-mentioned accompanying drawing, it has been shown that the embodiment that the present invention is clear and definite, will there is more detailed description hereinafter. These accompanying drawings and word are described and are not intended to be limited by any mode the scope of present inventive concept, but by idea of the invention being described with reference to specific embodiment for those skilled in the art.
Detailed description of the invention
For making the object, technical solutions and advantages of the present invention clearly, below in conjunction with accompanying drawing, embodiment of the present invention is described further in detail.
In correlation technique, using linear function model to when being applied in operation on computer, central processing unit is (English: CentralProcessingUnit; Be called for short: CPU), buffer memory (English: Cache) the use state of unit and disk and the corresponding relation of power consumption are described. Concrete, first, this application can be run on computers, and in the process run, gather this use state being applied in not corresponding in the same time CPU, Cache unit and disk and power consumption, then, with the use state of CPU, Cache unit applying correspondence and disk for variable, to apply corresponding power consumption for functional value, set up linear function model. When needing to measure this application power consumption that operationally a certain moment is corresponding, the use state of CPU, Cache unit in this moment application correspondence and disk can be obtained, and the use state of CPU, Cache unit corresponding for the application of this moment and disk is substituted into the linear function model established, so that it is determined that the power consumption that the application of this moment is corresponding.
As it is shown in figure 1, embodiments provide a kind of application power consumption measurement method, this application power consumption measurement method may include that
The initial power consumption parameter sets of at least two when step 101, acquisition intended application operation, each initial power consumption parameter sets includes at least one power consumption parameter subset, each power consumption parameter subset includes: one group of variable parameter and dynamic power consumption corresponding to one group of variable parameter, and one group of variable parameter includes: central processor CPU utilization rate, most last level cache are (English: LastLevelCache;It is called for short: LLC) miss rate and magnetic disc access rate, target power consumption parameter sets includes: in intended application running, different cpu busy percentages, different LLC miss rates and different magnetic disc access rate.
Step 102, according to the initial power consumption parameter sets of at least two, it is determined that target power consumption parameter sets, target power consumption parameter sets is the average of the initial power consumption parameter sets of at least two.
Step 102, according to target power consumption parameter sets, set up three dimensional lookup table (English: LookUpTable; It is called for short: LUT), when three-dimensional LUT runs for record object application, the often corresponding relation of group variable parameter and dynamic power consumption.
One group of target variable parameter when step 103, acquisition intended application operation.
Step 104, in three-dimensional LUT, search one group of target dynamic power consumption corresponding to target variable parameter.
Step 105, determine the overall power of intended application according to target dynamic power consumption.
In sum, due in the application power consumption measurement method that the embodiment of the present invention provides, before the overall power measuring intended application, establish three-dimensional LUT, and when this three-dimensional LUT runs for record object application, often organize the corresponding relation of variable parameter and dynamic power consumption, and this three-dimensional LUT can be applicable to measure the dynamic power consumption without linear change feature, therefore, it is possible to measure the overall power of application accurately, improve the accuracy of application measurement of power loss.
Optionally, intended application is run on computers, and before step 101, method also includes:
During any application of off-duty on computers, obtain the quiescent dissipation of computer;
Step 105 may include that
Obtain the number of the application run on computer;
According to the number of application run on the quiescent dissipation of computer, computer and quiescent dissipation computing formula, it is determined that quiescent dissipation when intended application is run, quiescent dissipation computing formula is:
PApp(i)_static=PHost_static/NApp;
Wherein, PApp(i)_staticQuiescent dissipation when running for intended application, PHost_staticFor the quiescent dissipation of computer, NAppThe number of the application for running on computer;
Quiescent dissipation when running according to intended application, target dynamic power consumption and overall power computing formula, it is determined that the overall power of intended application, overall power computing formula is:
PApp(i)=PApp(i)_static+PApp(i)_dynamic;
Wherein, PApp(i)For the overall power of intended application, PApp(i)_dynamicFor corresponding dynamic power consumption, PApp(i)_staticQuiescent dissipation for intended application.
Optionally, step 102 may include that
According to target power consumption parameter sets, it is determined that the excursion of the excursion of cpu busy percentage, the excursion of LLC miss rate and magnetic disc access rate;
According to the excursion of cpu busy percentage, the excursion of LLC miss rate, the excursion of magnetic disc access rate and target power consumption parameter sets, set up initial LUT, initial LUT is provided with at least one position, each position is corresponding with one group of variable parameter, on the position that in target power consumption parameter sets, arbitrary group of variable parameter is corresponding, record has the dynamic power consumption that arbitrary group of variable parameter is corresponding;
According to the dynamic power consumption in target power consumption parameter sets, it is determined that the room dynamic power consumption that room variable parameter is corresponding, the position that room variable parameter is corresponding does not record dynamic power consumption;
Room dynamic power consumption is inserted the position that room variable parameter is corresponding, obtains three-dimensional LUT.
Optionally, step 101 may include that
Determining n at least two boot sequence applied, n application includes intended application, and n is more than or equal to 1;
During off-duty application on computers, according to the first boot sequence, start n application on computers successively, as i > 1, and when starting i+1 application, the 1st is all run on computers to i-th application, and the first boot sequence is the arbitrary boot sequence at least two boot sequence, i is more than or equal to 1, and less than or equal to n;
After starting i-th application, obtain initial power consumption parameter sets when i-th application runs.
Optionally, step 101 can also include:
Determining n at least two boot sequence applied, n application includes intended application, and n is more than or equal to 1;
During off-duty application on computers, according to the first boot sequence, start n application on computers successively, when starting i-th application, on computer, off-duty has any application, first boot sequence is the arbitrary boot sequence at least two boot sequence, and i is more than or equal to 1, and less than or equal to n;
When starting i-th application, obtain initial power consumption parameter sets when i-th application runs.
Optionally, the excursion of cpu busy percentage is: [0%, 400%); The unit of LLC miss rate be 1000000 times per second, the excursion of LLC miss rate is: [0,500), the unit of magnetic disc access rate be 1000 times per second, the excursion of magnetic disc access rate is: [0,50).
Optionally, target power consumption parameter sets may include that in intended application running, all different cpu busy percentages, all different LLC miss rates and all different magnetic disc access rate.
In sum, due in the application power consumption measurement method that the embodiment of the present invention provides, before the overall power measuring intended application, establish three-dimensional LUT, and when this three-dimensional LUT runs for record object application, often organize the corresponding relation of variable parameter and dynamic power consumption, and this three-dimensional LUT can be applicable to measure the dynamic power consumption without linear change feature, therefore, it is possible to measure the overall power of application accurately, improve the accuracy of application measurement of power loss.
As shown in Fig. 2-1, embodiments providing another kind of application power consumption measurement method, this application power consumption measurement method may be used for measuring the overall power running intended application on computers, and this application power consumption measurement method may include that
During any application of step 201, on computers off-duty, obtain the quiescent dissipation of computer.
Example, when any application of off-duty on computer, it is possible to computer cut-in operation voltage, and directly obtain the power consumption of computer, using the quiescent dissipation as computer of the power consumption on the computer that now obtains, example, it is possible to use power consumption instrument obtains the quiescent dissipation of computer. Optionally, obtaining the concrete steps of power consumption of computer and be referred in correlation technique to obtain the concrete steps of computer power consumption, the embodiment of the present invention does not repeat at this.
The initial power consumption parameter sets of at least two when step 202, acquisition intended application operation.
Concrete, target power consumption parameter sets can include at least one power consumption parameter subset, each power consumption parameter subset may include that one group of variable parameter and dynamic power consumption corresponding to one group of variable parameter, one group of variable parameter may include that cpu busy percentage, LLC miss rate and magnetic disc access rate, target power consumption parameter sets may include that in intended application running, all different cpu busy percentages, all different LLC miss rates and all different magnetic disc access rate.
It should be noted that this LLC miss rate is also referred to as LLCmiss (disappearance) rate, namely apply when running on computers, the most final stage cache miss number of times on computer per second. When magnetic disc access rate is run on computers for application, the access times of disk on computer per second.
On the one hand, during the initial power consumption parameter sets of at least two when obtaining intended application and running, it is possible to first determining n at least two boot sequence applied, this n application can include intended application, and n is more than or equal to 1. Then, on described computer during off-duty application, according to the first boot sequence, start n application on computers successively, it is necessary to explanation is, as i > 1, and when starting i+1 application, the 1st is all run on computers to i-th application, and this first boot sequence is the arbitrary boot sequence at least two boot sequence, described i is more than or equal to 1, and less than or equal to n; After starting i-th application, it is possible to obtain initial power consumption parameter sets when i-th application runs. When multiple application are simultaneously run on computer, adopt the initial power consumption parameter sets of at least two that can quickly and easily obtain in this way when each application runs.
Optionally, if computer needing run four application, and in this first boot sequence, intended application is first application started on computers in these four application, after then can starting intended application on computers, obtain the first overall power of computer, then can by the difference of the quiescent dissipation of calculated computer in this first overall power and step 201, as the dynamic power consumption of this first application. Further, when obtaining the first overall power, it is also possible to obtain the cpu busy percentage of this application, LLC miss rate and magnetic disc access rate. Example, can be applied in a period of time that computer runs at this first, obtain many groups power consumption parameter subset of this first application, often group dynamic power consumption subset of parameters may each comprise one group of variable parameter and dynamic power consumption corresponding to one group of variable parameter, and this group of variable parameter can include cpu busy percentage, LLC miss rate and magnetic disc access rate.
Persistently the cpu busy percentage of first application, LLC miss rate and magnetic disc access rate are sampled, until the excursion of the cpu busy percentage taked covers the excursion of cpu busy percentage when this application runs, the excursion of the LLC miss rate taked covers the excursion of LLC miss rate when this application runs, and the excursion of the magnetic disc access rate taked covers the excursion of magnetic disc access rate when this application runs. The cpu busy percentage in this target power consumption parameter sets is made to may include that in intended application running, all different cpu busy percentages; LLC miss rate in this target power consumption parameter sets may include that in intended application running, all different LLC miss rates; Magnetic disc access rate in this target power consumption parameter sets may include that in intended application running, all different magnetic disc access rate.
Optionally, if computer needing run four application, and in this first boot sequence, this intended application is second application started on computers in these four application, after starting intended application, first application and second application are simultaneously run on computer, can under determining the premise of the first overall power that first application runs computer-chronograph, when first application and second application all run, obtain the second overall power of computer, and using the difference of this second overall power and the first overall power dynamic power consumption as this second application.Then the method being referred to obtain the target power consumption parameter sets of first application, obtains the target power consumption parameter sets of second application.
Optionally, if computer needing run four application, and in this first boot sequence, this intended application is the 3rd application started on computers in these four application, after starting intended application, first application, second application and the 3rd application are simultaneously run on computer, can under determining the premise of the second overall power of first application and second application operation computer-chronograph, first application, when second application and the 3rd application all run, obtain the 3rd overall power of computer, and using the difference of the 3rd overall power and the second overall power dynamic power consumption as the 3rd application. then the method being referred to obtain the target power consumption parameter sets of first application, obtains the target power consumption parameter sets of the 3rd application.
Optionally, if computer needing run four application, and in this first boot sequence, this intended application is the 4th application started on computers in these four application, after starting intended application, first application, second application, 3rd application and the 4th application are simultaneously run on computer, first application can determined, under the premise of the 3rd overall power of second application and the 3rd application operation computer-chronograph, first application, second application, when 3rd application and the 4th application all run, obtain the 4th overall power of computer, and using the difference of the 4th overall power and the 3rd overall power dynamic power consumption as the 4th application. then the method being referred to obtain the target power consumption parameter sets of first application, obtains the target power consumption parameter sets of the 4th application.
Example, when obtaining above-mentioned first overall power, the second overall power, the 3rd overall power or four overall power, it is possible to use power consumption instrument obtains. When obtaining the cpu busy percentage of application, LLC miss rate and magnetic disc access rate, can being obtained by the specific purpose tool of management program, the specific purpose tool of this management program can be the top instrument (a kind of survey tool under (SuSE) Linux OS) under (SuSE) Linux OS and perf instrument (a kind of survey tool under (SuSE) Linux OS).
On the other hand, during the initial power consumption parameter sets of at least two when obtaining intended application and running, it is also possible to first determining n at least two boot sequence applied, n application includes intended application, and n is more than or equal to 1. Then during off-duty application on computers, according to the first boot sequence, start n application on computers successively, when starting i-th application, on computer, off-duty has any application, first boot sequence is the arbitrary boot sequence at least two boot sequence, and i is more than or equal to 1, and less than or equal to n. And when starting i-th application, obtain initial power consumption parameter sets when i-th application runs. When multiple application are simultaneously run on computer, adopt the initial power consumption parameter sets of at least two that can obtain accurately in this way when each application runs.
Optionally, if computer needing run four application, and in this first boot sequence, intended application is first application started on computers in these four application, after then can starting intended application on computers, obtain the first overall power of computer, then can by the difference of the quiescent dissipation of calculated computer in this first overall power and step 201, as the dynamic power consumption of this first application.Further, when obtaining the first overall power, it is also possible to obtain the cpu busy percentage of this application, LLC miss rate and magnetic disc access rate. Example, can be applied in a period of time that computer runs at this first, obtain many groups power consumption parameter subset of this first application, often group dynamic power consumption subset of parameters may each comprise one group of variable parameter and dynamic power consumption corresponding to one group of variable parameter, and this group of variable parameter can include cpu busy percentage, LLC miss rate and magnetic disc access rate.
Persistently the cpu busy percentage of first application, LLC miss rate and magnetic disc access rate are sampled, until the excursion of the cpu busy percentage taked covers the excursion of cpu busy percentage when this application runs, the excursion of the LLC miss rate taked covers the excursion of LLC miss rate when this application runs, and the excursion of the magnetic disc access rate taked covers the excursion of magnetic disc access rate when this application runs. The cpu busy percentage in this target power consumption parameter sets is made to may include that in intended application running, all different cpu busy percentages; LLC miss rate in this target power consumption parameter sets may include that in intended application running, all different LLC miss rates; Magnetic disc access rate in this target power consumption parameter sets may include that in intended application running, all different magnetic disc access rate.
Optionally, if computer needing run four application, and in this first boot sequence, this intended application is the 3rd application started on computers in these four application, after starting intended application, only the 3rd application (intended application) is run on computers, it is possible to obtain the 3rd overall power of computer, and using the difference of the 3rd overall power and the quiescent dissipation of the computer dynamic power consumption as the 3rd application. Then the method being referred to obtain the target power consumption parameter sets of first application, obtains the target power consumption parameter sets of the 3rd application.
Optionally, if computer needing run four application, and in this first boot sequence, this intended application is the 4th application started on computers in these four application, after starting intended application, only the 4th application (intended application) is run on computers, it is possible to obtain the 4th overall power of computer, and using the difference of the 4th overall power and the quiescent dissipation of the computer dynamic power consumption as the 4th application. Then the method being referred to obtain the target power consumption parameter sets of first application, obtains the target power consumption parameter sets of the 4th application.
Step 203, according to the initial power consumption parameter sets of described at least two, it is determined that target power consumption parameter sets.
Example, it is possible to the average of the initial power consumption parameter sets of at least two when intended application being run is as target power consumption parameter sets. Concrete, it is possible to initial for this at least two power consumption parameter sets being substituted in target formula, calculate this target power consumption parameter sets, this target formula can be:
v a l u e A v g [ i ] [ j ] [ k ] = 1 n Σ p = 1 n value p [ i ] [ j ] [ k ] ,
Wherein, i is cpu busy percentage, and j is LLC miss rate and k is magnetic disc access rate, and valueAvg [i] [j] [k] is dynamic power consumption corresponding to parameter i, j, k in target power consumption parameter sets, and n is the number of described initial power consumption parameter sets, valuep[i] [j] [k] in the initial power consumption parameter sets of at least two, the dynamic power consumption that in the initial power consumption parameter sets of pth, parameter i, j, k are corresponding.
Due under the different boot sequence at least two, obtain the initial power consumption parameter sets of at least two, and using the average of initial for this at least two power consumption parameter sets as target power consumption parameter sets, namely multiple repairing weld has been carried out, and using the average of multiple repairing weld as target sample value, application power consumption parameter set coverage rate is wider so on the whole, have more randomness, more can reflect the true ruuning situation of application, reduce the uncertainty of unitary sampling, improve the accuracy of target power consumption parameter sets.Example, the number of this initial target power consumption parameter set is more than or equal to 3, and less than or equal to 5.
Step 204, according to target power consumption parameter sets, set up three-dimensional LUT.
Example, it is possible to the target power consumption parameter sets according to each application, set up a three-dimensional LUT for each application. When three-dimensional LUT may be used for record object application operation, the often corresponding relation of group variable parameter and dynamic power consumption.
When setting up three-dimensional LUT for an application, can according to the rate of people logging in of the cpu busy percentage of record, the certain rate of LLC and disk in the target power consumption parameter sets obtained, it is determined that the excursion of the excursion of cpu busy percentage, the excursion of LLC miss rate and magnetic disc access rate. Optionally, the excursion of cpu busy percentage can be: [0%, 400%), example, the unit of cpu busy percentage can be 1%, now the excursion of this cpu busy percentage be [0,400); The unit of LLC miss rate can be 2000000 times per second, the excursion of LLC miss rate can be: [0,500), the unit of magnetic disc access rate can be 2000 times per second, the excursion of magnetic disc access rate can be: [0,50).
In determining one group of variable parameter after the excursion of each parameter, it is possible to according to the corresponding relation recorded in the excursion of cpu busy percentage, the excursion of LLC miss rate, the excursion of magnetic disc access rate and target power consumption parameter sets, set up initial LUT. Can being provided with at least one position on this initial LUT, and this each position is corresponding with one group of variable parameter, on the position that in target power consumption parameter sets, arbitrary group of variable parameter is corresponding, record has the dynamic power consumption that arbitrary group of variable parameter is corresponding. Example, as shown in Fig. 2-2, this initial LUT can be a three-dimensional table, and the three of this three-dimensional table the inputs respectively cpu busy percentage of this application, LLC miss rate and magnetic disc access rate, and this three-dimensional table is output as the dynamic power consumption of this application. This three-dimensional table can be made up of at least one two-dimensional table M, and two inputs of each two-dimensional table M can be cpu busy percentage and LLC miss rate, and at least one magnetic disc access rate one_to_one corresponding of this at least one two-dimensional table M and acquisition, each two-dimensional table M is output as the cpu busy percentage in corresponding for this two-dimensional table M magnetic disc access rate, this two-dimensional table M and the dynamic power consumption corresponding to LLC miss rate in this two-dimensional table M.
Two-dimensional table schematic diagram in a kind of initial LUT that Fig. 2-3 provides for the embodiment of the present invention, as Figure 2-3, the transverse direction input of this two-dimensional table can be LLC miss rate, the longitudinal direction input of this two-dimensional table can be cpu busy percentage, and magnetic disc access rate corresponding to this two-dimensional table can be that 2000 times of 2 times are per second. Example, when cpu busy percentage is 7 times 1%, 2000000 times that LLC miss rate is 2 times per second, this magnetic disc access rate can be 2000 times of 2 times per second time, the dynamic power consumption of this application is in this two-dimensional table, and on the position of eighth row the 3rd row, the dynamic power consumption of record can be 16W (watt). When cpu busy percentage is 9 times 1%, 2000000 times that LLC miss rate is 2 times per second, this magnetic disc access rate can be 2000 times of 2 times per second time, the dynamic power consumption of this application is in this two-dimensional table, and on the position of the 10th row the 3rd row, the dynamic power consumption of record can be 28W (watt).
After establishing this initial LUT, it is possible to according to the dynamic power consumption in target power consumption parameter sets, it is determined that room dynamic power consumption is also inserted the position that room variable parameter is corresponding by room dynamic power consumption that room variable parameter is corresponding, obtain three-dimensional LUT.It should be noted that this room variable parameter can be do not record the variable parameter that the position of dynamic power consumption is corresponding on this initial LUT. As Figure 2-3, in this two-dimensional table, the position of the second row secondary series does not record dynamic power consumption, now, it is believed that the covert parameter in this room is cpu busy percentage is the 1% of 1 times, 2000000 times that LLC miss rate is 1 times per second, and 2000 times that this magnetic disc access rate can be 2 times per second.
After establishing this initial LUT, when obtaining three-dimensional LUT according to target power consumption parameter sets and initial LUT, it is possible to the dynamic power consumption according to having been recorded with in this initial LUT determines room dynamic power consumption. Example, two-dimensional table schematic diagram in a kind of three-dimensional LUT that Fig. 2-3 provides for the embodiment of the present invention, as in Figure 2-4, each position of the first row LUT [0] [] in two-dimensional table can be inserted 0, show when room variable parameter is cpu busy percentage be 1% and magnetic disc access rate are 2 times 2000 times of 1 times per second time, the dynamic power consumption of this application is 0W.
In row LUT [CPU] [] in this two-dimensional table:
1) if this row exists continuous print blank sequence (at least 2 positions have not recorded dynamic power consumption continuously), and former and later two neighbor locations of this continuous print blank sequence all have been recorded with dynamic power consumption, then the meansigma methods of the dynamic power consumption of these two neighbor location records is inserted each position in this continuous print blank sequence, or, in this continuous print blank sequence, linearly insert dynamic power consumption according to the dynamic power consumption of these two neighbor location records.
Example, as Figure 2-3, LUT [4] [4] and LUT [4] [5] has not recorded dynamic power consumption, namely the LUT [4] [4] in this two-dimensional table and [5] two positions of LUT [4] are continuous print blank sequence, it is expert in LUT [4] [], two neighbours respectively LUT [4] [3] (=8) before and after this continuous print blank sequence and LUT [4] [6] (=10), and the meansigma methods of LUT [4] [3] (=8) and LUT [4] [6] (=10) is 9, then as in Figure 2-4, 9 can be all inserted in LUT [4] [4] and [5] two positions of LUT [4].
2) if continuous print blank sequence has only neighbor location to have been recorded with dynamic power consumption, then the dynamic power consumption of this unique neighbor location record is inserted each position in this continuous print blank sequence.
Example, as Figure 2-3, LUT [3] [0], LUT [3] [1] and LUT [3] [2] has not recorded dynamic power consumption, i.e. LUT [2] [0] in this two-dimensional table, LUT [2] [1] and [2] three positions of LUT [2] are continuous print blank sequence, it is expert in LUT [2] [], the neighbor location that this continuous print blank sequence record has dynamic power consumption is LUT [2] [3] (=5), then as in Figure 2-4, can in LUT [2] [0], LUT [2] [1] and [2] three positions of LUT [2] all insert 5.
In first row LUT [] [0] in this two-dimensional table:
1) if the farthest position of distance and position LUT [0] [0] has not recorded dynamic power consumption, then the dynamic power consumption of record on position nearest for this farthest position of distance in first row LUT [] [0] can be inserted this farthest position.
Example, as Figure 2-3, LUT [9] [0] is in first row LUT [] [0], the position that distance and position LUT [0] [0] is farthest, LUT has not recorded dynamic power consumption on [9] [0], and the dynamic power consumption of the upper record of this farthest position LUT [8] [0] nearest for position LUT [9] [0] of distance is 28 in first row LUT [] [0], then as in Figure 2-4, it is possible to insert 28 in position LUT [9] [0].
2) if these row exist continuous print blank sequence (at least 2 positions have not recorded dynamic power consumption continuously), and former and later two neighbor locations of this continuous print blank sequence all have been recorded with dynamic power consumption, then in this continuous print blank sequence, linearly insert dynamic power consumption according to the dynamic power consumption of these two neighbor location records.
One group of target variable parameter when step 205, acquisition intended application operation.
After establishing three-dimensional LUT, and when intended application is run on computers, if needing to measure the overall power of this intended application, then can directly obtain one group of target variable parameter when this intended application is run, example, this intended application of each moment has one group of variable parameter, when needing to measure intended application overall power at a time, can obtaining one group of target variable parameter of this certain moment intended application, this group of target variable parameter can include target CPU utilization, target LLC miss rate and target disk rate of people logging in.
Step 206, in three-dimensional LUT, search the target dynamic power consumption of record on one group of position corresponding to target variable parameter.
After the one group of target variable parameter obtaining this intended application, the target CPU utilization in this group of target variable parameter can be searched in the three-dimensional LUT established, position that target LLC miss rate is corresponding with target disk rate of people logging in, and obtain the target dynamic power consumption of record on the position that this target variable parameter is corresponding.
Step 207, determine the overall power of intended application according to target dynamic power consumption.
After determining the dynamic power consumption of this intended application, first, the number of the application run on computer can be obtained, and according to the quiescent dissipation of computer obtained in step 201, the number of application that computer runs and quiescent dissipation computing formula, determining quiescent dissipation when intended application is run, this quiescent dissipation computing formula can be:
PApp(i)_static=PHost_static/NApp;
Wherein, PApp(i)_staticQuiescent dissipation when running for intended application, PHost_staticFor the quiescent dissipation of computer, NAppThe number of the application for running on computer.
It is then possible to the target dynamic power consumption of quiescent dissipation when running according to intended application, intended application and overall power computing formula, it is determined that the overall power of intended application, this overall power computing formula can be:
PApp(i)=PApp(i)_static+PApp(i)_dynamic;
Wherein, PApp(i)For the overall power of intended application, PApp(i)_dynamicFor corresponding dynamic power consumption, PApp(i)_staticQuiescent dissipation for intended application.
The quiescent dissipation assuming this computer is 150W, and this computer runs 5 application, then can obtain according to quiescent dissipation computing formula, and the quiescent dissipation of each application on this computer is 30W. If the dynamic power consumption of intended application searched in the three-dimensional LUT of intended application is 40W, then can determine that the overall power of this intended application is 70W according to overall power computing formula.
In sum, due in the application power consumption measurement method that the embodiment of the present invention provides, before the overall power measuring intended application, establish three-dimensional LUT, and when this three-dimensional LUT runs for record object application, often organize the corresponding relation of variable parameter and dynamic power consumption, and this three-dimensional LUT can be applicable to measure the dynamic power consumption without linear change feature, therefore, it is possible to measure the overall power of application accurately, improve the accuracy of application measurement of power loss.
As shown in figure 3-1, embodiments providing a kind of application measurement of power loss device 30, this application measurement of power loss device 30 may include that
First acquisition module 301, for obtaining the initial power consumption parameter sets of at least two when intended application is run, each initial power consumption parameter sets includes at least one power consumption parameter subset, each power consumption parameter subset includes: one group of variable parameter and dynamic power consumption corresponding to one group of variable parameter, one group of variable parameter includes: cpu busy percentage, LLC miss rate and magnetic disc access rate, target power consumption parameter sets includes: in intended application running, different cpu busy percentages, different LLC miss rates and different magnetic disc access rate.
First determines module 302, for according to the initial power consumption parameter sets of at least two, it is determined that target power consumption parameter sets, target power consumption parameter sets is the average of the initial power consumption parameter sets of at least two.
Set up module 303, for according to target power consumption parameter sets, setting up three-dimensional LUT, when three-dimensional LUT runs for record object application, the often corresponding relation of group variable parameter and dynamic power consumption.
Second acquisition module 304, for obtaining one group of target variable parameter when intended application is run.
Search module 305, for searching one group of target dynamic power consumption corresponding to target variable parameter in three-dimensional LUT.
Second determines module 306, for determining the overall power of intended application according to target dynamic power consumption.
In sum, due in the application measurement of power loss device that the embodiment of the present invention provides, set up module before the overall power measuring intended application, establish three-dimensional LUT, and when this three-dimensional LUT runs for record object application, often organize the corresponding relation of variable parameter and dynamic power consumption, and this three-dimensional LUT can be applicable to measure the dynamic power consumption without linear change feature, therefore, it is possible to measure the overall power of application accurately, improve the accuracy of application measurement of power loss.
As shown in figure 3-2, embodiments providing another kind of application measurement of power loss device 30, intended application is run on computers, and this application measurement of power loss device 30 may include that
First acquisition module 301, for obtaining the initial power consumption parameter sets of at least two when intended application is run, each initial power consumption parameter sets includes at least one power consumption parameter subset, each power consumption parameter subset includes: one group of variable parameter and dynamic power consumption corresponding to one group of variable parameter, one group of variable parameter includes: cpu busy percentage, LLC miss rate and magnetic disc access rate, target power consumption parameter sets includes: in intended application running, different cpu busy percentages, different LLC miss rates and different magnetic disc access rate.
First determines module 302, for according to the initial power consumption parameter sets of at least two, it is determined that target power consumption parameter sets, target power consumption parameter sets is the average of the initial power consumption parameter sets of at least two.
Set up module 303, for according to target power consumption parameter sets, setting up three-dimensional LUT, when three-dimensional LUT runs for record object application, the often corresponding relation of group variable parameter and dynamic power consumption.
Second acquisition module 304, for obtaining one group of target variable parameter when intended application is run.
Search module 305, for searching one group of target dynamic power consumption corresponding to target variable parameter in three-dimensional LUT.
Second determines module 306, for determining the overall power of intended application according to target dynamic power consumption.
3rd acquisition module 307, during application any for off-duty on computers, obtains the quiescent dissipation of computer.
In sum, due in the application measurement of power loss device that the embodiment of the present invention provides, set up module before the overall power measuring intended application, establish three-dimensional LUT, and when this three-dimensional LUT runs for record object application, often organize the corresponding relation of variable parameter and dynamic power consumption, and this three-dimensional LUT can be applicable to measure the dynamic power consumption without linear change feature, therefore, it is possible to measure the overall power of application accurately, improve the accuracy of application measurement of power loss.
Optionally, second determines that module 305 can be also used for:
Obtain the number of the application run on computer;
According to the number of application run on the quiescent dissipation of computer, computer and quiescent dissipation computing formula, it is determined that quiescent dissipation when intended application is run, quiescent dissipation computing formula is:
PApp(i)_static=PHost_static/NApp;
Wherein, PApp(i)_staticQuiescent dissipation when running for intended application, PHost_staticFor the quiescent dissipation of computer, NAppThe number of the application for running on computer;
Quiescent dissipation when running according to intended application, target dynamic power consumption and overall power computing formula, it is determined that the overall power of intended application, overall power computing formula is:
PApp(i)=PApp(i)_static+PApp(i)_dynamic;
Wherein, PApp(i)For the overall power of intended application, PApp(i)_dynamicFor corresponding dynamic power consumption, PApp(i)_staticQuiescent dissipation for intended application.
Optionally, set up module 303 can be also used for:
According to target power consumption parameter sets, it is determined that the excursion of the excursion of cpu busy percentage, the excursion of LLC miss rate and magnetic disc access rate;
According to the excursion of cpu busy percentage, the excursion of LLC miss rate, the excursion of magnetic disc access rate and target power consumption parameter sets, set up initial LUT, initial LUT is provided with at least one position, each position is corresponding with one group of variable parameter, on the position that in target power consumption parameter sets, arbitrary group of variable parameter is corresponding, record has the dynamic power consumption that arbitrary group of variable parameter is corresponding;
According to the dynamic power consumption in target power consumption parameter sets, it is determined that the room dynamic power consumption that room variable parameter is corresponding, the position that room variable parameter is corresponding does not record dynamic power consumption;
Room dynamic power consumption is inserted the position that room variable parameter is corresponding, obtains three-dimensional LUT.
Optionally, the first acquisition module 301 can be also used for:
Determining n at least two boot sequence applied, n application includes intended application, and n is more than or equal to 1;
During off-duty application on computers, according to the first boot sequence, start n application on computers successively, as i > 1, and when starting i+1 application, the 1st is all run on computers to i-th application, and the first boot sequence is the arbitrary boot sequence at least two boot sequence, i is more than or equal to 1, and less than or equal to n;
After starting i-th application, obtain initial power consumption parameter sets when i-th application runs.
Optionally, the first acquisition module 301 can be also used for:
Determining n at least two boot sequence applied, n application includes intended application, and n is more than or equal to 1;
During off-duty application on computers, according to the first boot sequence, start n application on computers successively, when starting i-th application, on computer, off-duty has any application, first boot sequence is the arbitrary boot sequence at least two boot sequence, and i is more than or equal to 1, and less than or equal to n;
When starting i-th application, obtain initial power consumption parameter sets when i-th application runs.
Optionally, the excursion of cpu busy percentage is: [0%, 400%); The unit of LLC miss rate be 1000000 times per second, the excursion of LLC miss rate is: [0,500), the unit of magnetic disc access rate be 1000 times per second, the excursion of magnetic disc access rate is: [0,50).
Optionally, target power consumption parameter sets may include that in intended application running, all different cpu busy percentages, all different LLC miss rates and all different magnetic disc access rate.
In sum, due in the application measurement of power loss device that the embodiment of the present invention provides, set up module before the overall power measuring intended application, establish three-dimensional LUT, and when this three-dimensional LUT runs for record object application, often organize the corresponding relation of variable parameter and dynamic power consumption, and this three-dimensional LUT can be applicable to measure the dynamic power consumption without linear change feature, therefore, it is possible to measure the overall power of application accurately, improve the accuracy of application measurement of power loss.
It should be noted that; the sequencing of the application power consumption measurement method step that the embodiment of the present invention provides can suitably adjust; step can also according to circumstances increase and decrease accordingly; any those familiar with the art is in the technical scope that the invention discloses; the method that can readily occur in change; all should be encompassed within protection scope of the present invention, therefore repeat no more.
Those skilled in the art is it can be understood that arrive, for convenience and simplicity of description, and the specific works process of the application measurement of power loss device of foregoing description, it is possible to reference to the corresponding process in the measuring method embodiment of aforementioned applications power consumption, do not repeat them here.
Above-mentioned all optional technical schemes, it is possible to adopting and arbitrarily combine formation optional embodiment of the present invention, this is no longer going to repeat them.
The foregoing is only presently preferred embodiments of the present invention, not in order to limit the present invention, all within the spirit and principles in the present invention, any amendment of making, equivalent replacement, improvement etc., should be included within protection scope of the present invention.

Claims (14)

1. an application power consumption measurement method, it is characterised in that described method includes:
Obtain the initial power consumption parameter sets of at least two when intended application is run, each initial power consumption parameter sets includes at least one power consumption parameter subset, each power consumption parameter subset includes: one group of variable parameter and dynamic power consumption corresponding to described one group of variable parameter, described one group of variable parameter includes: central processor CPU utilization rate, most last level cache LLC miss rate and magnetic disc access rate, each initial power consumption parameter sets includes: in described intended application running, different cpu busy percentages, different LLC miss rates and different magnetic disc access rate;
According to the initial power consumption parameter sets of described at least two, it is determined that target power consumption parameter sets, described target power consumption parameter sets is the average of the initial power consumption parameter sets of described at least two;
According to described target power consumption parameter sets, set up three dimensional lookup table LUT, when described three-dimensional LUT is used for recording the operation of described intended application, the often corresponding relation of group variable parameter and dynamic power consumption;
Obtain one group of target variable parameter when described intended application is run;
Described three-dimensional LUT searches the target dynamic power consumption that described one group of target variable parameter is corresponding;
The overall power of described intended application is determined according to described target dynamic power consumption.
2. method according to claim 1, it is characterised in that described intended application is run on computers, and before the initial power consumption parameter sets of at least two when described acquisition intended application is run, described method also includes:
On described computer during any application of off-duty, obtain the quiescent dissipation of described computer;
The overall power of described intended application is determined according to described target dynamic power consumption, including:
Obtain the number of the application run on described computer;
The number of the application run on the quiescent dissipation according to described computer, described computer and quiescent dissipation computing formula, it is determined that quiescent dissipation when described intended application is run, described quiescent dissipation computing formula is:
PApp(i)_static=PHost_static/NApp;
Wherein, described PApp(i)_staticQuiescent dissipation when running for described intended application, described PHost_staticFor the quiescent dissipation of described computer, described NAppThe number of the application for running on described computer;
Quiescent dissipation when running according to described intended application, described target dynamic power consumption and overall power computing formula, it is determined that the overall power of described intended application, described overall power computing formula is:
PApp(i)=PApp(i)_static+PApp(i)_dynamic;
Wherein, described PApp(i)For the overall power of described intended application, described PApp(i)_dynamicFor the dynamic power consumption of described correspondence, described PApp(i)_staticQuiescent dissipation for described intended application.
3. method according to claim 1, it is characterised in that according to described target power consumption parameter sets, sets up three-dimensional LUT, including:
According to described target power consumption parameter sets, it is determined that the excursion of the excursion of cpu busy percentage, the excursion of described LLC miss rate and described magnetic disc access rate;
Excursion according to described cpu busy percentage, the excursion of described LLC miss rate, the excursion of described magnetic disc access rate and described target power consumption parameter sets, set up initial LUT, described initial LUT is provided with at least one position, each position is corresponding with one group of variable parameter, on the position that in described target power consumption parameter sets, arbitrary group of variable parameter is corresponding, record has the dynamic power consumption that described arbitrary group of variable parameter is corresponding;
According to the dynamic power consumption in described target power consumption parameter sets, it is determined that the room dynamic power consumption that room variable parameter is corresponding, the position that described room variable parameter is corresponding does not record dynamic power consumption;
Described room dynamic power consumption is inserted the position that described room variable parameter is corresponding, obtains described three-dimensional LUT.
4. method according to claim 1, it is characterised in that the initial power consumption parameter sets of at least two when described acquisition intended application is run, including:
Determining n at least two boot sequence applied, described n application includes described intended application, and described n is more than or equal to 1;
On described computer during off-duty application, according to the first boot sequence, described computer starts described n application successively, as i > 1, and when starting i+1 application, the 1st all operates on described computer to i-th application, and described first boot sequence is the arbitrary boot sequence in described at least two boot sequence, described i is more than or equal to 1, and less than or equal to n;
After starting i-th application, obtain the initial power consumption parameter sets when application of described i-th runs.
5. method according to claim 1, it is characterised in that the initial power consumption parameter sets of at least two when described acquisition intended application is run, including:
Determining n at least two boot sequence applied, described n application includes described intended application, and described n is more than or equal to 1;
On described computer during off-duty application, according to the first boot sequence, described computer starts described n application successively, when starting i-th application, on described computer, off-duty has any application, described first boot sequence is the arbitrary boot sequence in described at least two boot sequence, and described i is more than or equal to 1, and less than or equal to n;
When starting i-th application, obtain the initial power consumption parameter sets when application of described i-th runs.
6. method according to claim 3, it is characterised in that
The excursion of described cpu busy percentage is: [0%, 400%); The unit of described LLC miss rate be 1000000 times per second, the excursion of described LLC miss rate is: [0,500), the unit of described magnetic disc access rate be 1000 times per second, the excursion of described magnetic disc access rate is: [0,50).
7. method according to claim 1, it is characterised in that
Described target power consumption parameter sets includes: in described intended application running, all different cpu busy percentages, all different LLC miss rates and all different magnetic disc access rate.
8. an application measurement of power loss device, it is characterised in that described application measurement of power loss device includes:
First acquisition module, for obtaining the initial power consumption parameter sets of at least two when intended application is run, each initial power consumption parameter sets includes at least one power consumption parameter subset, each power consumption parameter subset includes: one group of variable parameter and dynamic power consumption corresponding to described one group of variable parameter, described one group of variable parameter includes: central processor CPU utilization rate, most last level cache LLC miss rate and magnetic disc access rate, described target power consumption parameter sets includes: in described intended application running, different cpu busy percentages, different LLC miss rates and different magnetic disc access rate,
First determines module, and for according to the initial power consumption parameter sets of described at least two, it is determined that target power consumption parameter sets, described target power consumption parameter sets is the average of the initial power consumption parameter sets of described at least two;
Set up module, for according to described target power consumption parameter sets, setting up three dimensional lookup table LUT, when described three-dimensional LUT is used for recording the operation of described intended application, the often corresponding relation of group variable parameter and dynamic power consumption;
Second acquisition module, for obtaining one group of target variable parameter when described intended application is run;
Search module, for searching, in described three-dimensional LUT, the target dynamic power consumption that described one group of target variable parameter is corresponding;
Second determines module, for determining the overall power of described intended application according to described target dynamic power consumption.
9. application measurement of power loss device according to claim 8, it is characterised in that described intended application is run on computers, and described application measurement of power loss device also includes:
3rd acquisition module, during application any for off-duty on described computer, obtains the quiescent dissipation of described computer;
Described second determines that module is additionally operable to:
Obtain the number of the application run on described computer;
The number of the application run on the quiescent dissipation according to described computer, described computer and quiescent dissipation computing formula, it is determined that quiescent dissipation when described intended application is run, described quiescent dissipation computing formula is:
PApp(i)_static=PHost_static/NApp;
Wherein, described PApp(i)_staticQuiescent dissipation when running for described intended application, described PHost_staticFor the quiescent dissipation of described computer, described NAppThe number of the application for running on described computer;
Quiescent dissipation when running according to described intended application, described target dynamic power consumption and overall power computing formula, it is determined that the overall power of described intended application, described overall power computing formula is:
PApp(i)=PApp(i)_static+PApp(i)_dynamic;
Wherein, described PApp(i)For the overall power of described intended application, described PApp(i)_dynamicFor the dynamic power consumption of described correspondence, described PApp(i)_staticQuiescent dissipation for described intended application.
10. application measurement of power loss device according to claim 8, it is characterised in that described module of setting up is additionally operable to:
According to described target power consumption parameter sets, it is determined that the excursion of the excursion of cpu busy percentage, the excursion of described LLC miss rate and described magnetic disc access rate;
Excursion according to described cpu busy percentage, the excursion of described LLC miss rate, the excursion of described magnetic disc access rate and described target power consumption parameter sets, set up initial LUT, described initial LUT is provided with at least one position, each position is corresponding with one group of variable parameter, on the position that in described target power consumption parameter sets, arbitrary group of variable parameter is corresponding, record has the dynamic power consumption that described arbitrary group of variable parameter is corresponding;
According to the dynamic power consumption in described target power consumption parameter sets, it is determined that the room dynamic power consumption that room variable parameter is corresponding, the position that described room variable parameter is corresponding does not record dynamic power consumption;
Described room dynamic power consumption is inserted the position that described room variable parameter is corresponding, obtains described three-dimensional LUT.
11. application measurement of power loss device according to claim 8, it is characterised in that described first acquisition module is additionally operable to:
Determining n at least two boot sequence applied, described n application includes described intended application, and described n is more than or equal to 1;
On described computer during off-duty application, according to the first boot sequence, described computer starts described n application successively, as i > 1, and when starting i+1 application, the 1st all operates on described computer to i-th application, and described first boot sequence is the arbitrary boot sequence in described at least two boot sequence, described i is more than or equal to 1, and less than or equal to n;
After starting i-th application, obtain the initial power consumption parameter sets when application of described i-th runs.
12. application measurement of power loss device according to claim 8, it is characterised in that described first acquisition module is additionally operable to:
Determining n at least two boot sequence applied, described n application includes described intended application, and described n is more than or equal to 1;
On described computer during off-duty application, according to the first boot sequence, described computer starts described n application successively, when starting i-th application, on described computer, off-duty has any application, described first boot sequence is the arbitrary boot sequence in described at least two boot sequence, and described i is more than or equal to 1, and less than or equal to n;
When starting i-th application, obtain the initial power consumption parameter sets when application of described i-th runs.
13. application measurement of power loss device according to claim 11, it is characterised in that
The excursion of described cpu busy percentage is: [0%, 400%); The unit of described LLC miss rate be 1000000 times per second, the excursion of described LLC miss rate is: [0,500), the unit of described magnetic disc access rate be 1000 times per second, the excursion of described magnetic disc access rate is: [0,50).
14. application measurement of power loss device according to claim 8, it is characterised in that
Described target power consumption parameter sets includes: in described intended application running, all different cpu busy percentages, all different LLC miss rates and all different magnetic disc access rate.
CN201610021875.9A 2016-01-13 2016-01-13 Application power consumption measuring method and device Pending CN105653459A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610021875.9A CN105653459A (en) 2016-01-13 2016-01-13 Application power consumption measuring method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610021875.9A CN105653459A (en) 2016-01-13 2016-01-13 Application power consumption measuring method and device

Publications (1)

Publication Number Publication Date
CN105653459A true CN105653459A (en) 2016-06-08

Family

ID=56487381

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610021875.9A Pending CN105653459A (en) 2016-01-13 2016-01-13 Application power consumption measuring method and device

Country Status (1)

Country Link
CN (1) CN105653459A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021022926A1 (en) * 2019-08-06 2021-02-11 中兴通讯股份有限公司 Network-based control method for power consumption of applications, terminal and storage medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070124094A1 (en) * 2005-11-29 2007-05-31 Brey Thomas M Histogram difference method and system for power/performance measurement and management
CN102306118A (en) * 2011-08-31 2012-01-04 中兴通讯股份有限公司 Method and device for monitoring power consumption of application program at Android terminal
CN102854968A (en) * 2012-05-04 2013-01-02 北京邮电大学 Real-time energy consumption metering method of virtual machine
CN103245829A (en) * 2013-05-24 2013-08-14 中国科学院计算技术研究所 Virtual machine power consumption measuring method
CN103324777A (en) * 2013-05-21 2013-09-25 网视科技(杭州)有限公司 Android application program energy consumption modeling method based on time
CN103423189A (en) * 2013-09-03 2013-12-04 中国科学院计算技术研究所 Server fan power consumption measuring method
CN103513748A (en) * 2012-06-29 2014-01-15 联想(北京)有限公司 Method for processing information, information processor and electronic device
CN103744739A (en) * 2014-01-23 2014-04-23 华中科技大学 Method for improving hard disk reliability on basis of multi-objective decision
CN104281510A (en) * 2013-07-05 2015-01-14 贝壳网际(北京)安全技术有限公司 Method and system for obtaining power consumption degree of application program and energy-saving method and system
CN105100504A (en) * 2014-05-22 2015-11-25 北京奇虎科技有限公司 Equipment application electric-power consumption management method and equipment application electric-power consumption management device

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070124094A1 (en) * 2005-11-29 2007-05-31 Brey Thomas M Histogram difference method and system for power/performance measurement and management
CN102306118A (en) * 2011-08-31 2012-01-04 中兴通讯股份有限公司 Method and device for monitoring power consumption of application program at Android terminal
CN102854968A (en) * 2012-05-04 2013-01-02 北京邮电大学 Real-time energy consumption metering method of virtual machine
CN103513748A (en) * 2012-06-29 2014-01-15 联想(北京)有限公司 Method for processing information, information processor and electronic device
CN103324777A (en) * 2013-05-21 2013-09-25 网视科技(杭州)有限公司 Android application program energy consumption modeling method based on time
CN103245829A (en) * 2013-05-24 2013-08-14 中国科学院计算技术研究所 Virtual machine power consumption measuring method
CN104281510A (en) * 2013-07-05 2015-01-14 贝壳网际(北京)安全技术有限公司 Method and system for obtaining power consumption degree of application program and energy-saving method and system
CN103423189A (en) * 2013-09-03 2013-12-04 中国科学院计算技术研究所 Server fan power consumption measuring method
CN103744739A (en) * 2014-01-23 2014-04-23 华中科技大学 Method for improving hard disk reliability on basis of multi-objective decision
CN105100504A (en) * 2014-05-22 2015-11-25 北京奇虎科技有限公司 Equipment application electric-power consumption management method and equipment application electric-power consumption management device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021022926A1 (en) * 2019-08-06 2021-02-11 中兴通讯股份有限公司 Network-based control method for power consumption of applications, terminal and storage medium
US11943127B2 (en) 2019-08-06 2024-03-26 Zte Corporation Network-based control method for power consumption of applications, terminal and storage medium

Similar Documents

Publication Publication Date Title
US10678686B2 (en) Estimation method for read and write access performance using average read retry times and a valid data weight ratio
CN111064808B (en) Load balancing method and device based on distributed storage system
US10908833B2 (en) Data migration method for a storage system after expansion and storage system
CN107122126A (en) The moving method of data, device and system
CN103714004A (en) JVM online memory leak analysis method and system
CN104346384A (en) Method and device for processing small files
CN104699424A (en) Page hot degree based heterogeneous memory management method
CN104281664A (en) Data segmenting method and system of distributed graph calculating system
CN111707279B (en) Matching evaluation method, medium, terminal and device for laser point cloud and map
CN104636401B (en) A kind of method and device of SCADA system data rewind
CN104516822A (en) Memory access method and device
JP2023064082A (en) Method of constructing three-dimensional map in high-definition map, apparatus, device, and storage medium
CN104202817B (en) The storage of the many focuses received signals fingerprint map in the large-scale interior space and matching process
CN104134027A (en) Sequence flow recognition method and sequence flow recognition device
CN105653459A (en) Application power consumption measuring method and device
CN106844541A (en) A kind of on-line analytical processing method and device
CN113420004A (en) Tunnel point cloud data storage method and device, computer equipment and storage medium
CN102436535B (en) Identification method and system for creative inflection point in computer aided design process
CN108133116A (en) CAD floor plan wall thickness automatic identifying methods and system
CN107943727A (en) A kind of high efficient DMA controller
CN101901192B (en) On-chip and off-chip data object static assignment method
CN104635206B (en) A kind of method and device of wireless location
CN111127065B (en) User job site acquisition method and device
CN113992249A (en) Channel state information processing method and device, electronic equipment and storage medium
CN106407453A (en) Performance data management method and system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20160608

RJ01 Rejection of invention patent application after publication