docs(ladder): the ring's documented worst case was 10× low - #538
Merged
Conversation
DESIGN_SIP_LADDER.md §3.2 published `50 calls × 64 messages × ~1.5 KB ≈ 4.8 MB` as the worst case at defaults. That counts only the completed-call window and drops the MAX_PENDING (256) and MAX_LIVE (512) populations the same section introduces thirteen lines above it. The code has it right — sip_ring.rs states the bound as `(MAX_PENDING + MAX_LIVE + cap_calls) × cap_messages` entries — so this was prose drift, not a behaviour claim: ~55 MB, not 4.8. Also moves the measured figures from RESULTS-0.49.7-ring-ab.md to where someone sizing a node will actually meet them: - CONFIG.md `sip_ring_size` gains ~1.9 MB at a realistic 200-concurrent shape (~2.5% of that node's daemon RSS), ~17 MB with the pending population saturated, and the ~55 MB design bound with what it takes to approach it. - CONFIG.md `sip_ring_max_messages` gains the per-message cost (~1.34 × payload + 285 B) and the fact that it, not sip_ring_size, is the knob the ceiling scales with. - sip_ring.rs's MAX_LIVE doc comment gains the byte figures next to the entry-count bound it already documented. No behaviour change; the bounds themselves are unmoved. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_011FQwSJ3QXEnPQXGazUXvv5
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.
DESIGN_SIP_LADDER.md§3.2 published the ring's worst case at defaults as50 calls × 64 messages × ~1.5 KB ≈ 4.8 MB. That is arithmetic over thecompleted-call window alone — it drops the
MAX_PENDING(256) andMAX_LIVE(512) populations the same section introduces thirteen linesearlier.
The code was never wrong:
crates/telemetry/src/sip_ring.rsstates the boundas
(MAX_PENDING + MAX_LIVE + cap_calls) × cap_messagesentries. So this isprose drift in the design note, not a behaviour claim — but it is drift an
operator would size a node on, and it is low by an order of magnitude:
~55 MB, not 4.8 MB.
Second half of the change: #537 measured this ring, and those numbers lived
only in
test-harness/load/RESULTS-0.49.7-ring-ab.md. They now sit next tothe knobs someone actually turns, the way the
vadrow already does it:docs/CONFIG.md→sip_ring_size— ~1.9 MB at a realistic200-concurrent shape (~2.5 % of that node's whole daemon RSS), ~17 MB with
the 256-entry pending population saturated at the per-call cap, and the
~55 MB design bound together with what it takes to approach it (512
concurrent calls each having exchanged 64+ messages; real calls carry
4–8).
docs/CONFIG.md→sip_ring_max_messages— the per-message cost(
~1.34 × payload + 285 B, the slope being allocator size-class rounding)and the fact that this, not
sip_ring_size, is the knob the ceiling scaleslinearly with.
sip_ring.rs'sMAX_LIVEdoc comment — the byte figures next to theentry-count bound it already documented correctly.
No behaviour change. No code path moves, no default changes, the bounds
themselves are unmoved — docs and one doc comment only. Nothing here needs a
restart or a release.
scripts/check-doc-links.pypasses;cargo fmt --all --checkclean.🤖 Generated with Claude Code
https://claude.ai/code/session_011FQwSJ3QXEnPQXGazUXvv5