diff options
| author | Gyutae Bae <gyutae.bae@navercorp.com> | 2026-01-20 18:07:16 +0900 |
|---|---|---|
| committer | Andrii Nakryiko <andrii@kernel.org> | 2026-01-20 11:37:25 -0800 |
| commit | 2e6690d4f7fc41c4fae7d0a4c0bf11f1973e5650 (patch) | |
| tree | d9e36379cb68eaddaba237565a89b0480b02383d /tools/testing | |
| parent | f81c07a6e98e3171d0c4c5ab79f5aeff71b42c44 (diff) | |
selftests/bpf: Add perfbuf multi-producer benchmark
Add a multi-producer benchmark for perfbuf to complement the existing
ringbuf multi-producer test. Unlike ringbuf which uses a shared buffer
and experiences contention, perfbuf uses per-CPU buffers so the test
measures scaling behavior rather than contention.
This allows developers to compare perfbuf vs ringbuf performance under
multi-producer workloads when choosing between the two for their systems.
Signed-off-by: Gyutae Bae <gyutae.bae@navercorp.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20260120090716.82927-1-gyutae.opensource@navercorp.com
Diffstat (limited to 'tools/testing')
| -rwxr-xr-x | tools/testing/selftests/bpf/benchs/run_bench_ringbufs.sh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/benchs/run_bench_ringbufs.sh b/tools/testing/selftests/bpf/benchs/run_bench_ringbufs.sh index 83e05e837871..123b7feb6935 100755 --- a/tools/testing/selftests/bpf/benchs/run_bench_ringbufs.sh +++ b/tools/testing/selftests/bpf/benchs/run_bench_ringbufs.sh @@ -49,6 +49,11 @@ for b in 1 2 3 4 8 12 16 20 24 28 32 36 40 44 48 52; do summarize "rb-libbpf nr_prod $b" "$($RUN_RB_BENCH -p$b --rb-batch-cnt 50 rb-libbpf)" done +header "Perfbuf, multi-producer" +for b in 1 2 3 4 8 12 16 20 24 28 32 36 40 44 48 52; do + summarize "pb-libbpf nr_prod $b" "$($RUN_RB_BENCH -p$b --rb-batch-cnt 50 --rb-sample-rate 50 pb-libbpf)" +done + header "Ringbuf, multi-producer contention in overwrite mode, no consumer" for b in 1 2 3 4 8 12 16 20 24 28 32 36 40 44 48 52; do summarize "rb-prod nr_prod $b" "$($RUN_BENCH -p$b --rb-batch-cnt 50 --rb-overwrite --rb-bench-producer rb-libbpf)" |
