The Log-Structured Merge-Tree (LSM-Tree
https://www.cs.umb.edu/~poneil/lsmtree.pdf
【Log-Structured Merge-Tree 】
【结构化日志归并树】
【要解决的问题】
The Log-Structured Merge-Tree (LSM-Tree)
https://www.cs.umb.edu/~poneil/lsmtree.pdf
0-高性能事务系统需要记录活动轨迹:通过在历史表中加行实现;
高性能事务系统需要记录日志:为了系统数据的恢复;
1-0中的2方面的需求的需求:需要有高效的索引;
2-1的实现方式旧有B-Tree的数据结构去实现;
3-B-Tree是基于磁盘的索引结构(disk-based index structures):基于磁盘导致为了维护实时的索引( a real-time index)的I/O消耗为基于内存的
的索引结构的I/O消耗的2倍;
4-结构化日志归并树(LSM-tree)为了解决3中问题而诞生:它仍然是基于磁盘的数据结构,但它减少了磁头(disk arm)的运动,降低了I/O消耗;
【算法 --- defer,batches,cascade---index changes 对变化进行归并、批处理】
The LSM-tree uses an algorithm that defers and batches index changes, cas-
cading the changes from a memory-based component through one or more disk components in an
efficient manner reminiscent of merge sort.
混合使用内存和硬盘hybrid use of memory and disk components
【使用场景---较读更适合增删】
LSM-tree is most useful in applications where index inserts are
more common than finds that retrieve the entries
【以指数方式增长的对数个B-Tree a logarithmic number of B-trees of exponentially increasing size】
An Introduction to B
ε
-trees and Write-Optimization
http://supertech.csail.mit.edu/papers/BenderFaJa15.pdf
og-structured merge trees (LSM-trees) [7] are a
WODS with many variants [8, 9]. An LSM-tree typ-
ically consists of a logarithmic number of B-trees of
exponentially increasing size. Once an index at one
level fills up, it is emptied by merging it into the
index at the next level.