Log-structured merge-tree
A write-oriented index that buffers updates and merges sorted components over time, trading write batching against read and compaction work.
Structure: In RocksDB leveled compaction, L0 files may overlap, while each higher level partitions one sorted run across SST files. A run is a logical ordering unit, not necessarily one file. [1]
Lifecycle: LevelDB buffers recent updates in a memtable and creates persistent sorted tables; compaction merges tables and removes records only when they are no longer needed. Deletion markers can remain to hide older values. These are implementation mechanisms, not a promise that every run contains only the latest visible value. [2]
Policy: LSM organization does not imply one compaction strategy. The research taxonomy separates the trigger, layout, compaction granularity and data-movement policy. Distinguish a logical run from the files selected for a particular compaction. [4]
Relations
- related
- Bloom filter, Sorted string table, Write amplification, LSM tombstone, Key-value separation, LSM compaction, Leveled compaction, Tiered compaction, Read amplification, Space amplification, B-epsilon tree, Copy-on-abundant-write, Sorted run, Fragmented LSM tree, VT-tree, Bourbon, LSM-trie, SpanDB, SlimDB, NoveLSM, MatrixKV, Tebis, RocksDB, LevelDB
Citations
- RocksDB project. Leveled Compaction: Structure of the files.
- LevelDB 1.23 implementation note: Sorted tables, Compactions and Timing.
- Sarkar et al. Constructing and Analyzing the LSM Compaction Design Space. PVLDB 14(11), 2216-2229 (2021), section 2. DOI: 10.14778/3476249.3476274.