Repository navigation
perf: batch request handoff with recv_many - #100
Merged
Merged
Conversation
Contributor
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
j03-dev
force-pushed
the
perf/t2-batch-handoff
branch
2 times, most recently
from
October 31, 2026 04:34
3197ba8 to
e00e8e8
Compare
j03-dev
force-pushed
the
perf/t1-release-allocator
branch
from
October 31, 2026 05:05
6a81a6e to
08df142
Compare
j03-dev
force-pushed
the
perf/t2-batch-handoff
branch
from
October 31, 2026 05:06
e00e8e8 to
b3e2330
Compare
j03-dev
force-pushed
the
perf/t2-batch-handoff
branch
from
October 31, 2026 05:06
b3e2330 to
1a1a7dd
Compare
j03-dev
added a commit
that referenced
this pull request
Nov 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
T2: batch request handoff
Stacked on #99 (
perf/t1-release-allocator). Base this PR onperf/t1-release-allocator, notmain, until #99 lands.Change
process_requestsnow drains the request channel in batches withrecv_many(&mut batch, 64)and processes the drained batch on the existing single consumer. Ownership, ordering, back-pressure, andchannel_capacityare unchanged.Step B (spawning the batch instead of processing it sequentially) was not pursued: Step A shows a small positive result, and keeping the single consumer avoids changing request ordering/concurrency semantics in this ticket.
Before/after (T1 -> T2)
Same app/build as #99, swapped
.sovariants in place, 10 interleaved rounds x 10s, server0-3,wrk4-7,-t4 -c64.Context switches/request (the available user-space futex proxy; kernel futex symbols are unavailable with
perf_event_paranoid=2and no sudo) drop by 2.4%. CPU/request drops by 1.1%.Host load is noisy and cyclical; the paired medians are the more reliable comparison. Absolute req/s is only valid within the interleaved run.
Validation
cargo fmt --check: passcargo check: passpytest -q tests: 38 passedCI note
Linux wheels are now built on
manylinux_2_28(glibc >= 2.28) somimalloc 0.1.52builds on the cross targets; the older manylinux2014 cross toolchains lackstdatomic.hand reject-Wdate-time. The deltas above were measured on x86_64 with the same allocator on both sides. On the rebased stack,cargo fmt --check,cargo test --lib --bins, and the fullpytestsuite (39 passed) all pass.