A discrete event simulator for RocksDB LSM trees, built with Go backend and React frontend.
One command to rule them all:
./start.sh
# Automatically builds frontend (if needed) and starts backend
# Open browser to http://localhost:8080Manual mode:
# Build frontend once
cd web && npm install && npm run build && cd ..
# Build and run backend
go build -o /tmp/rollingstone cmd/server/main.go
/tmp/rollingstone
# Open browser to http://localhost:8080RollingStone simulates RocksDB's LSM tree behavior to help you:
- Analyze performance of different RocksDB configurations
- Visualize LSM tree structure, compactions, and I/O patterns in real-time
- Optimize for specific workloads without running full benchmarks
- Understand write amplification, read amplification, and space amplification
- Event queue with virtual clock (not naive time-stepping)
- Deterministic execution (same config → same results)
- Fast simulation (hours of virtual time in seconds)
- Models I/O contention, write stalls, and compaction scheduling
- Tiered+Leveled compaction: L0 overlapping, L1+ sorted runs
- Compaction scoring: Priority-based level selection
- Parallel compactions: Configurable background jobs
- File-level operations: Statistical overlap simulation
- I/O bandwidth: Disk contention and throughput limits
- Write stalls: When memtables back up
- Real-time LSM tree visualization (memtable, L0-L6)
- Adjustable simulation parameters (write rate, I/O profiles)
- Live metrics (amplifications, throughput, latencies)
- Collapsible configuration sections with presets
rollingstone/
├── simulator/ # Core DES engine (Go)
│ ├── simulator.go # Event loop, virtual clock
│ ├── lsm.go # LSM tree state
│ ├── compactor.go # Compaction logic
│ ├── metrics.go # Performance tracking
│ └── events.go # Event types
├── cmd/server/ # WebSocket server + embedded UI
└── web/ # React frontend (Vite + TypeScript)
Communication: WebSocket with JSON messages (start, pause, reset, config updates, metrics streaming)
- Levels: 3-7 levels (default: 7)
- Memtable size: 64-256 MB (default: 64 MB)
- L0 trigger: 4 files (default)
- Level multiplier: 10x (default)
- Target file size: 64 MB (default), grows with level depth
- Write rate: 0-500 MB/s (adjustable during simulation)
- I/O profiles: EBS gp3 (500 MB/s), NVMe (3000 MB/s), HDD (150 MB/s)
- Compaction parallelism: 1-8 jobs (default: 2)
- Go 1.21+
- Node.js 18+ (for frontend development)
# Backend
go build -o /tmp/rollingstone cmd/server/main.go
# Frontend (development)
cd web && npm install && npm run dev- Architecture & Protocol: System design, WebSocket protocol, deployment
- Development Guide: Implementation details, UI design, simulation fidelity
Based on RocksDB documentation:
MIT