User avatar
graysky
Posts: 101
Joined: Fri Apr 05, 2013 11:43 am
Location: /run/user/1000
Contact: Website

What is your idle CPU usage running xbmc? Mine is high!

Tue Nov 19, 2013 3:01 pm

I'm interested in seeing the %CPU use of an idle xbmc on other people's RPis. Here is a simple command that will look at the %CPU use of xbmc.bin once every 15 seconds for 1 min and log the output to a nice file.

Connect via ssh and look at the output of the following command:

Code: Select all

for i in {1..4}; do ps -eo pcpu,args | sort -k 1 -r | head -2 | grep xbmc.bin>>xbmc_usage.log && sleep 15s; done && cat xbmc_usage.log
Please post the output of xbmc_usage.log to this thread along with your distro. Note that xbmc should be running but not playing a video or having RSS feeds running.

I am running Arch ARM with xbmc-12.2-2:

Code: Select all

for i in {1..4}; do ps -eo pcpu,args | sort -k 1 -r | head -2 | grep xbmc.bin>>xbmc_usage.log && sleep 15s; done && cat xbmc_usage.log
91.0 /usr/lib/xbmc/xbmc.bin --standalone
92.5 /usr/lib/xbmc/xbmc.bin --standalone
92.2 /usr/lib/xbmc/xbmc.bin --standalone
92.0 /usr/lib/xbmc/xbmc.bin --standalone
So for me, CPU usage while idle is above 90 % :/

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 26660
Joined: Sat Jul 30, 2011 7:41 pm

Re: What is your idle CPU usage running xbmc? Mine is high!

Tue Nov 19, 2013 3:37 pm

Could be - there a lot going on in XBMC even when idle. What CPU usage do you get when playing back H264?
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

User avatar
graysky
Posts: 101
Joined: Fri Apr 05, 2013 11:43 am
Location: /run/user/1000
Contact: Website

Re: What is your idle CPU usage running xbmc? Mine is high!

Tue Nov 19, 2013 3:54 pm

It's pegged at >98 % but playback is smooth. What is your idle CPU %?

User avatar
redhawk
Posts: 3465
Joined: Sun Mar 04, 2012 2:13 pm
Location: ::1

Re: What is your idle CPU usage running xbmc? Mine is high!

Tue Nov 19, 2013 4:02 pm

XBMC has it's own internal CPU load meter you don't need to run any external command.
As for the high CPU usage that's probably because the GUI isn't GPU accelerated unlike video playback.
If it makes you feel any better XBMC isn't particularly CPU friendly with my PC either although less crippling with a P4.

Richard S.

User avatar
graysky
Posts: 101
Joined: Fri Apr 05, 2013 11:43 am
Location: /run/user/1000
Contact: Website

Re: What is your idle CPU usage running xbmc? Mine is high!

Tue Nov 19, 2013 4:11 pm

I know there is an internal meter, but the command I posted should be easy for anyone to run from an ssh term. I am interested in learning what the idle CPU loads are for other RPi people out there. To keep the thread on topic, please contribute.
graysky wrote: Connect via ssh and look at the output of the following command:

Code: Select all

for i in {1..4}; do ps -eo pcpu,args | sort -k 1 -r | head -2 | grep xbmc.bin>>xbmc_usage.log && sleep 15s; done && cat xbmc_usage.log
Please post the output of xbmc_usage.log to this thread along with your distro. Note that xbmc should be running but not playing a video or having RSS feeds running.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 26660
Joined: Sat Jul 30, 2011 7:41 pm

Re: What is your idle CPU usage running xbmc? Mine is high!

Tue Nov 19, 2013 4:48 pm

Their idle times will be pretty much the same as yours.

[Moderators are the moderators here...]
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

cdo
Posts: 9
Joined: Tue Nov 19, 2013 5:13 pm

Re: What is your idle CPU usage running xbmc? Mine is high!

Tue Nov 19, 2013 5:23 pm

These are my results:

Code: Select all

for i in {1..4} ; do ps -eo pcpu,args | sort -k 1 -r | head -2 | grep xbmc.bin>>xbmc_usage.log && sleep 15s ; done && cat xbmc_usage.log
22.9 /usr/lib/xbmc/xbmc.bin
22.9 /usr/lib/xbmc/xbmc.bin
22.9 /usr/lib/xbmc/xbmc.bin
22.9 /usr/lib/xbmc/xbmc.bin
Arch Linux ARM, not overclocked, XBMC12.2-2

The only thing I can remember I changed after installing XBMC was disabling the RSS feed (plus installing some video addons, which should not reduce CPU usage ;) ).

Greetings
cdo.

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5537
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: What is your idle CPU usage running xbmc? Mine is high!

Tue Nov 19, 2013 5:33 pm

On raspbian image, latest firmware, overclock, top of tree gotham xbmc built, with these patches:
https://github.com/xbmc/xbmc/pull/3674
https://github.com/xbmc/xbmc/pull/3676
https://github.com/xbmc/xbmc/pull/3677

Code: Select all

$ for i in {1..4}; do ps -eo pcpu,args | sort -k 1 -r | head -2 | grep xbmc.bin>>xbmc_usage.log && sleep 15s; done && cat xbmc_usage.log
11.4 /opt/xbmc-bcm/xbmc-dbg/arm-linux-gnueabihf/arm-linux-gnueabihf/lib/xbmc/xbmc.bin --standalone --fs
11.5 /opt/xbmc-bcm/xbmc-dbg/arm-linux-gnueabihf/arm-linux-gnueabihf/lib/xbmc/xbmc.bin --standalone --fs
11.4 /opt/xbmc-bcm/xbmc-dbg/arm-linux-gnueabihf/arm-linux-gnueabihf/lib/xbmc/xbmc.bin --standalone --fs
11.3 /opt/xbmc-bcm/xbmc-dbg/arm-linux-gnueabihf/arm-linux-gnueabihf/lib/xbmc/xbmc.bin --standalone --fs

User avatar
graysky
Posts: 101
Joined: Fri Apr 05, 2013 11:43 am
Location: /run/user/1000
Contact: Website

Re: What is your idle CPU usage running xbmc? Mine is high!

Tue Nov 19, 2013 6:59 pm

@jamesh - My numbers seem to be 4x-8x higher than those of cdo and dom.
@cdo - Are you outputting via HDMI or SVideo? Mine is going out the SVideo which might be the problem? I need to move it to a monitor for testing this.

EDIT: Nope. Connecting to an HDTV via HDMI and adjusting the resolution in the GUI to 1920x1080 makes no difference to CPU usage.

cdo
Posts: 9
Joined: Tue Nov 19, 2013 5:13 pm

Re: What is your idle CPU usage running xbmc? Mine is high!

Tue Nov 19, 2013 7:17 pm

graysky wrote:@cdo - Are you outputting via HDMI or SVideo?
Currently no monitor is attached, but when I started the PI and XBMC, HDMI was connected and the numbers were the same. I also tried with SVideo once, and iirc there was no difference.
I can't test it right now, as the PI is 500 km away and I can only ssh into it, no physical access. Maybe I can try again next week when I'm home again.

User avatar
graysky
Posts: 101
Joined: Fri Apr 05, 2013 11:43 am
Location: /run/user/1000
Contact: Website

Re: What is your idle CPU usage running xbmc? Mine is high!

Tue Nov 19, 2013 7:42 pm

The act of unplugging the SVideo and giving it an HDMI somehow cleared the high usage; perhaps it was that I forced cycled the resolution from 720i to 1080p followed up an exit and reboot or something. After I reconnected the RPi back to the SDTV that is uses, the CPU usage has dropped from 90+ on idle to the mid 20s... WTF?

Code: Select all

% for i in {1..4}; do ps -eo pcpu,args | sort -k 1 -r | head -2 | grep xbmc.bin>>xbmc_usage.log && sleep 15s; done && cat xbmc_usage.log
24.8 /usr/lib/xbmc/xbmc.bin --standalone
24.5 /usr/lib/xbmc/xbmc.bin --standalone
24.3 /usr/lib/xbmc/xbmc.bin --standalone
24.2 /usr/lib/xbmc/xbmc.bin --standalone

Return to “Media centres”