Why LSM Trees Exist: The Disk Math Behind Every Write-Heavy Database
Deriving the log-structured merge tree from one constraint: small random writes are expensive.

Series
How log-structured merge trees work, derived from disk physics up: why they exist, Bloom filters, compaction, and the trade-offs behind RocksDB, Cassandra and friends. Every number is backed by a simulation you can run.
Deriving the log-structured merge tree from one constraint: small random writes are expensive.

A few bits per key turn eight disk reads into almost none. Then a smarter split of the same memory cuts the waste by another 3x.

Every LSM tree pays for writes, reads and disk space. Compaction decides which bill gets big. Measured on a simulator, then mapped to RocksDB and Cassandra settings.
