redpanda icon indicating copy to clipboard operation
redpanda copied to clipboard

Coroutine bench updates

Open travisdowns opened this issue 1 year ago • 1 comments

bench: split out coro_rpbench from vint_rpbench

Split vint_bench into vint_bench and coro_bench, with the latter having the generic coroutine/continuation type benches and vint only being left with the specific vint stream decoding stuff.

coro_bench: updates with more patterns

Test a few more call patterns such as chaining vs nesting when the first future is non-ready.

Backports Required

  • [x] none - not a bug fix
  • [ ] none - this is a backport
  • [ ] none - issue does not exist in previous branches
  • [ ] none - papercut/not impactful enough to backport
  • [ ] v24.1.x
  • [ ] v23.3.x
  • [ ] v23.2.x

Release Notes

  • none

travisdowns avatar Jun 27 '24 17:06 travisdowns

/dt

travisdowns avatar Jun 29 '24 02:06 travisdowns

/ci-repeat 1

travisdowns avatar Jul 02 '24 02:07 travisdowns

Example output:

$ ninja coro_rpbench && bin/coro_rpbench --blocked-reactor-notify-ms=999999 --smp=1 --memory=1G
[2/2] Linking CXX executable bin/coro_rpbench
WARN  2024-07-02 16:09:04,094 seastar - Could not parse cgroups v1 file (memory/memory.limit_in_bytes).
INFO  2024-07-02 16:09:04,097 seastar - Reactor backend: linux-aio
single run iterations:    0
single run duration:      1.000s
number of runs:           5
number of cores:          1
random seed:              706458677

test                               iterations      median         mad         min         max      allocs       tasks        inst
coro_bench.empty_cont               206890000     4.349ns     0.033ns     4.176ns     4.382ns       0.000       0.000        57.0
coro_bench.ss_now                   230420000     3.646ns     0.024ns     3.621ns     4.142ns       0.000       0.000        48.0
coro_bench.ss_now_collect           122450000     2.416ns     0.016ns     2.394ns     2.458ns       0.000       0.000        30.0
coro_bench.co_await_ready            47580000    20.567ns     0.120ns    20.447ns    22.236ns       1.000       0.000       269.1
coro_bench.co_await_ready_collect    38910000    18.424ns     0.028ns    18.309ns    18.526ns       1.000       0.000       246.3
coro_bench.nested_then5              31990000    30.533ns     0.108ns    30.425ns    31.228ns       0.000       0.000       379.2
coro_bench.chain_then5               15030000    66.448ns     0.109ns    66.223ns    66.760ns       0.000       0.000       595.3
coro_bench.nested_after_yield         9840000   100.646ns     0.187ns   100.045ns   101.517ns       2.000       3.000      1308.5
coro_bench.chained_after_yield        3450000   290.462ns     1.311ns   289.039ns   293.828ns       9.000      10.000      3823.3
coro_bench.coro_after_yield          12950000    76.624ns     0.450ns    76.174ns    77.369ns       2.000       3.000      1068.4
coro_bench.co_await_ready_nested3    19610000    50.952ns     0.059ns    50.889ns    51.056ns       3.000       0.000       727.3
coro_bench.co_await_ready_nested5    11370000    85.422ns     0.783ns    84.247ns    87.054ns       5.000       0.001      1185.5
coro_bench.empty_coro                58560000    17.068ns     0.068ns    17.000ns    17.270ns       1.000       0.000       224.1
coro_bench.never_awaits_collect      47470000    16.271ns     0.041ns    16.230ns    16.401ns       1.000       0.000       201.0

travisdowns avatar Jul 02 '24 20:07 travisdowns

Feedback addressed in comments and https://github.com/redpanda-data/redpanda/commit/2db3849e606d239683f224d196f920ce4e4f73af.

travisdowns avatar Jul 02 '24 20:07 travisdowns