CPU Frequency not idling

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:



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!

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

but why do DietPi and Raspbian behave that differently when both use the same settings?

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.