Some tips for benchmarking

Michael Kruse via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 26 11:07:11 PDT 2016


2016-10-20 4:39 GMT+02:00 Rafael EspĂ­ndola via llvm-commits
<llvm-commits at lists.llvm.org>:
> After much pain I decided that instead of just running tests many
> times I should put some effort in figuring out why perf numbers were
> so hard to reproduce on my machine.
>
> I was already disabling address space randomization and setting the
> scaling_governor to performance. Other things I found
>
> * Use https://github.com/lpechacek/cpuset to reserve a cpu for just
> the program you are benchmarking.
> * Disable the SMP pair (echo 0 > /sys/devices/system/cpu/cpuX/online)
> of the cpu you will use for the benchmark.
> * disable turbo mode (echo 1 > /sys/devices/system/cpu/intel_pstate/no_turbo).
>
> The results are pretty awesome:
>
> 3.012355647 seconds time elapsed         ( +-  0.01% )

Cool. Would it be possible to teach lnt runtests to do that by itself?

Michael


More information about the llvm-commits mailing list