Live Replay Benchmark — 2026-03-13

Machine: macOS Darwin 25.2.0, Apple Silicon (M2 Max, 32 GB) Branch: feature/pluggable-storage-architecture Network: Preview testnet (Mithril snapshot, ~4.1M blocks) Duration: 10 minutes per profile during bulk replay

Setup

  • Fresh Mithril import into separate directories for each profile
  • Node replays all blocks from genesis (no ledger snapshot)
  • Metrics collected every 15 seconds via ps (RSS, CPU) and log parsing

Results

High-Memory Profile (Mmap block index, default)

MetricValue
Memory (min)990 MB
Memory (avg)998 MB
Memory (max)1,008 MB
CPU~99% (CPU-bound)
Replay speed (initial)~18,400 blk/s (Byron)
Replay speed (steady)~300-400 blk/s (post-Shelley)
Blocks replayed (10 min)~7,300 (from 184K to 192K)
UTxO count at end~385K

In-Memory Block Index (--immutable-index-type in-memory)

MetricValue
Memory (min)1,135 MB
Memory (avg)1,146 MB
Memory (max)1,252 MB
CPU~99% (CPU-bound)
Replay speed (initial)~12,600 blk/s (Byron)
Replay speed (steady)~300-400 blk/s (post-Shelley)
Blocks replayed (10 min)~7,300 (from 184K to 192K)
UTxO count at end~384K

Comparison

MetricMmapIn-MemoryDifference
Memory (avg)998 MB1,146 MBMmap saves 148 MB (13%)
Memory (peak)1,008 MB1,252 MBMmap saves 244 MB (19%)
Initial replay speed18,400 blk/s12,600 blk/sMmap 46% faster
Steady-state replay~300-400 blk/s~300-400 blk/sSimilar (CPU-bound on ledger)

Key Observations

  1. Mmap saves ~150 MB RAM during replay — significant for constrained environments. The in-memory HashMap must hold all block hash → location mappings in process memory, while mmap lets the OS manage page-in/page-out.

  2. Mmap initial replay is 46% faster for Byron-era blocks (where block processing is trivial and storage lookups dominate). This confirms the Criterion micro-benchmark findings.

  3. Steady-state replay speed is similar — once blocks contain complex Shelley/Alonzo transactions, the bottleneck shifts to ledger processing (UTxO lookups, script evaluation), not block index lookups. Both profiles converge to ~300-400 blk/s.

  4. Replay speed decreases as UTxO set grows — from ~18K blk/s (empty UTxO set, Byron) to ~300 blk/s (380K UTxOs, Shelley). This is expected: each transaction requires multiple LSM tree lookups and writes.

  5. Both profiles are CPU-bound at 100% — storage I/O is not the bottleneck during replay. The LSM tree and ledger processing consume all CPU.

Conclusion

The mmap default is validated by live testing. It provides:

  • Lower memory usage (important for Raspberry Pi / 4GB deployments)
  • Faster initial replay (faster Byron-era block processing)
  • No regression in steady-state replay speed

No changes to default parameters are warranted based on these results.