[Paper Review] Closing the B-tree vs. LSM-tree Write Amplification Gap on Modern Storage Hardware with Built-in Transparent Compression
This paper proposes three novel B-tree design techniques—deterministic page shadowing, localized page modification logging, and sparse redo logging—that exploit hardware-based transparent compression in modern storage devices to reduce B-tree write amplification by over 10×. The approach enables B-trees to achieve write performance and storage efficiency comparable to or better than LSM-trees like RocksDB.
This paper studies the design of B-tree that can take full advantage of modern storage hardware with built-in transparent compression. Recent years have witnessed significant interest in applying log-structured merge tree (LSM-tree) as an alternative to B-tree. The current consensus is that, compared with B-tree, LSM-tree has distinct advantages in terms of storage space efficiency and write amplification. This paper argues that one should revisit this belief upon the arrival of storage hardware with built-in transparent compression. Advanced storage appliances~(e.g., all-flash array) and emerging computational storage drives perform hardware-based lossless data compression, transparent to OS and user applications. Beyond straightforwardly reducing the physical storage cost difference between B-tree and LSM-tree, such modern storage hardware brings new opportunities to innovate B-tree implementation in order to largely reduce its write amplification. As the first step to explore the potential, this paper presents three simple design techniques (i.e., deterministic page shadowing, localized page modification logging, and sparse redo logging) that can leverage such modern storage hardware to significantly reduce the B-tree write amplification. We implemented these design techniques and carried out experiments on a commercial storage drive with built-in transparent compression. The results show that the proposed design techniques can reduce the B-tree write amplification by over 10x. Compared with RocksDB (a popular key-value store built upon LSM-tree), the implemented B-tree can achieve similar or even smaller write amplification and physical storage space usage.
Motivation & Objective
- To re-evaluate the dominance of LSM-trees over B-trees in write amplification by leveraging modern storage hardware with transparent compression.
- To address the long-standing belief that LSM-trees inherently outperform B-trees in write amplification and storage efficiency.
- To explore how sparse data structures can be used efficiently on storage devices that compress data transparently without incurring physical storage cost.
- To design and implement B-tree techniques that reduce write amplification while maintaining atomicity and durability.
Proposed method
- Determine page updates using deterministic page shadowing to ensure atomicity without extra physical writes.
- Implement localized page modification logging to reduce write amplification caused by partial page updates by writing only modified data segments.
- Apply sparse redo logging to minimize logging overhead by writing only non-zero or changed data blocks, leveraging the storage device’s ability to compress sparse data.
- Use the storage device’s transparent compression to maintain low physical storage cost even when data structures are intentionally made sparse.
- Integrate the three techniques into a B-tree implementation and evaluate on a commercial storage drive with built-in compression.
- Measure write amplification based on physical storage writes after compression, not logical writes.
Experimental results
Research questions
- RQ1Can B-trees achieve write amplification comparable to LSM-trees when running on storage hardware with built-in transparent compression?
- RQ2How can data management systems exploit the sparsity of data structures on modern storage devices without incurring physical storage cost?
- RQ3What design techniques can reduce B-tree write amplification by leveraging hardware-based compression and sparse data representation?
- RQ4To what extent can B-trees outperform or match LSM-tree-based systems like RocksDB in write throughput and storage efficiency under transparent compression?
- RQ5Can the combination of deterministic page shadowing, localized modification logging, and sparse redo logging significantly reduce B-tree write amplification?
Key findings
- The proposed design techniques reduce B-tree write amplification by over 10× on a commercial storage drive with built-in transparent compression.
- Even without sparse redo logging, the B-tree achieves 19% higher write throughput than RocksDB on a 150GB dataset with 128B records.
- The B-tree achieves approximately 2.1× higher write throughput than both WiredTiger and the baseline B-tree implementation.
- The write amplification results correlate strongly with the measured random write speed performance, confirming the effectiveness of the optimizations.
- The B-tree implementation matches or exceeds the physical storage space usage efficiency of RocksDB, closing the gap with LSM-tree in both write amplification and space efficiency.
- The results suggest that B-trees can be competitive with LSM-trees in write-intensive workloads when properly optimized for modern storage hardware with transparent compression.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.