LSM-Tree(26)

3.2 Comparison of LSM-tree and B-tree I/O costs(3)

LSM-tree Insert Cost Formula.

To evaluate the cost of an insert into the LSM-tree, we need to think in terms of amortization of multiple inserts, since a single insert to the memory component C0 only occasionally has any I/O effect. As we explained at the beginning of this Section, the performance advantage an LSM- tree has over a B-tree is based on two different batching effects. The first is the already men- tioned reduced cost of a page I/O, COSTπ. The second is based on the idea that the delay in merging newly inserted entries into the C1 tree usually allows time for numerous entries to ac- cumulate in C0; thus several entries will get merged into each C1 tree leaf page during its trip from disk to memory and back. By contrast, we have been assuming that the B-tree leaf pages are too infrequently referenced in memory for more than one entry insert to take place.
为了评估一次插入lsm树的成本,我们需要考虑多次插入的摊销,因为对内存组件C0的一次插入只是偶尔有任何I/O影响。正如我们在本节开始时所解释的,LSM树相对于b树的性能优势基于两种不同的批处理效果。第一个是已经提到的一页输入输出成本降低,成本为π。第二种方法是基于将新插入的项合并到C1树中的延迟,通常允许大量的项在C0中进行ac累积;因此,在C1树叶子页从磁盘到内存并返回的过程中,有几个条目将被合并到每个C1树叶子页中。相比之下,我们一直假设B-tree叶页在内存中被引用的频率太低,因此不会发生多个条目插入。(有道翻译)

todo:自己翻译

你可能感兴趣的:(LSM-Tree(26))