Skip to content

Instantly share code, notes, and snippets.

@PeterTh
Last active January 27, 2022 13:50
Show Gist options
  • Select an option

  • Save PeterTh/d22c8953ce61fdba165cd6e0c8342766 to your computer and use it in GitHub Desktop.

Select an option

Save PeterTh/d22c8953ce61fdba165cd6e0c8342766 to your computer and use it in GitHub Desktop.
Setting a completely fixed CPU frequency - for consistent SW benchmarking
# This is tested on Ubuntu 20.04 on an AMD Epyc system
# query hardware limits / capabilities with
cpupower frequency-info
# disable boost
echo "0" | sudo tee /sys/devices/system/cpu/cpufreq/boost
# disable idle states
sudo cpupower -c all idle-set -d 2
sudo cpupower -c all idle-set -d 1
sudo cpupower -c all idle-set -d 0
# set a fixed frequency (by setting upper and lower limit to the same value)
sudo cpupower -c all frequency-set -g performance -d [FREQ] -u [FREQ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment