| 1 |
# Microbenchmarks |
| 2 |
|
| 3 |
## Compiling |
| 4 |
|
| 5 |
-DENABLE_BENCHMARKS |
| 6 |
|
| 7 |
## Running |
| 8 |
|
| 9 |
Suppress CPU frequency scaling |
| 10 |
|
| 11 |
# https://www.kernel.org/doc/html/latest/admin-guide/pm/intel_pstate.html |
| 12 |
echo 1 > /sys/devices/system/cpu/intel_pstate/no_turbo |
| 13 |
|
| 14 |
Maybe reserve specific cores for the benchmark and and possibly also switch off Multi Threading (on Intel). |
| 15 |
This makes the results less noisy. |
| 16 |
|
| 17 |
# https://llvm.org/docs/Benchmarking.html |
| 18 |
|
| 19 |
Let Google Benchmark compute average, median, stddev of time from multiple executions |
| 20 |
|
| 21 |
--benchmark_repetitions=9 |
| 22 |
|
| 23 |
## Profiling |
| 24 |
|
| 25 |
sudo sh -c 'echo 1 > /proc/sys/kernel/perf_event_paranoid' |
| 26 |
sudo sh -c 'echo 0 > /proc/sys/kernel/kptr_restrict' |