Skip to content

Document RocksDB WAL and multi-SSD configuration strategies - #248

Merged
makr-code merged 5 commits into
developfrom
copilot/check-wal-distribution-ssd
Jan 6, 2026
Merged

makr-code merged 5 commits into
developfrom
copilot/check-wal-distribution-ssd

Conversation

Copilot AI commented Jan 5, 2026 •

Copy link
Copy Markdown
Contributor

RocksDB WAL cannot be distributed across multiple directories (sequential single-writer design). However, SSTables can be distributed via db_paths, yielding 3-4x throughput vs single SSD. RAID provides minimal benefit (<10%) for WAL and underperforms native db_paths by ~30% for SSTables.

Documentation

German + English guides (docs/{de,en}/performance/WAL_MULTI_SSD_CONFIGURATION.md):

  • WAL architecture and limitations
  • Multi-SSD configuration via db_paths
  • RAID analysis (0/1/5/6/10) with benchmarks
  • 4 deployment scenarios (1/2/4+/6 SSDs)
  • 12+ FAQ entries

Implementation summary (docs/WAL_MULTI_SSD_IMPLEMENTATION_SUMMARY.md):

  • Research findings and recommendations
  • Performance comparisons

Configuration Examples

High-performance 6-SSD setup (config/config_multi_ssd.yaml):

storage:
  rocksdb_path: "/mnt/nvme0/themisdb"
  wal_dir: "/mnt/nvme_wal/themisdb_wal"  # Dedicated fastest SSD
  db_paths:
    - {path: "/mnt/nvme0/themisdb", target_size_bytes: 1TB}
    - {path: "/mnt/nvme1/themisdb", target_size_bytes: 1TB}
    - {path: "/mnt/nvme2/themisdb", target_size_bytes: 1TB}
    - {path: "/mnt/nvme3/themisdb", target_size_bytes: 1TB}
    - {path: "/mnt/nvme4/themisdb", target_size_bytes: 1TB}
  max_background_jobs: 20
  max_subcompactions: 4
  enable_high_parallel_tuning: true

Simple 2-SSD setup (config/config_2ssd_performance.yaml):

  • WAL isolation for latency-sensitive workloads
  • ~25% throughput improvement over single SSD

Code Example

examples/example_multi_ssd_configuration.cpp demonstrates:

  • Single SSD baseline
  • 2-SSD WAL separation
  • 6-SSD maximum throughput
  • Why RAID underperforms db_paths

Performance Impact

Configuration Write Read vs Single SSD
Single SSD 120 MB/s 800 MB/s 1x
RAID 0 (4 SSDs) 180 MB/s 850 MB/s 1.5x
db_paths (4 SSDs) 450 MB/s 2,800 MB/s 3.75x

Key Recommendations

  • Use separate wal_dir on lowest-latency SSD (not distributed)
  • Distribute SSTables via db_paths (2-6 SSDs optimal)
  • Avoid RAID - native multi-path outperforms by 30-150%
  • Enable enable_high_parallel_tuning with 4+ SSDs

No code changes required - ThemisDB already supports these features via RocksDBWrapper::Config.

Original prompt

Prüfe ob WAL in der Rocksdb auf mehrere SSD verteilt werden kann um den durchsatz zu erhöhen und ob die themis entsprechend konfiguriert werden kann.

Erstellt aus VS Code.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Investigate WAL distribution in RocksDB for throughput Document RocksDB WAL and multi-SSD configuration strategies Jan 5, 2026
Copilot AI requested a review from makr-code January 5, 2026 20:56
@makr-code
makr-code marked this pull request as ready for review January 6, 2026 05:33
@makr-code
makr-code merged commit bfd4cb4 into develop Jan 6, 2026
@makr-code makr-code added this to the v1.0.2 milestone Mar 11, 2026
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.

2 participants