File tree Expand file tree Collapse file tree 2 files changed +34
-0
lines changed Expand file tree Collapse file tree 2 files changed +34
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+
3+ CPUPATH=/sys/devices/system/cpu
4+
5+ MAXID=$( cat $CPUPATH /present | awk -F- ' {print $NF}' )
6+
7+ set_governor () {
8+ echo " Setting CPU frequency governor to \" $1 \" "
9+ i=0
10+ while [ " $i " -le " $MAXID " ]; do
11+ echo " $1 " > " $CPUPATH /cpu$i /cpufreq/scaling_governor"
12+ i=$(( i + 1 ))
13+ done
14+ }
15+
16+ case " $1 " in
17+ fast | performance)
18+ set_governor " performance"
19+ ;;
20+ * )
21+ echo " Usage: $0 fast"
22+ exit 1
23+ ;;
24+ esac
Original file line number Diff line number Diff line change @@ -94,6 +94,16 @@ A list of mirrors is [located here](https://cran.r-project.org/mirrors.html).
9494
9595## Running benchmarks
9696
97+ ### Setting CPU Frequency scaling governor to "performance"
98+
99+ It is recommended to set the CPU frequency to ` performance ` before running
100+ benchmarks. This increases the likelihood of each benchmark achieving peak performance
101+ according to the hardware. Therefore, run:
102+
103+ ``` console
104+ $ ./benchmarks/cpu.sh fast
105+ ```
106+
97107### Running individual benchmarks
98108
99109This can be useful for debugging a benchmark or doing a quick performance
You can’t perform that action at this time.
0 commit comments