xfmedia: wakeups per second in idle, play time

Brian J. Tarricone bjt23 at cornell.edu
Thu May 31 20:29:49 CEST 2007


On Thu, 31 May 2007 11:02:46 -0700 Kok, Auke wrote:
>Brian J. Tarricone wrote:
>> On Thu, 31 May 2007 10:39:41 -0700 Kok, Auke wrote:
>> 
>> I really feel like this is kinda useless here.  The media player is
>> shoving data at the sound card, and the sound card is probably
>> generating interrupts like mad.  If you're actually *doing stuff*,
>> what do you expect?  The CPU has to do work.  I think using powertop
>> to examine computers that are idle is useful, but not so much when
>> applications are actually doing things.  Obviously you can use
>> powertop to find applications that you'd rather aren't doing things,
>> but a media player kinda defeats that.  While it's playing, it's
>> *always* doing stuff.
>
>the difference between 40 wakeups per second to play audio (results in
>25 MILLISECONDS of sleep time in between) and 2000 (at which point the
>CPU *never* goes into C3 sleep) is gigantic,

Well, you didn't say that.  All you provided were "wakeups per second",
which, alone, is a useless metric when the system is *active*.

> that probably doubles your battery life.

Got any hard data to back this up, or are you just making stuff up?

>I'm not even looking at the audio interrupts, those are actually not
>accounted for on xfmedia/audacious behalf at all, and nowhere near as
>high as 2000 (about 40 per second when playing with xfmedia).  I
>I suspect that xfmedia or xine is just monitoring the buffer level at
>those insane intervals, instead of just having the hardware do it's
>thing and going to sleep for (say) half a second.

I really have no idea; I haven't dug too deeply into xine's internals.

>Yoru argument about 'using powertop to profile activity being useless'
>is stupid, and by switching to a media player that achieves *the exact
>same thing* with much less work (and getting an hour extra battery
>life or so) I obviously prove my point..

Not really.  You haven't 'proven' anything about extra battery life,
aside from making a wild assertion.  For all we know, the savings could
be minimal.  Take a laptop, charge it up to 100%, start up X, open a
terminal, and simultaneously unplug the laptop and start mpg123 playing
an mp3 on repeat.  See how long it takes to completely discharge the
battery. Then charge it back up and do the same with xfmedia (be sure
to use the same mp3).  Compare.  If it's something like an extra 45
minutes of battery life, then sure, that's something worthwhile to look
at.  If it's 10-15 minutes... not so much.

I doubt it would be possible to get a large GUI media player app to be
as friendly power-wise as a CLI app, but if it's possible to cut its
impact by a large amount, might as well try.  (Well, not me: I'm sure
most of the wakeups are in xine-lib, and I don't have the time nor
interest to look into it.)

	-brian




More information about the Xfce4-dev mailing list