perf: dispatch pipelined commands concurrently - #48
Merged
Conversation
instead of processing pipelined commands serially (awaiting each one before starting the next), dispatch all commands to shards at once and await them together using join_all. for a pipeline of 16 commands, the old code did 16 sequential channel round-trips. the new code dispatches all 16 concurrently, allowing shards to process them in parallel. this should significantly improve pipelined throughput by utilizing all shards simultaneously rather than one at a time.
kacy
added a commit
that referenced
this pull request
Feb 11, 2026
perf: dispatch pipelined commands concurrently
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.
summary
changes pipelined command processing from serial to concurrent dispatch. instead of awaiting each command before starting the next, all commands are dispatched to shards simultaneously using
join_all.rationale
for a pipeline of 16 commands, the old code did 16 sequential channel round-trips:
the new code dispatches all 16 concurrently:
this allows shards to process commands in parallel rather than one at a time.
benchmarks (GCP c2-standard-8)
the improvement is modest because the channel overhead (mpsc send + oneshot reply) is still present for every command. multi-core scaling remains broken.
test plan
next steps
to achieve true multi-core scaling, ember needs architectural changes:
the channel-per-request model is the fundamental bottleneck.