Page 1 of 1

CPU Frequency not idling

Posted: Thu Oct 10, 2019 2:57 pm
by lieferant
I have a brand new RPi 4 (4GB) and tried it with the latest stable version of Raspbian and the latest version of DietPi.

I set up netdata on both and I set max cpu frequency to 2000 (governor ondemand).

This is what I got:

Screenshot 2019-10-10 at 15.49.43.png

Screenshot 2019-10-10 at 15.15.43.png
With Dietpi the CPU frequency is jumping around like crazy, while Raspbian idles at 600mhz as it is supposed to.
Why is that? Whats going wrong on Dietpi? What can I do?

Thanks a lot!

Re: CPU Frequency not idling

Posted: Fri Oct 11, 2019 4:03 am
by WarHawk
Ondemand means frequency from lowest to max if it ever needs it

I usually edit the /etc/defaults/cpufrequtils from ondemand to conservative

This way it ramps up and down rather than go from 0 to 100 then back down to 0...just remember IO reads/writes are also tied to cpu frequency

Re: CPU Frequency not idling

Posted: Fri Oct 11, 2019 11:19 am
by lieferant
but why do DietPi and Raspbian behave that differently when both use the same settings?

Re: CPU Frequency not idling

Posted: Fri Oct 11, 2019 1:15 pm
by MichaIng
It probably is the high default throttle down factor of DietPi or the low throttle up percentage. Please try to set the throttle down to 1 via dietpi-config which is default on RPi/Linux. We set it to 80 (40 since v6.26 when released) to not have the CPU freq down so fast after activity. Also raising throttle up percentage (from 50 default) to e.g. 85 or 95 might reduce the need to throttle up at all when e.g. Netdata itself takes > 50 but < 85/95% CPU usage for reading stats and updating graph. AFAIK 95 is default on RPi/Linux.

Will check later, there are files in /sys where you can check how often CPU governor changed frequency and most importantly how much time it was in which freq state. Probably we can/need to tune our default ondemand governor settings.