Skip to content

Reduce multi-Raft control queue latency with a sixteen-frame window - #107

Merged
forhappy merged 2 commits into
mainfrom
codex/raft-control-window
Oct 24, 2026
Merged

forhappy merged 2 commits into
mainfrom
codex/raft-control-window

Conversation

@forhappy

Copy link
Copy Markdown
Contributor

Heartbeat bursts share the per-peer control queue with acknowledgements. Increase the outstanding control window from eight to sixteen frames so more independent groups can progress before replies arrive. Preserve FIFO authentication, individual reply refill, physical-write completion, deadlines, byte/item reservations, revocation and quorum acknowledgement. Update the real TLS tests to enforce the larger bound and exact failure/shutdown accounting.

Measured against main 5f92e2c7 on three pinned 1-vCPU / 3-GiB Cellar nodes, with 500 leaders and 1,000 followers per node, 1,500 three-voter groups and RustFS. Each cohort uses fresh data, a cold Colima VM and two 180-second windows with eight closed-loop counter writers; timed mutations never retry.

Order Build TPS, windows 1 / 2 p99 ms, windows 1 / 2
Control first Main 261.58 / 224.14 76.57 / 98.92
Control first Window 16 274.15 / 235.46 65.18 / 79.99
Candidate first Window 16 267.21 / 237.76 73.38 / 77.48
Candidate first Main 270.37 / 214.22 82.86 / 160.83

Observed pooled throughput rises 4.56% (242.58 → 253.65 TPS). The worst window p99 falls 160.83 → 79.99 ms; this is not a pooled percentile. Candidate p99 and mean control-queue delay improve in every matching window. One matching window has 1.17% lower candidate TPS. Shared-host compiler activity and roughly 15 GiB host swap mean the exact gain is not an isolated causal estimate.

All eight windows have zero errors. Every cohort verifies 4,500 exact replica values and 1,500 archive positions, then shuts down cleanly without OOM. Native validation passes 39 transport, 29 host and nine multi-group tests, including crash recovery. Formatting, layout, native-dependency and documentation checks pass, as does strict Clippy for all Cellar targets/features. Full workspace/release qualification is left to CI.

This qualifies the eight-writer workload, not maximum sustainable TPS. Earlier twenty-writer baseline runs still hit archive-admission refusals. Measurement notes and remaining priorities retain those limits and prioritize archive publication, SQLite phase profiling, batch flush reasons and idle-group scheduling.

The rejected manifest-reuse experiment and diagnostic probes are excluded. Raw results remain local; no files under plans/multi-raft/evidence/ are included. This follows the already-merged PR #98.

@forhappy
forhappy merged commit 32bb9c9 into main Oct 24, 2026
15 of 19 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