Does "ondemand" CPU have a downside? Why isn't it the default?

My router seems to be consuming 6.7W when it is basically idle (other than some basic connectivity like this web connection that I am writing this post on). I find it a little bit too high. I searched the web, and things like disabling USB was not available, because it has no USB ports. "powertop" just printed "killed". Reducing Wi-Fi signal strengths did not have any noticeable impact on the idle power consumption.

The only thing I found useful seems changing CPU settings in /sys/devices/system/cpu/cpufreq/policy0. cat scaling_governor was userspace, so I changed it to ondemand. Idle power consumption was dropped to 6.1W. cat cpuinfo_cur_freq says 437500 and cat scaling_available_frequencies was 437500 600000 812500 1025000 1137500 1262500 1350000, so I guess the CPU power cannot be saved more than this.

But why isn't "ondemand" the default value? I mean, on a PC, the CPU clock speed automatically gets reduced by default, when it is doing nothing. Does it have some negative impact when it comes to a router?

I depends, some networking tasks like e.g. traffic shaping can be quite bursty and if the SoC takes a long time to ramp up, you might run out of CPU cycles... So try it out if it works for your use-case, by all means use ondemand.

2 Likes