Skip to content

Instantly share code, notes, and snippets.

@yongkangc
Last active January 14, 2026 11:03
Show Gist options
  • Select an option

  • Save yongkangc/4b0db5e7c47b90cc079a83e71d5db789 to your computer and use it in GitHub Desktop.

Select an option

Save yongkangc/4b0db5e7c47b90cc079a83e71d5db789 to your computer and use it in GitHub Desktop.
RocksDB vs MDBX reth-bench comparison (Hoodi testnet, 1000 blocks)

RocksDB vs MDBX Benchmark Status

Previous Results (INVALID)

The initial benchmarks compared two MDBX datadirs (not RocksDB vs MDBX):

  • The "RocksDB" datadir was synced before storage settings were enabled
  • Both used MDBX for all data

Current Status

After enabling RocksDB storage settings on the hoodi-bench-rocks datadir:

  • New writes go to RocksDB (verified: folder grew from 1.7MB → 38MB)
  • But historical data remains in MDBX (67GB)
  • This creates a hybrid state that's not representative

Verification

# Check storage settings
./target/release/reth db --datadir ~/.local/share/reth/hoodi-bench-rocks settings --chain hoodi get

# Shows:
# storages_history_in_rocksdb: true
# transaction_hash_numbers_in_rocksdb: true  
# account_history_in_rocksdb: true

Valid Benchmark Requirements

For a proper RocksDB vs MDBX comparison:

  1. Option A: Fresh Sync

    • Build with --features edge
    • Start new datadir from scratch
    • Sync full chain with RocksDB enabled from genesis
  2. Option B: Data Migration

    • Migrate existing MDBX tables to RocksDB
    • (If migration tooling exists)

Re-execute Benchmark (Alternative)

The earlier re-execute benchmark may be more representative:

  • RocksDB: 4.11 Ggas/s
  • MDBX: 3.35 Ggas/s
  • This tests CPU-bound execution, less affected by storage backend mix

Next Steps

  • Sync fresh datadir with edge feature enabled
  • Or implement/find data migration tool
  • Re-run reth-bench with proper RocksDB-only datadir

RocksDB vs MDBX Benchmark Comparison

reth-bench new-payload-fcu Results (1000 blocks)

Backend Throughput (Ggas/s) Duration (s) Total Gas
RocksDB 0.8904 33.0 29.39 Ggas
MDBX 0.8224 35.7 29.39 Ggas

Winner: RocksDB (+8.3% faster)

Analysis

  • RocksDB processed 1000 blocks in 33.0 seconds
  • MDBX processed 1000 blocks in 35.7 seconds
  • RocksDB was ~2.7 seconds faster overall
  • Both processed approximately the same total gas

Re-execute Benchmark Results (from earlier test)

Backend Throughput (Ggas/s)
RocksDB 4.11
MDBX 3.35

RocksDB +23% faster in re-execute test

Test Configuration

Notes

  • The reth-bench test measures real Engine API performance including:
    • Block execution
    • State root computation
    • Database reads/writes
    • Engine API overhead
  • Results may vary based on block gas usage patterns
  • RocksDB consistently outperforms MDBX in both benchmark types

MDBX reth-bench Results (1000 blocks)

Summary

Metric Value
Throughput 0.8224 Ggas/s
Duration 35.7 seconds
Total Gas 29.39 Ggas
Blocks 1000
Block Range 2016570 → 2017569

Command Used

./target/release/reth-bench new-payload-fcu \
    --rpc-url https://rpc.hoodi.ethpandaops.io \
    --engine-rpc-url http://127.0.0.1:8551 \
    --jwt-secret ~/.local/share/reth/hoodi-bench-mdbx/jwt.hex \
    --advance 1000 \
    -o /home/yk/tempo/full_rocks/benchmark-results/mdbx_granular

Configuration

  • Chain: Hoodi
  • Build: cargo build --release --bin reth (default, no edge feature)
  • Datadir: ~/.local/share/reth/hoodi-bench-mdbx

RocksDB reth-bench Results (1000 blocks)

Summary

Metric Value
Throughput 0.8904 Ggas/s
Duration 33.0 seconds
Total Gas 29.39 Ggas
Blocks 1000
Block Range 2015801 → 2016800

Command Used

./target/release/reth-bench new-payload-fcu \
    --rpc-url https://rpc.hoodi.ethpandaops.io \
    --engine-rpc-url http://127.0.0.1:8551 \
    --jwt-secret ~/.local/share/reth/hoodi-bench-rocks/jwt.hex \
    --advance 1000 \
    -o /home/yk/tempo/full_rocks/benchmark-results/rocks_granular

Configuration

  • Chain: Hoodi
  • Build: cargo build --release --bin reth --features edge
  • Datadir: ~/.local/share/reth/hoodi-bench-rocks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment