Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #4224 +/- ##
=============================================
- Coverage 87.50% 73.83% -13.67%
- Complexity 1575 1576 +1
=============================================
Files 1280 1278 -2
Lines 223241 203774 -19467
Branches 186604 167137 -19467
=============================================
- Hits 195337 150448 -44889
- Misses 23193 48668 +25475
+ Partials 4711 4658 -53
🚀 New features to boost your workflow:
|
hubcio
force-pushed
the
feat/msg-bus-bufreadwrite
branch
from
September 18, 2026 12:07
777cb9d to
1a555e5
Compare
The link shard that owns a peer's replica socket burns a full core under sustained replicated writes. Nothing batches its reads: read_message issues one io_uring read for the 256-byte header and a second for the body. Bytes already sitting in the kernel receive queue wait for the next call. A read-ahead buffer sized by message_bus.replica_read_buffer_size lets one socket read serve a whole burst. It adds no latency, because the reader never waits for the buffer to fill. One fill delivers at most one buffer, so a body above that size crosses the buffer in buffer-sized pieces and pays one extra pass over the payload and one read per piece. A read that large goes straight into the frame's own buffer instead. Zero keeps the unbuffered path, so the A/B baseline is a config change and not a separate build. The plaintext writer already coalesces into one writev, so it is left alone. replica_socket_reads_total and replica_inbound_frames_total carry the evidence on the real workload: their ratio is the batching factor, and only link shards bump them. A read counts once it completes, so a link torn down mid-read cannot inflate the ratio.
hubcio
force-pushed
the
feat/msg-bus-bufreadwrite
branch
from
September 18, 2026 12:32
1a555e5 to
f980b26
Compare
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.
The link shard that owns a peer's replica socket burns a full
core under sustained replicated writes. Nothing batches its reads:
read_message issues one io_uring read for the 256-byte header and
a second for the body. Bytes already sitting in the kernel receive
queue wait for the next call.
A read-ahead buffer sized by message_bus.replica_read_buffer_size
lets one socket read serve a whole burst. It adds no latency, because
the reader never waits for the buffer to fill. One fill delivers
at most one buffer, so a body above that size crosses the buffer in
buffer-sized pieces and pays one extra pass over the payload and one
read per piece. A read that large goes straight into the frame's own
buffer instead.
Zero keeps the unbuffered path, so the A/B baseline is a config change
and not a separate build. The plaintext writer already coalesces into
one writev, so it is left alone.
replica_socket_reads_total and replica_inbound_frames_total carry the
evidence on the real workload: their ratio is the batching factor,
and only link shards bump them. A read counts once it completes,
so a link torn down mid-read cannot inflate the ratio.