Benchmark Snapshot — 2026-06-13 (Mac dev box)

Machine: Apple M3 Max (Mac15,8), 16 cores, 64 GB · macOS 26.5.1 · NVMe (F_BARRIERFSYNC) Branch / commit: v1/phase-3-performance @ f13748d (post-Phase-4: weir-ctl, weir-sink-sdk, full DST harness) Server config: shard_count=4, batch_size=64 (the load suite's bench_preset) Method: tests/load.rs, release build, 3 serial trials per deadline (--test-threads=1, averaged), at batch_deadline 1 ms and 2 ms. Rendered with deploy/avg_benchmarks.py.

A point-in-time, single-machine snapshot for tracking regressions over time. Compare like-for-like: this is the Mac dev box (fast F_BARRIERFSYNC). The CI baseline (latest.md) is a Linux GitHub runner; phase3-results.md has the slow-storage reference (beast, SATA SSD, fdatasync ~1.4 ms). New snapshots: docs/benchmarks/snapshot-YYYY-MM-DD-<machine>.md.

TL;DR

  • The durable path is fsync-bound (the Phase 3 finding still holds). A single Sync record is ~133 µs p50 on this NVMe — almost all of it F_BARRIERFSYNC. That figure is not comparable to a Linux one: F_BARRIERFSYNC orders writes without forcing the drive's volatile cache to the medium, so this box is buying a weaker guarantee rather than performing the same operation faster, and macOS is not power-loss safe at any tier. See Platform support. Batched is statistically identical (shared group-fsync code path). Buffered (memory-only ack) is the fast path at ~26 µs p50.
  • Group-fsync amortization scales the Sync tier under load: single-thread Sync is ~6.1 k RPS, but the Sync saturation ramp reaches ~80 k RPS @ 64 threads as concurrent records coalesce under one fsync.
  • Buffered peaks at ~123 k RPS @ 48 threads (the connection cap), holding flat through saturation.
  • IOPS compression 249:1 — 4,980 records committed in 20 sink commits (the WAB's batch-to-sink amortization).
  • No perf regression from the Phase 4 / DST work. These numbers match or slightly beat the Phase 3 Mac baseline, so the injectable seams (Arc<dyn> SegmentStore, generic BlockingClock) and the 4.1b flush_batch ack restructure cost nothing measurable on the hot path. (The production binary contains zero sim code.)

Throughput — deadline comparison

ScenarioRPS (1ms)±σ (1ms)RPS (2ms)±σ (2ms)d1ms/d2ms
single_thread_buffered36,899±58336,201±2491.02×
single_thread_sync6,133±1106,281±1670.98×
thundering_herd_8_threads9,285±26612,258±1,9240.76×
thundering_herd_32_threads50,169±1,66351,119±1,2280.98×
thundering_herd_64_threads87,178±3,81991,605±4,1510.95×
connection_churn9,461±8306,980±9361.36×
fire_and_forget_overload3,894±1043,838±1361.01×

Latency — single thread, batch_deadline_ms=1

MetricSyncBatchedBuffered
Min110 µs116 µs18 µs
Mean180 µs199 µs26 µs
σ217 µs225 µs5 µs
p50133 µs147 µs26 µs
p75148 µs173 µs27 µs
p95421 µs362 µs32 µs
p991.6 ms1.7 ms41 µs
p99.92.4 ms2.1 ms115 µs
Max3.1 ms3.5 ms167 µs

Latency — single thread, batch_deadline_ms=2

MetricSyncBatchedBuffered
Min111 µs114 µs18 µs
Mean188 µs207 µs26 µs
σ210 µs223 µs6 µs
p50137 µs148 µs26 µs
p75155 µs176 µs27 µs
p95462 µs456 µs34 µs
p991.3 ms1.6 ms47 µs
p99.92.2 ms2.3 ms148 µs
Max3.0 ms2.9 ms194 µs

Saturation Ramp — Buffered tier

Server started with max_connections = 48. Levels above 48 trigger connection-cap exhaustion; the server must survive every level.

ThreadsRPS (d1ms)RPS (d2ms)I/O dropsStatus
827,33027,0310ok
1651,39851,0500ok
3293,37193,2850ok
48122,301121,1550ok
64122,233121,25816SATURATED ←
96122,631121,13548SATURATED

Saturation Ramp — Sync tier

Uses Sync durability to stress the group-fsync path under escalating concurrency.

ThreadsRPS (d1ms)RPS (d2ms)I/O dropsStatus
84,7544,8790ok
1624,24825,6870ok
3252,20251,1800ok
4877,22974,4310ok
6479,92976,31016SATURATED ←
9679,09476,78148SATURATED

IOPS compression

MetricValue
Records committed4,980
Sink commits20
Records per commit249:1
Record size256 B · segment cap 64 KiB

How this compares

Mac M3 Max (here)CI Linux runner (latest.md)beast SATA SSD (phase3-results.md)
Durability syscallF_BARRIERFSYNC(GitHub runner)fdatasync
Sync p50133 µs127 µs1,394 µs
Buffered p5026 µs33 µs18 µs
Single-thread Buffered RPS36,89929,34140,712
Sync ramp peak~80 k @ 64t68.8 k @ 64t7.7 k @ 64t
Buffered ramp peak~123 k @ 48t101 k @ 48t157 k @ 48t

The Mac's fast F_BARRIERFSYNC makes its Sync latency ~10× lower than beast's honest SATA fdatasync — beast remains the realistic "slow storage" durability reference. Within the Mac series, this is the number to beat for future runs.

Reproduce

# 3 serial trials per deadline, averaged (matches this snapshot):
SNAP=/tmp/weir_snapshot.jsonl; : > "$SNAP"
for d in 1 2; do for i in 1 2 3; do
  WEIR_BENCH_DEADLINE=$d cargo test --release -p weir-server --test load -- \
    --nocapture --test-threads=1 2>/dev/null | grep -oE 'BENCH: \{[^}]*\}' >> "$SNAP"
done; done
python3 deploy/avg_benchmarks.py "$SNAP" /tmp/rendered.md && cat /tmp/rendered.md

Note: use grep -oE 'BENCH: \{[^}]*\}' (not grep '^BENCH:') with --test-threads=1 — serial --nocapture inlines single-line BENCH output after the test <name> ... prefix, so an anchored grep silently drops every non-ramp scenario.