[chromium-dev] Measuring power consumption

445 views
Skip to first unread message

Aurimas Liutikas

unread,
Oct 23, 2013, 3:39:46 AM10/23/13
to Chromium-dev
With ever increasing importance on mobile platforms in Chromium, power usage is becoming one of the most important aspects of the browser. Every once in a while there are blog posts claiming one or another browser being the best at power usage (e.g. [1]).

I would like to pose a question of what would be a good day to do reliable power metrics on mobile platforms like Chrome for Android or ChromeOS?

Context: I was asked by a few Blink developers of how to reliably measure the impact of their CLs on performance and battery life, however, I was unable to come up with a good answer.

There are a lot of brilliant people on this mailing list so I would love to hear your ideas on how we could make power consumption be a part of the Chromium developer work flow in the future.


Thanks!
Aurimas

Tony Gentilcore

unread,
Oct 23, 2013, 11:31:15 AM10/23/13
to aur...@chromium.org, Chromium-dev, Dave Tu, simon...@chromium.org
Simon Hatch did a pretty thorough study of this a few months ago and
concluded that a hardware device like a Monsoon[1] is the only way to
get truly accurate battery usage numbers. So Dave Tu added a
--profiler=monsoon option to Telemetry[2] so that anyone with a
Monsoon device can get pretty power draw graphs for our performance
benchmarks like loading and scrolling pages.

That being said, Simon did have a "pretty good" script for measuring
power usage purely in software. It could give you a good idea of how
much power the CPU, radio, etc are using. But it misses things like
the GPU's power draw (and there are several other caveats). We might
consider integrating that into Telemetry even with its known
limitations because the bulk of Blink changes would only be interested
in the effect on CPU power draw. That would also allow us to track
power on the perf dashboard[3].

Aurimas, would you or anyone else on this list be interested in
productionizing that?

-Tony

[1] http://www.msoon.com/LabEquipment/PowerMonitor/
[2] http://www.chromium.org/developers/telemetry
[3] https://chromeperf.appspot.com/
> --
> --
> Chromium Developers mailing list: chromi...@chromium.org
> View archives, change email options, or unsubscribe:
> http://groups.google.com/a/chromium.org/group/chromium-dev
>
> To unsubscribe from this group and stop receiving emails from it, send an
> email to chromium-dev...@chromium.org.

Sangwhan Moon

unread,
Oct 23, 2013, 3:28:50 PM10/23/13
to to...@google.com, aur...@chromium.org, Chromium-dev, Dave Tu, simon...@chromium.org
Not really a professional here, but Monsoon looks like logging the data and
exporting it programmatically could be a hassle considering what the software
looks like.

I'm not entirely sure about the feature set that Monsoon provides, but there are
DMMs that have a pseudo-serial interface which might be worth investigating -
Agilent has some models that have a IR emitter for logging, which can be read
with a USB or Bluetooth IR receiver that acts as a serial port when paired to a
PC. The primitive nature of the interface (internally it's a USB-Serial) allows it
to work on all major OSes, and the output is plain text on the serial port.

(It does need a bit of parsing and figuring out the format. Not entirely a free lunch.)

One caveat I would also want to note is that the certain screens have a bit of
character if the test target is a mobile phone, and what pixels get pushed on the
screen if it happens to be say, OLED. (Power consumption per pixel is something
like #FFFFFF > #00FF00 > #FF0000 > #000000 on Samsung OLED screens.)

Sadly I am a outsider so I can't physically help much in this regard, but hope this helps.
Good luck with the project. :-)

Sangwhan
--
Sangwhan Moon [Opera Software ASA]
Software Engineer | Tokyo, Japan

Adam Treat

unread,
Oct 23, 2013, 5:20:28 PM10/23/13
to to...@google.com, aur...@chromium.org, Chromium-dev, Dave Tu, simon...@chromium.org
Hello,

This is something Samsung is very interested in as well. I think we'd
be interested in helping to get a bot up and running that will look at
power usage in various scenarios. Perhaps even hosting the bot with a
device like the monsoon on one of our phones.

Glad that others are also interested in this discussion :)

Cheers,
Adam

Pan Deng

unread,
Oct 24, 2013, 1:10:04 AM10/24/13
to chromi...@chromium.org, aur...@chromium.org, Dave Tu, simon...@chromium.org
The 2-stages browser power study methodology might be able to be abstracted like this: 1) firstly perform the power data collection and 2) then synthesize the power data via post-processing for later analysis.
Can we make it more straightforward ? There is a slight different thinking: Can we collect the power data from browser itself (just similar as performance tuning steps) and the power data can be calibrated with other browser events and app events directly and automatically, to help the power analysis and optimization.

thanks
Pan

Sangwhan Moon

unread,
Oct 25, 2013, 6:03:34 AM10/25/13
to pan....@intel.com, Chromium-dev, aur...@chromium.org, Dave Tu, simon...@chromium.org
It's a Cortex-A15 board that can run both Android and other Linux distros, with a built in power meter.

Adam Treat

unread,
Nov 11, 2013, 4:53:19 PM11/11/13
to chromi...@chromium.org, Dave Tu, simon...@chromium.org, to...@google.com
Hello Tony,

I have a monsoon device and telemetry tests running using
chromium_testshell on my Samsung Galaxy Note 3. I was really eager to
try the --profiler=monsoon that you suggested here, but I am getting this:

$> tools/perf/run_measurement --profiler=monsoon
--browser=android-chromium-testshell
Usage: run_measurement [options] measurement page_set

run_measurement: error: option --profiler: invalid choice: 'monsoon'
(choose from 'android-memreport', 'android-systrace', 'java-heap',
'netlog', 'oomkiller', 'strace', 'tcmalloc-heap', 'tcpdump', 'trace')

With nothing for the monsoon device. Is this code checked in to trunk?
I am interested in 'productizing' this and any software script you have
for measuring CPU power draw along with setting up a perf bot with this
monsoon device. Please send me any/all you have on this and I'd love to
bring it to a point where it could be used by the project on the bots.

Cheers,
Adam

On 10/23/2013 11:31 AM, Tony Gentilcore wrote:

Tony Gentilcore

unread,
Nov 11, 2013, 5:54:04 PM11/11/13
to Adam Treat, chromium-dev, Dave Tu, simon...@chromium.org
Oh rats, I just noticed that tools/telemetry/telemetry/core/platform/profilers/monsoon_profiler.py depends upon toosl/telemetry/third_party/internal/monsoon.py (which is internal only). That's the part that knows how to interface with the monsoon device from a linux workstation.

It has some minimal internal dependencies, but doesn't look too hard to open source. I'll talk to the authors and investigate whether we can rewrite it and check it into chromium. No promises yet, but I'm optimistic :)


Adam Treat

unread,
Nov 12, 2013, 10:13:40 AM11/12/13
to Tony Gentilcore, chromium-dev, Dave Tu, simon...@chromium.org
On 11/11/2013 05:54 PM, Tony Gentilcore wrote:
> Oh rats, I just noticed that
> tools/telemetry/telemetry/core/platform/profilers/monsoon_profiler.py
> depends upon toosl/telemetry/third_party/internal/monsoon.py (which is
> internal only). That's the part that knows how to interface with the
> monsoon device from a linux workstation.
>
> It has some minimal internal dependencies, but doesn't look too hard
> to open source. I'll talk to the authors and investigate whether we
> can rewrite it and check it into chromium. No promises yet, but I'm
> optimistic :)

Thanks for looking into this. Having a python interface to monsoon
device will be very useful and allow me to escape from the Windows
dependency.

Thanks again!
Adam

Tony Gentilcore

unread,
Nov 18, 2013, 8:19:44 PM11/18/13
to Adam Treat, chromium-dev, Dave Tu, simon...@chromium.org
We got the green light: https://codereview.chromium.org/75803002/

Xigui Wang

unread,
Jul 3, 2014, 11:49:21 PM7/3/14
to chromi...@chromium.org, to...@google.com, aur...@chromium.org, d...@chromium.org, simon...@chromium.org
Now I collect the energy consumption from the smartphone running Android os with Monsoon Device. How can I translate the logging data into plain files? thank you !

在 2013年10月24日星期四UTC+8上午3时28分50秒,Sangwhan Moon写道:
Reply all
Reply to author
Forward
0 new messages