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

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ Norman Heino <[email protected]>
5656
Oleksandr Sochka <[email protected]>
5757
Ori Livneh <[email protected]>
5858
Paul Redmond <[email protected]>
59+
Prithvi Rao <[email protected]>
5960
Radoslav Yovchev <[email protected]>
6061
Raghu Raja <[email protected]>
6162
Rainer Orth <[email protected]>

CONTRIBUTORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ Ori Livneh <[email protected]>
8080
Pascal Leroy <[email protected]>
8181
Paul Redmond <[email protected]>
8282
Pierre Phaneuf <[email protected]>
83+
Prithvi Rao <[email protected]>
8384
Radoslav Yovchev <[email protected]>
8485
Raghu Raja <[email protected]>
8586
Rainer Orth <[email protected]>

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)