Skip to content

bench: MtCompressBenchmark - NB_WORKERS scaling on multi-job payloads#84

Merged
dfa1 merged 1 commit into
mainfrom
mt-compress-benchmark
Jul 18, 2026
Merged

bench: MtCompressBenchmark - NB_WORKERS scaling on multi-job payloads#84
dfa1 merged 1 commit into
mainfrom
mt-compress-benchmark

Conversation

@dfa1

@dfa1 dfa1 commented Jul 18, 2026

Copy link
Copy Markdown
Owner

Follow-up to #83; produces the numbers #80 asked for.

Separate suite rather than an nbWorkers axis on CompressBenchmark: two of its four sizes sit below zstd's 512 KiB MT engagement minimum where MT is a guaranteed no-op, and adding an axis would break the longitudinal comparability of the single-threaded numbers (ADR 0012).

Matrix: 1 MiB / 64 MiB × nbWorkers 0/2/4 at level 3, zero-copy segment path, context configured once in @Setup.

Results (osx-aarch64, M-series, JMH 5×5s after 3×10s warmup)

size nbWorkers ops/ms throughput vs single-threaded
1 MiB 0 0.817 ± 0.032 817 MiB/s baseline
1 MiB 2 0.579 ± 0.286 579 MiB/s 0.71x
1 MiB 4 0.694 ± 0.026 694 MiB/s 0.85x
64 MiB 0 0.013 ± 0.001 832 MiB/s baseline
64 MiB 2 0.017 ± 0.001 1088 MiB/s 1.31x
64 MiB 4 0.029 ± 0.001 1856 MiB/s 2.23x

Reads exactly as designed: at level 3 the default job size is ~8 MiB, so a 1 MiB input is a single job — enabling workers there buys no parallelism but pays the MT dispatch/buffering overhead (15–30% slower, and the workers=2 leg is visibly noisy). At 64 MiB the input spans multiple jobs and workers scale for real. NB_WORKERS is a large-payload feature; the javadoc and ADR 0015 already say so, and these legs pin it with numbers.

🤖 Generated with Claude Code

Separate suite rather than an nbWorkers axis on CompressBenchmark: two
of its four sizes sit below zstd's 512 KiB MT engagement minimum where
MT is a guaranteed no-op, and adding an axis would break the
longitudinal comparability of the single-threaded numbers (ADR 0012).

Matrix: 1 MiB / 64 MiB x nbWorkers 0/2/4 at level 3, zero-copy segment
path. The 1 MiB legs pin MT overhead on a single-job input (at level 3
the default job size is ~8 MiB, so no speedup is expected by design);
the 64 MiB legs span multiple jobs and show the actual scaling.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@dfa1
dfa1 merged commit 25aba11 into main Jul 18, 2026
1 check passed
@dfa1
dfa1 deleted the mt-compress-benchmark branch July 18, 2026 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant