4

This may be a terminology problem at my end and a duplicate: On Intel CPUs, I can relatively easy disable turbo boost at runtime by running something like

echo 1 > /sys/devices/system/cpu/intel_pstate/no_turbo

The CPU then runs at its base clock without "turboing up". The nice thing is that I do not need to change BIOS/(U)EFI settings for that.

What would be the equivalent (in terms of both terminology and commands) on AMD CPUs, specifically on a Zen-1 Epyc?

I am trying to run the CPU at constant (low) speed for consistent benchmark results. I am trying to compare different software implementations of algorithms.

0

2 Answers 2

8

By default, AMD processors use the acpi-cpufreq CPU frequency scaling driver.
Check via:

grep . /sys/devices/system/cpu/cpufreq/policy*/scaling_driver

For that driver, to disable turbo boost, do:

echo "0" | sudo tee /sys/devices/system/cpu/cpufreq/boost
4
  • Thanks a lot for the answer!
    – s-m-e
    Nov 22, 2020 at 16:23
  • And how to disable it again?
    – ThomasRS
    Jan 15, 2021 at 22:58
  • Is a reboot necessary?
    – ThomasRS
    Jan 15, 2021 at 23:05
  • 2
    @ThomasRS : No, the setting will be lost through a re-boot. echo 1 | sudo tee /sys/devices/system/cpu/cpufreq/boost to reverse the setting. Jan 16, 2021 at 3:42
0

To make a persistent change, this command needs to be run by sudo on reboot. One way to do this is to append the setting to the crontab config file:

Edit crontab setting as admin:

sudo crontab -e

and append the command at the end of the config file:

@reboot echo "0" | tee /sys/devices/system/cpu/cpufreq/boost

Moreover, if you are using gnome, you can check this awesome extension Frequency Boost Switch to toggle the setting using GUI.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.