tests: benchmark: improve benchmark scalability accuracy
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 31 Mar 2021 14:27:32 +0000 (10:27 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 31 Mar 2021 14:34:03 +0000 (10:34 -0400)
commitdf62bd71d6d569c01aa47e9cb2a6fba8a256b255
treebbcce8a234478edbc132a387cacbf3c44908faf0
parente2a245bb4294a9c9d477600fcb046d61a3ed39e5
tests: benchmark: improve benchmark scalability accuracy

Testing with a fixed number of loops per-thread only works if the
workload is distributed perfectly across CPUs. For instance, if a lock
is held in the workload (e.g. internally by open() and close()), those
may cause starvation of some threads, and therefore cause the benchmark
to be wrong because it will wait for the slowest thread to complete its
loops.

It is also not good for testing overcommit of threads vs cpus.

Change the test to report the number of loops performed in a given wall
time, and use this to report the average and std.dev. of tracing
overhead per event on each active CPU.

Change the benchmark workload to be only CPU-bound and not generate
system calls to minimize the inherent non-scalability of the workload
(e.g. locks held within the kernel).

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I5245f36831875bd9f87854618a4ed0cb31e56a4d
tests/benchmark/README
tests/benchmark/bench.c
tests/benchmark/ptime
tests/benchmark/test_benchmark
This page took 0.026427 seconds and 5 git commands to generate.