mirror of
https://github.com/google/benchmark.git
synced 2025-03-23 07:30:07 +08:00
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:
parent
00e2211052
commit
9e859f5bf5
@ -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.
|
***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
|
```bash
|
||||||
sudo cpupower frequency-set --governor performance
|
for f in /sys/devices/system/cpu/cpu?/cpufreq/scaling_governor
|
||||||
./mybench
|
do
|
||||||
sudo cpupower frequency-set --governor powersave
|
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).
|
||||||
|
Loading…
Reference in New Issue
Block a user