Skip to content

docs(ladder): the ring's documented worst case was 10× low - #538

Merged
thevoiceguy merged 1 commit into
mainfrom
docs/ring-memory-in-config
Aug 20, 2026
Merged

docs(ladder): the ring's documented worst case was 10× low#538
thevoiceguy merged 1 commit into
mainfrom
docs/ring-memory-in-config

Conversation

@thevoiceguy

Copy link
Copy Markdown
Owner

DESIGN_SIP_LADDER.md §3.2 published the ring's worst case at defaults as
50 calls × 64 messages × ~1.5 KB ≈ 4.8 MB. That is arithmetic over the
completed-call window alone — it drops the MAX_PENDING (256) and
MAX_LIVE (512) populations the same section introduces thirteen lines
earlier.

The code was never wrong: crates/telemetry/src/sip_ring.rs states the bound
as (MAX_PENDING + MAX_LIVE + cap_calls) × cap_messages entries. So this is
prose 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 to
the knobs someone actually turns, the way the vad row already does it:

  • docs/CONFIG.mdsip_ring_size — ~1.9 MB at a realistic
    200-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.mdsip_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 scales
    linearly with.
  • sip_ring.rs's MAX_LIVE doc comment — the byte figures next to the
    entry-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.py passes; cargo fmt --all --check clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_011FQwSJ3QXEnPQXGazUXvv5

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
@thevoiceguy
thevoiceguy merged commit 1d0f994 into main Aug 20, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant