perf(server-ng): reach single-node latency parity with legacy server#3746
Open
hubcio wants to merge 3 commits into
Open
perf(server-ng): reach single-node latency parity with legacy server#3746hubcio wants to merge 3 commits into
hubcio wants to merge 3 commits into
Conversation
server-ng trailed the legacy server on single-node benchmarks: the default cpu allocation collapsed all work onto one shard, produce hashed each batch three times (convert, stamp, flush revalidation), and a lone consumer crossing a sealed segment degraded to full-segment scans through unbounded read handles. Shard allocation now defaults to numa:auto. Produce computes the batch checksum once and marks locally originated batches trusted; replicated blobs keep a per-message receive gate on followers, so transit integrity still holds end to end. Sealed segment read handles are capped by a per-partition LRU. Consumer groups on the ng metadata plane gain legacy-parity error semantics: join/leave against a missing stream, topic or group fail loudly (1009/2010/5000), leaving as an absent member returns 5006 instead of silent success, and the wire codes are pinned by an integration test across TCP, QUIC and WebSocket. The HTTP listener now binds from the cluster roster port, so one-host clusters run from byte-identical per-node configs.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #3746 +/- ##
=============================================
- Coverage 74.53% 61.31% -13.23%
Complexity 969 969
=============================================
Files 1306 1305 -1
Lines 150028 139603 -10425
Branches 125462 115111 -10351
=============================================
- Hits 111829 85594 -26235
- Misses 34700 50366 +15666
- Partials 3499 3643 +144
🚀 New features to boost your workflow:
|
The per-message checksum was computed by streaming three hasher writes over disjoint slices before the parts were copied into the output buffer. Reorder each encode site to write first, then hash the contiguous output span and stamp the checksum field, and let the follower receive gate hash the received blob span directly. The digest formula is unchanged: XxHash3-64 over the 40-byte header tail plus payload and user headers, now pinned by a streaming-vs-oneshot reference test instead of an implicit helper. Measured CPU-neutral on the produce hot path (both modes hit the same vectorized kernel at ~1KB messages), so this is a readability and test-coverage change, not a perf one.
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.
server-ng trailed the legacy server on single-node benchmarks:
the default cpu allocation collapsed all work onto one shard,
produce hashed each batch three times (convert, stamp, flush
revalidation), and a lone consumer crossing a sealed segment
degraded to full-segment scans through unbounded read handles.
Shard allocation now defaults to numa:auto. Produce computes
the batch checksum once and marks locally originated batches
trusted; replicated blobs keep a per-message receive gate on
followers, so transit integrity still holds end to end. Sealed
segment read handles are capped by a per-partition LRU.
Consumer groups on the ng metadata plane gain legacy-parity
error semantics: join/leave against a missing stream, topic or
group fail loudly (1009/2010/5000), leaving as an absent member
returns 5006 instead of silent success, and the wire codes are
pinned by an integration test across TCP, QUIC and WebSocket.
The HTTP listener now binds from the cluster roster port, so
one-host clusters run from byte-identical per-node configs.