Skip to content
Commitwise
Menu

LSM tree

A storage structure that buffers writes in memory and flushes them to immutable sorted files.

Definition

A log-structured merge tree appends writes to a log and an in-memory table, then writes it out as a sorted file (SSTable). Reads check the memory table and several files, helped by Bloom filters; background compaction merges files. Writes are fast and sequential, and deletes are written as tombstones. Used by Cassandra, RocksDB, HBase and CockroachDB's Pebble.

In practice

A delete-heavy Cassandra table slows down because reads must skip thousands of tombstones until compaction removes them.

Learn it in context

Lessons that use this term.

Related terms

Esc

Type to search the whole site.