Re: Measuring power usage

2013-11-06 Thread Benoit Girard
You might be interested in bug 769431 where Intel modified power gadget to
export symbols that the profiler can use to sample the power state and
correlate it with execution.


On Tue, Nov 5, 2013 at 11:02 AM, jmaher joel.ma...@gmail.com wrote:

 I am working on using intel power gadget to measure the power usage.
  Currently this is on windows with an idle test.  Our test slaves have
 older CPUs which do not support the intel power gadget.
 ___
 dev-platform mailing list
 dev-platform@lists.mozilla.org
 https://lists.mozilla.org/listinfo/dev-platform

___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Measuring power usage

2013-11-05 Thread David Rajchenbach-Teller
Context: I am currently working on patches designed to improve
performance of some subsystems in Firefox Desktop by decreasing disk
I/O, but I hope that they will also have an effect (hopefully
beneficial) on power/battery usage. I'd like to confirm/infirm that
hypothesis.

Measuring and collecting performance improvement is relatively easy,
thanks to Telemetry. Measuring power usage, though? That looks harder.

So, here are my questions:
- do we already have a good way to measure power usage by some thread
between two points in time?
- if not, would there be interest in developing a library for this
purpose ? Note that I don't even know if that's possible in userland.
- do we already have a good way to measure total power usage by a
xpcshell test, perhaps by interfacing with powertop or Intel Power Gadget?

Cheers,
 David

-- 
David Rajchenbach-Teller, PhD
 Performance Team, Mozilla
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Measuring power usage

2013-11-05 Thread Andreas Gal
If you can access the remaining battery status of a large enough
population over time it should be easy to use telemetry to measure
this pre and post patch.

Andreas

Sent from Mobile.

 On Nov 5, 2013, at 16:46, David Rajchenbach-Teller dtel...@mozilla.com 
 wrote:

 Context: I am currently working on patches designed to improve
 performance of some subsystems in Firefox Desktop by decreasing disk
 I/O, but I hope that they will also have an effect (hopefully
 beneficial) on power/battery usage. I'd like to confirm/infirm that
 hypothesis.

 Measuring and collecting performance improvement is relatively easy,
 thanks to Telemetry. Measuring power usage, though? That looks harder.

 So, here are my questions:
 - do we already have a good way to measure power usage by some thread
 between two points in time?
 - if not, would there be interest in developing a library for this
 purpose ? Note that I don't even know if that's possible in userland.
 - do we already have a good way to measure total power usage by a
 xpcshell test, perhaps by interfacing with powertop or Intel Power Gadget?

 Cheers,
 David

 --
 David Rajchenbach-Teller, PhD
 Performance Team, Mozilla
 ___
 dev-platform mailing list
 dev-platform@lists.mozilla.org
 https://lists.mozilla.org/listinfo/dev-platform
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Measuring power usage

2013-11-05 Thread David Rajchenbach-Teller
Good point. Just accessing the battery level is rather imprecise, but
Telemetry + large numbers should help us see trends.

If we go that way, this probably doesn't deserve a new library, but
possibly a few utility functions in e.g. Telemetry or TelemetryStopwatch.

Cheers,
 David

On 11/5/13 4:49 PM, Andreas Gal wrote:
 If you can access the remaining battery status of a large enough
 population over time it should be easy to use telemetry to measure
 this pre and post patch.
 
 Andreas
 


-- 
David Rajchenbach-Teller, PhD
 Performance Team, Mozilla
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Measuring power usage

2013-11-05 Thread jmaher
I am working on using intel power gadget to measure the power usage.  Currently 
this is on windows with an idle test.  Our test slaves have older CPUs which do 
not support the intel power gadget.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Measuring power usage

2013-11-05 Thread Gabriele Svelto

 Hi David,

On 05/11/2013 16:46, David Rajchenbach-Teller wrote:

Context: I am currently working on patches designed to improve
performance of some subsystems in Firefox Desktop by decreasing disk
I/O, but I hope that they will also have an effect (hopefully
beneficial) on power/battery usage. I'd like to confirm/infirm that
hypothesis.


if you think that these changes will have a measurable impact on Firefox 
OS too you might want to get in touch with Jon Hylands 
(jhyla...@mozilla.com). He built a remarkable harness to measure the 
power consumption of different FxOS devices directly. See his blog post 
about one of these harnesses:


http://blog.huv.com/2013/09/so-up-until-month-ago-i-was-working-on.html

More goodness on his Twitter feed:

https://twitter.com/JonHylands

 Gabriele
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Measuring power usage

2013-11-05 Thread David Rajchenbach-Teller
On 11/5/13 4:49 PM, Andreas Gal wrote:
 If you can access the remaining battery status of a large enough
 population over time it should be easy to use telemetry to measure
 this pre and post patch.
 
 Andreas
 
 Sent from Mobile.

As it turns out, the platform currently offers an abstract notion of
battery level as a number in [.0, 1.0] and/or discharging time. I
believe that we would need something a bit closer to the metal, e.g. a
number of W•s.

I wonder if I should pursue this as a xpcom/js-ctypes library or whether
we should work on extending the BatteryManager WebAPI. Note that I am
interested in using it in workers.

Any thought?

Cheers,
 David

-- 
David Rajchenbach-Teller, PhD
 Performance Team, Mozilla
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform