CPU load when idle on Linux
#1
I have Kodi installed on a Gigabyte Brix with the following setup:
CPU Braswell N3150, 4 GB of RAM
Ubuntu 16.04 LTS up to date at 23-Jan-2017
Kodi 16.1 Jarvis with Confluence skin
Kodi 17 RC 3 with Estuary skin (not together, but tested with both)

With both versions of Kodi, when the system is idle Kodi CPU usage is always about 15% to 20%. The same version of Kodi installed on a Macbook pro 13" (late 2013 2.4 Ghz model) takes up to 5% or 6% CPU when idle.

Is this normal? Anyone with a similar setup can confirm that this CPU usage is not too high for some reason? I'm aware that the N3150 is less powerful than the i5 in the Macbook, but maybe someone can confirm this findings.

Thank you all!
Reply
#2
a percentage is useless without the frequency of the cpu. You know 15% at 1500 Mhz is high. 15% at 600 mhz is much lower.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#3
(2017-01-23, 13:44)fritsch Wrote: a percentage is useless without the frequency of the cpu. You know 15% at 1500 Mhz is high. 15% at 600 mhz is much lower.

I know, I'm also aware that MHz in itself is a meaningless measure, that's why I'm not questioning whether 6% on the Mac is more or less "heavy" than 20% on the Brix (comparing dual core vs quad core, different architecture, different "turbo" speed limits etc). I'm just asking if there's some user that has a Braswell N3150 (http://ark.intel.com/it/products/87258/I...o-2_08-GHz) on Linux.

Doing a rough comparison from Passmark values single core performance of the Brix is 1/4 of single core performance of the i5, so maybe a ratio of 6/20 is ok
Reply
#4
Modern cpus tend to go into powersave mode while idling by lowering core frequency,
this behaviour is determined by the governor in kernel.

Yet again:
15% while in "low freq mode" < 15% while in "full speed mode"

check current cpu frequency:
Code:
cat /proc/cpuinfo
or
Code:
cpupower frequency-info #you may need to install it
Reply
#5
(2017-01-23, 16:48)asavah Wrote: Modern cpus tend to go into powersave mode while idling by lowering core frequency,
this behaviour is determined by the governor in kernel.

Thank you, I checked the CPU when the system is idle and it is clocked at 900Mhz, I couldn't check it together with Kodi running (yet) but it seems a good explanation of the high % figure. Smile
Reply
#6
Hi there, and sorry for entering this thread.
I don't have the similar problem, but also some troubles with the CPU-load in idle.

My system is quite old - Intel Atom330/ION1 with Lubuntu 16.10 as OS. The system runs only 2 applications, Kodi for video and MPD for music. When i start the system both apps start automatically.
When i want to watch video, i also power on the projector. When i want to listen to music, the projector stays powered off, and here starts the problem:

While MPD causes in idle about 0% CPU-load, Kodi needs about 30%. And as far as i mostly listen to music, this 30% are spent quite useless. In reality this should not cause great problems, but sometimes MPD needs a lot of CPU-power. When i want to playback multichannel-DSD-content, the CPU-load goes to 100% and the music stutters.

To make it short:
Are there possibilitys to decrease the idle CPU-load in Kodi? Is there a method to set Kodi in sleep-mode, when not used?
Or are there maybe other skins, which need less power?

I am still using the confluence-skin because i am used to it and the new standard-skin is looking quite funny with the projector. And estuary-skin consumes the same idle CPU-load, as i tested.
Reply
#7
Stop Kodi via "systemctl stop kodi.service" and start it when needed "systemctl start kodi.service".
Start command is done via lirc to start if not running already.
That's what I do.
Kodi 21.0α | Ubuntu 22.04.3 | Kernel 6.4.x | intel i5-12600K | Gigabyte Z690 Gaming X DDR4 | Corsair 2x8192MB (DDR4-3200) | HDPlex H5v2 | HDPlex 400W HiFi DC-ATX | Pioneer VSX-934 | LG 65B7D
Reply
#8
turn off RSS feed and dynamic background
Reply
#9
@3dfx:

Thanks for the advice, but i really like the feeling to just press one button to have the whole thing running. I know, a little childish... Big Grin

@wsnipex:

Thanks for your advice too!
RSS-feed is already turned off. Where can i turn off dynamic background?
Reply
#10
ok,
when you mean "enable custom background" in the skin settings-menu, i have it also already turned off.
So, where does the CPU-load in idle come from?
I have nothing special running here - just the simple confluence skin with no addons at all.
When doing nothing Kodi needs about 30% CPU-load.
While playing a 1080p-mkv the load decrease to about 7-8%. Isn't that strange?!
Reply
#11
Not childish, nerdish or nerdy? Big Grin

With cec and a remote, that's possible.
I need one click on the OK button on my remote to turn on the TV, AVR and start Kodi Tongue
Kodi 21.0α | Ubuntu 22.04.3 | Kernel 6.4.x | intel i5-12600K | Gigabyte Z690 Gaming X DDR4 | Corsair 2x8192MB (DDR4-3200) | HDPlex H5v2 | HDPlex 400W HiFi DC-ATX | Pioneer VSX-934 | LG 65B7D
Reply
#12
Yeah, nerdy could be the right word.... Tongue

And you win, i need 3 buttons - projector, AVR and media-PC. But i can use Yatse on the Nexus10 and i really like that.

To come back to the topic:
I think there is a discussion about the high power-consumption of Kodi in idle for some time. Would it be useful to start a feature request about that?
Does anybody know, what Kodi is doing when doing nothing? Huh
Reply
#13
Contadino,

Probably the main reason for the CPU load being so high has to do with how Kodi is coded. The gui is basically a great big game loop (this comes about as that was how XBMP needed to be coded to run on the original Xbox). So, check and act on a number of things to display the gui, loop back and repeat as fast as you can. That is it put very simply. In actual fact the loop is restricted to happening at maximum 100 times per second, but just the same there is a lot going on even when there is nothing appearing to be happening.

Can there not be something done about how this part of Kodi is coded? Sure, but the number of people who know this section of code is severely limited and it would be a very large job to tackle. Things are being worked on but like most open source projects additional help is always required but seldom available.

Wyrm (AppTV skin writer)
If required a FULL debug log can now be submitted from the skin in settings->skin settings->support. Or follow instructions here if you can't access skin settings.

FAQ's located at :- http://kodi.wiki/view/Add-on:AppTV
Reply
#14
We have dirty regions - if nothing is dirty, nothing is rendered
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#15
(2017-02-20, 15:21)fritsch Wrote: We have dirty regions - if nothing is dirty, nothing is rendered
Fritsch,

Yep we now have dirty regions which certainly helps, but there is still all of the skin conditions being checked. Also all of the skins $INFO's to be checked and updated as required plus a whole pile of other things happening in the background to make sure the user gets to see our user interfaces.

Just to be clear, my last message was not a criticism of the Development group (far, far from it), just pointing out that there is an awful lot going on under the surface to just keep the gui going.

I could no doubt suggest a number of areas where the code could be optimised (Jonathan suggested a number before he retired), but the coding is way beyond my pay grade. Things are certainly better now than what they were in the past, but they could be better. Just the same, no dev working in the gui area means no real progress in cutting back the idle CPU usage.

Wyrm
If required a FULL debug log can now be submitted from the skin in settings->skin settings->support. Or follow instructions here if you can't access skin settings.

FAQ's located at :- http://kodi.wiki/view/Add-on:AppTV
Reply

Logout Mark Read Team Forum Stats Members Help
CPU load when idle on Linux0