Refine docs on changing cpufreq governor (#1325)

Ensure we don't have users accidentally putting their CPUs into
powersave.

Fixes #1048
This commit is contained in:
Dominic Hamon 2022-01-17 14:52:02 +00:00 committed by GitHub
parent 00e2211052
commit 9e859f5bf5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1227,10 +1227,16 @@ If you see this error:
***WARNING*** CPU scaling is enabled, the benchmark real time measurements may be noisy and will incur extra overhead.
```
you might want to disable the CPU frequency scaling while running the benchmark:
you might want to disable the CPU frequency scaling while running the benchmark using a script like:
```bash
sudo cpupower frequency-set --governor performance
./mybench
sudo cpupower frequency-set --governor powersave
for f in /sys/devices/system/cpu/cpu?/cpufreq/scaling_governor
do
before=`cat $f`
echo "performance" > $f
./mybench # run your benchmark here
echo $before > $f
done
```
note, you will have to run this as root (under sudo).