xfmedia: wakeups per second in idle, play time

Brian J. Tarricone bjt23 at cornell.edu
Thu May 31 19:47:27 CEST 2007


On Thu, 31 May 2007 10:39:41 -0700 Kok, Auke wrote:

>I started looking with powertop at some multimedia apps, which is
>highly interesting since those generally need to poll to keep buffers
>filled and thus are suspect of having lots of wakeup events.
>
>xfmedia is doing rather poorly at 200 wps in idle mode. I suspect this
>is due to a gfx/display update ticker. When not playing songs this can
>be completely eliminated...

Yeah, that kinda sucks.  I'm not really sure why, though.  It only
updates the time counter once per second (I feel like this is disabled
when idle, but I don't remember).  xine-lib must be doing a bunch of
crap for some reason.

>During songplay (audio only) the wps rises to 2000 per second. That's
>just way too much :)

Sounds pretty normal to me.  Not much I can do about it anyway.
xfmedia itself should only be doing the same stuff as in idle, plus
a once-per-second time counter update, plus whatever xine-lib is doing.

>Then ogg123/mpg123 kick everyones butt, getting down to about 40 wps
>during songplay. I suspect that even that is really a lot higher than
>needed, as generally you can buffer more than a second or two before
>needing to refill it, so technically we should be able to listen to
>audio with 1wps :)

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.

>I've pinged the audacious folk and they might look at it. perhaps
>Brian or someone else interested can look at xfmedia.

Perhaps... I hardly have time to work on xfmedia at all these days.  If
you don't file a bug, I'll likely forget about it in about an hour.

	-brian




More information about the Xfce4-dev mailing list