Voting resources, early voting, and poll worker information - VOTE. ... Adafruit is open and shipping.
0

Application Wattage
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Re: Application Wattage

by Entropy on Thu Aug 19, 2010 11:04 am

At the best, what you might be able to do (and really only do this manually...):

Baseline your system's power consumption when idle.
Start the application in question, and measure power consumption.

You'll need to take LOTS of data to get any meaningful results, because that baseline is going to vary a bit, and some apps are highly variable in the demands they place on the system. (For example, Firefox contributions to power consumption depend heavily on whether a page contains animated content or not. Firefox displaying a static page is going to be basically an idle system. Firefox playing Hulu content is going to be gulping down power like crazy because Flash video is such an inefficiently implemented turd. Firefox during a page load will cause a very brief spike of CPU consumption, but will also cause network utilization (matters more for wifi - Ethernet power consumption is pretty steady-state due to the IDLE signals present in 100BaseT and gigabit Ethernet) and disk utilization.

As to measuring the direct consumption of the CPU - Unfortunately, the best way to say this is that if you have to ask here in such generic terms, you're not going to do it. The core rail feeding modern CPUs is only around 1 volt and has tens of amperes flowing - measuring currents this high on voltage rails that low without disturbing the system (crashing/glitching the CPU) is extremely difficult and is the realm of advanced testing labs.
Entropy
 
Posts: 472
Joined: Tue Jan 08, 2008 12:43 am
Location: Owego, NY USA

Re: Application Wattage

by richms on Thu Aug 19, 2010 11:44 am

And how would that differentiate between the power taken while executing the operating system and that of the application, do you count all the page file swaps that are a result of the application you are measuring? How do you account for it when the application is active on one core and something else is on the other core?

Perhaps if you got a multiple CPU machine and did one CPU, and set the affinity of everything to the other CPU, except the application you are measuring then you could see what the CPU takes, but you are still ignoring the memory controller, sata chip, hdd access etc which will also be used when the application requests stuff.

About the only reasonable way IMO is to take the whole PC's kWh use and pro-rate it by CPU time, which task manager etc will accumulate.

richms
 
Posts: 558
Joined: Tue Jan 20, 2009 3:05 am
Location: New Zealand

Re: Application Wattage

by adafruit_support_bill on Thu Aug 19, 2010 11:59 am

The OP hasn't explained why it is so important to isolate the CPU. A graphics intensive application could easily burn more watts in the graphics co-processor than it does in the CPU. An I/O intensive application will be flogging the peripherals while the CPU is mostly idle. A CPU-only number seems pretty meaningless as a measure of application power consumption.

adafruit_support_bill
 
Posts: 78748
Joined: Sat Feb 07, 2009 10:11 am

Re: Application Wattage

by oPossum on Thu Aug 19, 2010 6:35 pm

A typical PC motherboard has a POL (point-of-load) converter to power the CPU. The POL converts the 12 volt rail to whatever is needed by the CPU. This is a PWM buck converter (usually), so measuring the pulse width would tell you something about the current flow. It may be possible to correlate pulse width to power consumption in a useful way.

The current draw of a modern CPU (or GPU) can be very high - 70 amps or more. The impedance is very critical (note all the caps near the CPU socket). Inserting an amp meter between the POL and CPU would be very difficult to do without compromising the stability of the system. Measuring the current on the 12 V lines that supply the POL would be much more practical - that could be done with any quality (Fluke, etc...) multimeter.
I am the Possum, and I approve of this message. Sent from MacBook Wheel Sorry for my bad German.
oPossum
 
Posts: 636
Joined: Fri Oct 26, 2007 12:42 am
Location: Michigan, USA

Re: Application Wattage

by zener on Fri Aug 20, 2010 2:04 pm

The temperature of the CPU will give a relative indication of power consumption. So you could at least make "better/worse" comparisons.

zener
 
Posts: 4567
Joined: Sat Feb 21, 2009 2:38 am

Re: Application Wattage

by pstemari on Tue Aug 24, 2010 2:28 am

OS overhead, process switching, multiple cores, ... unless you're running DOS or the equivalent you can't divvy up the power consumption neatly per application.
--Paul

A wholly owned subsidiary of:
Persephone: DL R+W+B C 7 X L W C++ I++ T+ A E H++ S+ V-- F+ Q P B PA+ PL
Aldebaran: DM Rt H 5 Y L- W+ C+ I++ T++ A+++ E H++ S+ V+ F++ Q+ P B++ PA- PL--
User avatar
pstemari
 
Posts: 310
Joined: Sun Mar 21, 2010 6:10 pm
Location: Seattle, WA

Re: Application Wattage

by pavan168 on Wed Aug 25, 2010 4:08 am

franklin97355 wrote:
IMO, it cant be done.

Sure it can. all you need to do is build a board that goes between the cpu socket and the cpu so you can pull all the power pins out and measure them. If you have enough time and money (almost) anything is possible.


True that franklin. What kinda board are you referring to?

@Entropy : I Agree. Ill have to do all that manually.

oPossum wrote:A typical PC motherboard has a POL (point-of-load) converter to power the CPU. The POL converts the 12 volt rail to whatever is needed by the CPU. This is a PWM buck converter (usually), so measuring the pulse width would tell you something about the current flow. It may be possible to correlate pulse width to power consumption in a useful way.


wow. Nice to know something like that. Where can i find this POL? Anywhere visible? (system application?)
pavan168
 
Posts: 8
Joined: Mon Aug 16, 2010 2:24 am

Re: Application Wattage

by franklin97355 on Wed Aug 25, 2010 10:46 am

True that franklin. What kinda board are you referring to?

It would have to be a custom PCB with a socket for the CPU and a plug that fit the original CPU socket on the motherboard with test points for the power leads. Not something you will find ready made unless you went to the chip manufacturer or a test facility.

franklin97355
 
Posts: 21586
Joined: Mon Apr 21, 2008 2:33 pm
Location: Lacomb, OR.

Re: Application Wattage

by richms on Wed Aug 25, 2010 11:03 am

The "P4" connector normally exclusivly drives the CPU regulator, so measuring the current on that should tell you what the CPU is taking. It would be an exercise to start and stop monitoring as your thread starts and stops executing however. PSU capacitors would probably make it not able to account for just one process in anycase, but you could get a total amp*hour or watt*hour figure for the difference between with and without the application running.

richms
 
Posts: 558
Joined: Tue Jan 20, 2009 3:05 am
Location: New Zealand

Re: Application Wattage

by oPossum on Wed Aug 25, 2010 11:11 am

pavan168 wrote:
oPossum wrote:A typical PC motherboard has a POL (point-of-load) converter to power the CPU. The POL converts the 12 volt rail to whatever is needed by the CPU. This is a PWM buck converter (usually), so measuring the pulse width would tell you something about the current flow. It may be possible to correlate pulse width to power consumption in a useful way.


wow. Nice to know something like that. Where can i find this POL? Anywhere visible? (system application?)



The POL converter circuity will be around the CPU socket. It is usually a typical multi-phase buck converter design, so there will be several inductors, MOSFETs, Schottky diodes, and capacitors. The safest place to measure the PWM would be the high side of one of the inductors. Don't try to use the MOSFET gate drive or output of the regulator chip - the circuit is very sensitive.

A typical POL converter (4 phase)...

Image
I am the Possum, and I approve of this message. Sent from MacBook Wheel Sorry for my bad German.
oPossum
 
Posts: 636
Joined: Fri Oct 26, 2007 12:42 am
Location: Michigan, USA

Please be positive and constructive with your questions and comments.