← Back to Labs
LSM Tree Lab
Follow one key from WAL to memtable to SSTable, then compare how leveled and tiered compaction pay for the same write history.
Compaction policyChoose which debt shape the engine prefers
WorkloadChoose whether compaction is mostly replacing values or carrying tombstones
Read checks
1 memtable, 0 SSTables
Write amp
1.0x
Space amp
1.2x
Snapshot state
no pinned snapshot
Step 1 / 6The write lands in the WAL and the active memtable
An LSM engine first records the mutation in an append-only WAL, then inserts the same key into the current in-memory memtable so fresh reads can see it immediately.
The engine appended seq=880132 for tram:ath-17 to the WAL and inserted the same version into the mutable memtable.
A write is acknowledged long before it has a final home on disk.
Fewer candidate files per level, more bytes rewritten over time. Right now there is no compaction debt yet, only fresh state in RAM plus the recovery log.
Arrow keys to navigate · R to reset
Tap dots to jump to any step