hard numbers: power consumption of xfmedia vs other media players
Kok, Auke
sofar at foo-projects.org
Fri Jun 1 18:24:32 CEST 2007
So, here are the hard numbers.
My test subject is a lenovo t60p. The system has the extended battery and in
idle mode (with some basic stuff turned off like the network, lcd screen
brightness all the way down, the system has about 5.2 hours of battery life this
way.
My measurements posted below are taken by reading the 'capacity remaining' over
a time of one minute, and subtracting them from eachother to get the amount
consumed over 60 seconds.
The box is running stock xfce-4.4.1 with the exception of the clock, which I
changed from LED to digital (less updates to the screen). For those running
powertop, I get 21 wakeups-from-idle, which is extremely good, kde/gnome score
well over 100.
The system spends more than 50msec in C3 on average, which is good but not
impressive, those numbers should be near 100msec really. Just unplugging the dvd
drive from the bay gets me from 50 to 65msec average in C3, due to the dock
driver polling 10x per second (yuck) to see if you have inserted a cd.
[Idle]
measurement: 300 mWh drained
measurement: 300 mWh drained
measurement: 300 mWh drained
The sensor has a sensitivity of 10mWh, so this is not really impressive data
looking at the accuracy, but shows quite well that the laptop is consistenly
draining power steadily at a rate of 5mWh per second
Now we load up xfmedia, leave the playlist empty and just have it sit on the
desktop:
[xfmedia, idle]
measurement: 340 mWh drained
measurement: 330 mWh drained
measurement: 330 mWh drained
So, just by being Idle xfmedia increases our power consumption by 10%, or in
real life terms for this laptop, which consumes about 16.7W in idle mode, about
1.67W. Considering a total capacity of 85000mWh, this has reduced our battery
life by 26 minutes.
let's play a song :) I took a single mp3 and put it on the target. I adjusted
volume levels to ZERO, so that I'm not measuring the wattage consumed by the
speakers but only merely of the audio chip processing and the CPU being active.
I also plugged in headphones so that the speakers go offline completely.
[xfmedia, playing mp3]
measurement: 410 mWh drained
measurement: 400 mWh drained
measurement: 400 mWh drained
So, that's 33% more power consumption when idle, and I can't even hear the sound
yet :). I've just taken off 71 minutes off my battery life.
[mplayer, playing mp3 in console mode with -quiet]
measurement: 390 mWh drained
measurement: 380 mWh drained
measurement: 390 mWh drained
that's not much better :(
[mpg123, playing mp3]
measurement: 390 mWh drained
measurement: 390 mWh drained
measurement: 400 mWh drained
that kind of surprises me, and I would have expected a bit better from mpg123,
but it's polling a lot and the cpu hardly gets into C3 anymore. Since that can't
be DMA wakeups (we're sending data, not receiving it) it must be the application
itself.
[audacious, idle]
measurement: 340 mWh drained
measurement: 340 mWh drained
measurement: 340 mWh drained
This is consistent with xfmedia in idle mode: the app is somehow still trying to
animate things even though the playlist is empty. Moving xfmedia to the systray
didn't help either: the app still wakes up just as often...
[audacious, playing mp3]
measurement: 400 mWh drained
measurement: 400 mWh drained
measurement: 400 mWh drained
I did change the default settings to 'visualization mode off', set the
visualization mode rate to 'lowest' and 'disabled scrolling of song title' just
in case it might actually help.
Just for kicks I turned all the animated goodies back on:
[audacious, playing mp3, default animation settings]
measurement: 400 mWh drained
measurement: 400 mWh drained
measurement: 400 mWh drained
It seems like audacious is still doing the animations even though they're turned
off, there's no noticeable difference.
Finally, I gave ogg123 a try:
[ogg123, playing ogg file with -q]
measurement: 390 mWh drained
measurement: 380 mWh drained
measurement: 390 mWh drained
Conclusion:
playing music causes a significant power drain, up to 35% more on the target
that I tested. None of the players (surprisingly) outperform each other, however
player and ogg123 "consume" about 20% less than mpg123, audacious and xfmedia.
The total difference in battery life between them is not that large (10-15
minutes max).
However, it is clear that gui audio players are a bad idea. In idle mode they
increase overall battery consumption by 35%, taking a bug chunk out of your
battery life that you could have used otherwise. It also appears that media
players constantly try to animate stuff even though there is nothing in the
playback list or being played at the time.
The big question is now to find out if these media players can be modified to be
more efficient. Most players seem to want to refill the buffers at all poll
times, but refilling a 2 second audio buffer 200x per second is useless, and 10x
per second might be a significant improvement while still giving a guarantee of
a 95% full buffer at all times (instead of 99.5%).
I have yet to find an audio player that does this. If anyone knows of one that
works this way then please let me know and I'll test it :)
Cheers,
Auke
More information about the Xfce4-dev
mailing list