From c69e256b0c1bfb67de6cb1d040def1eac4d9ecbb Mon Sep 17 00:00:00 2001 From: Nigel Tao Date: Thu, 9 Nov 2017 13:26:20 +1100 Subject: [PATCH] Add a note about CPU Scaling and benchmarks. --- doc/benchmarks.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/doc/benchmarks.md b/doc/benchmarks.md index ad1cb364..430c75b8 100644 --- a/doc/benchmarks.md +++ b/doc/benchmarks.md @@ -32,6 +32,7 @@ benchmark runs, or calculate p-values when comparing numbers before and after a code change. To install it, first install Go, then run `go get golang.org/x/perf/cmd/benchstat`. + ## puffs bench As mentioned above, individual benchmark programs can be run manually. However, @@ -52,6 +53,19 @@ or puffs bench -ccompilers=gcc -reps=3 -focus=Benchmarkpuffs_gif_lzw std/gif +## CPU Scaling + +CPU power management can inject noise in benchmark times. On a Linux system, +power management can be controlled with: + + # Query. + cpupower --cpu all frequency-info --policy + # Turn on. + sudo cpupower frequency-set --governor powersave + # Turn off. + sudo cpupower frequency-set --governor performance + + # GIF The 1k, 10k, etc. numbers are approximately how many bytes of pixel data there