[KongchangAI]
Concept日志结构合并树 / Log-Structured Merge-Tree

LSM-Tree

A data structure proposed by Patrick O'Neil and others in 1996 that converts random writes into sequential writes. It reduces write amplification through an in-memory MemTable buffer and a tiered compaction mechanism. LSM-Tree is widely used in high-write-throughput storage engines such as RocksDB and LevelDB.

Timeline (last 90 days)

Oct 14

When writing, columnar storage must place values of different columns into different locations, so the cost of a single-row insert is far higher than in row-based storage, and therefore OLAP systems typically use batch import and background merging (such as LSM-Tree compaction) to amortize write costs.

Unverified50%
Oct 8

Storage engines optimized for write performance typically use LSM-Tree (Log-Structured Merge-Tree) as the underlying data structure.

Unverified50%
Oct 8

LSM-Tree converts random writes into sequential writes: data is first written to an in-memory MemTable, which is batch-flushed to disk once a threshold is reached, and then organized layer by layer through background Compaction.

Unverified50%
Oct 8

LSM-Tree was proposed by Patrick O'Neil et al. in 1996, originally to address the random I/O bottleneck of traditional B-trees under high write loads.

Unverified50%
Oct 8

Due to frequent page splits, write amplification in B+ trees is typically above 10x; write amplification in LSM-Trees typically fluctuates between 3x and 30x.

Unverified50%
Oct 8

There is an inverse trade-off between write amplification and read amplification: lowering the Compaction trigger threshold can reduce read amplification but increases write amplification.

Unverified50%
Oct 8

LSM-based engines have an advantage in writes, but reads — especially range queries — may require searching across multiple levels, resulting in read amplification.

Unverified50%
Sep 11

Implementing a simplified LSM-Tree storage engine by hand helps in understanding the architectural design of LevelDB, RocksDB, and Cassandra.

Unverified50%

All Facts (8)

Unverified

When writing, columnar storage must place values of different columns into different locations, so the cost of a single-row insert is far higher than in row-based storage, and therefore OLAP systems typically use batch import and background merging (such as LSM-Tree compaction) to amortize write costs.

50%
Unverified

Storage engines optimized for write performance typically use LSM-Tree (Log-Structured Merge-Tree) as the underlying data structure.

50%
Unverified

LSM-Tree converts random writes into sequential writes: data is first written to an in-memory MemTable, which is batch-flushed to disk once a threshold is reached, and then organized layer by layer through background Compaction.

50%
Unverified

LSM-Tree was proposed by Patrick O'Neil et al. in 1996, originally to address the random I/O bottleneck of traditional B-trees under high write loads.

50%
Unverified

Due to frequent page splits, write amplification in B+ trees is typically above 10x; write amplification in LSM-Trees typically fluctuates between 3x and 30x.

50%
Unverified

There is an inverse trade-off between write amplification and read amplification: lowering the Compaction trigger threshold can reduce read amplification but increases write amplification.

50%
Unverified

LSM-based engines have an advantage in writes, but reads — especially range queries — may require searching across multiple levels, resulting in read amplification.

50%
Unverified

Implementing a simplified LSM-Tree storage engine by hand helps in understanding the architectural design of LevelDB, RocksDB, and Cassandra.

50%

Source Articles