Skip to content

Commit ce80955

Browse files
authored
[doc] Added nice to reducing_variance (#1994)
* docs:added nice to reducing_variance * Added self as contributor
1 parent 176ad6c commit ce80955

3 files changed

Lines changed: 12 additions & 5 deletions

File tree

AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ Norman Heino <norman.heino@gmail.com>
5656
Oleksandr Sochka <sasha.sochka@gmail.com>
5757
Ori Livneh <ori.livneh@gmail.com>
5858
Paul Redmond <paul.redmond@gmail.com>
59+
Prithvi Rao <ee22b024@smail.iitm.ac.in>
5960
Radoslav Yovchev <radoslav.tm@gmail.com>
6061
Raghu Raja <raghu@enfabrica.net>
6162
Rainer Orth <ro@cebitec.uni-bielefeld.de>

CONTRIBUTORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ Ori Livneh <ori.livneh@gmail.com>
8080
Pascal Leroy <phl@google.com>
8181
Paul Redmond <paul.redmond@gmail.com>
8282
Pierre Phaneuf <pphaneuf@google.com>
83+
Prithvi Rao <ee22b024@smail.iitm.ac.in>
8384
Radoslav Yovchev <radoslav.tm@gmail.com>
8485
Raghu Raja <raghu@enfabrica.net>
8586
Rainer Orth <ro@cebitec.uni-bielefeld.de>

docs/reducing_variance.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -105,23 +105,28 @@ Linux workstation are:
105105

106106
1. Use the performance governor as [discussed
107107
above](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

Comments
 (0)