What is a "performance governor"?

Just installing Ardour 6.9.
I am not a Ubuntu freak and do not understand this message:

!!! WARNING !!! - Your system seems to use frequency scaling.
This can have a serious impact on audio latency.
For best results turn it off, e.g. by choosing the ‘performance’ governor.

I have no idea what my system (Ubuntu 20.04.3) is using… what is frequency scaling? how/where should I choose a “performance governor”?

Regards
Michael

It tells the CPU how and when to go to sleep, to save power, and when and how to wake up when it’s needed for work.

Start a Terminal and run
sudo cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
to see which guvernor you’re using and

sudo -i
Nr=`nproc --ignore=1`; for var in `seq 0 $Nr` ; do echo "performance" > /sys/devices/system/cpu/cpu${var}/cpufreq/scaling_governor ; done

to change it to the performance one.

To reset it to the original governor you either reboot or replace “performance” in the command above with what you had originally; probably “ondemand”

1 Like

Thanks Peder,
The answer to

sudo cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
is “powersave”. So nothing I would bother with. I guess I can work without any problem having “power save” active.
I know I should not to real time recordings though, while power save could trigger, but for editing it should be okay.
Regards
Michael

I have tried the method recommended by Paul in the post below and it works perfectly.
I think it is more flexible and more elegant than the method I explained, so I have deleted my previous post.
Thanks Paul and Peder for explaining it.
Happy new year by the way! :clinking_glasses: :champagne:

Just in case it helps someone, this is the script I use to switch between performance and on-demand frequency scaling. I am sure it could be much better. It does not require thermald, and is invoked with either no arguments to check the current setting, or with a single word that starts with either “p” (to switch to performance) or “o” (to switch to on-demand).

!/bin/sh

if [ $# != 1 ]
then
    echo -n "Current mode (CPU0 only): "
    cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
    exit 0
fi

case $1 in
    p*) echo performance | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor ;;
    o*) echo ondemand | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor ;;
    *) echo "unknown argument \"$1\". Ignored." ; exit 1 ;;
esac
2 Likes

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.