@@ -105,23 +105,28 @@ Linux workstation are:
105105
1061061 . Use the performance governor as [ discussed
107107above] ( user_guide#disabling-cpu-frequency-scaling ) .
108- 1 . Disable processor boosting by:
108+ 2 . Disable processor boosting by:
109109 ``` sh
110110 echo 0 | sudo tee /sys/devices/system/cpu/cpufreq/boost
111111 ```
112112 See the Linux kernel's
113113 [ boost.txt] ( https://www.kernel.org/doc/Documentation/cpu-freq/boost.txt )
114114 for more information.
115- 2 . Set the benchmark program's task affinity to a fixed cpu. For example:
115+ 3 . Set the benchmark program's task affinity to a fixed cpu. For example:
116116 ``` sh
117117 taskset -c 0 ./mybenchmark
118118 ```
119- 3 . Disabling Hyperthreading/SMT. This can be done in the Bios or using the
119+ 4 . Increase the program's scheduling priority to minimize context switches using ` nice ` or ` chrt ` :
120+ ``` sh
121+ sudo nice -n -20 ./mybenchmark
122+ sudo chrt -f 80 ./mybenchmark
123+ ```
124+ 5 . Disabling Hyperthreading/SMT. This can be done in the Bios or using the
120125 ` /sys ` file system (see the LLVM project's [ Benchmarking
121126 tips] ( https://llvm.org/docs/Benchmarking.html ) ).
122- 4 . Close other programs that do non-trivial things based on timers, such as
127+ 6 . Close other programs that do non-trivial things based on timers, such as
123128 your web browser, desktop environment, etc.
124- 5 . Reduce the working set of your benchmark to fit within the L1 cache, but
129+ 7 . Reduce the working set of your benchmark to fit within the L1 cache, but
125130 do be aware that this may lead you to optimize for an unrealistic
126131 situation.
127132
0 commit comments