This is a mental note. Ensuring all CPUs are set to provide maximum performance is useful for example when running benchmarks.
Check current CPU frequency:
grep -E '^model name|^cpu MHz' /proc/cpuinfo
Check current CPU scaling governor setting:
Set CPU scaling governor to
echo performance | sudo tee /sys/devices/system/cpu/cpu[0-9]*/cpufreq/scaling_governor
Repeat step 1 and/or step 2 to check that the new setting is in effect.
When done with benchmarks or whatever else, set CPU scaling governor (back) to
echo powersave | sudo tee /sys/devices/system/cpu/cpu[0-9]*/cpufreq/scaling_governor
The Go Blog: Profiling Go Programs