Skip to content

Performance Governor settings

Kevin Doren edited this page Feb 27, 2022 · 6 revisions

The PREEMPT_RT and PREEMPT kernels posted here have default CPU governor set to "performance".

However, Raspberry Pi OS images may have a startup script enabled which sets the performance governor to "ondemand".

realtime applications which require the "performance" cpu governor should disable this service, which is called "raspi-config" (not related to the raspi-config program). raspi-config is not a systemd service, and is most easily disabled using the rcconf program which is not installed by default.

Alternatively, the performance governor can be enabled dynamically when required:
sudo sh -c "echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor"

To check current CPU governor setting:

cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
ondemand
ondemand
ondemand
ondemand

check if raspi-config service is running:

service --status-all | grep raspi-config
 [ + ]  raspi-config

install rcconf package, and use it to disable raspi-config service.
rcconf can also be run without arguments to view/set other rc-type services.

sudo apt -y install rcconf
sudo rcconf --off raspi-config
reboot

Check:

cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
performance
performance
performance
performance