Skip to content

Instantly share code, notes, and snippets.

@simark
Created April 13, 2022 14:43
Show Gist options
  • Save simark/872d2d56466de7f3b357f7efa7a8c479 to your computer and use it in GitHub Desktop.
Save simark/872d2d56466de7f3b357f7efa7a8c479 to your computer and use it in GitHub Desktop.
Scripts to configure / unconfigure system for benchmarks
#!/usr/bin/env bash
echo "Disabling CPU boost"O
echo 0 | sudo tee /sys/devices/system/cpu/cpufreq/boost
for i in $(seq 16 31); do
echo "Disabling CPU core ${i}"
echo 0 | sudo tee /sys/devices/system/cpu/cpu${i}/online
done
for i in $(seq 0 15); do
echo "Setting performance scaling governor on CPU core $i"
echo performance | sudo tee /sys/devices/system/cpu/cpu${i}/cpufreq/scaling_governor
done
#!/usr/bin/env bash
echo "Enabling CPU boost"O
echo 1 | sudo tee /sys/devices/system/cpu/cpufreq/boost
for i in $(seq 16 31); do
echo "Enabling CPU core ${i}"
echo 1 | sudo tee /sys/devices/system/cpu/cpu${i}/online
done
for i in $(seq 0 31); do
echo "Setting ondemand scaling governor on CPU core $i"
echo ondemand | sudo tee /sys/devices/system/cpu/cpu${i}/cpufreq/scaling_governor
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment