Skip to main content
QUICK REVIEW

[论文解读] Closing the B-tree vs. LSM-tree Write Amplification Gap on Modern Storage Hardware with Built-in Transparent Compression

Yifan Qiao, Xubin Chen|arXiv (Cornell University)|Jul 27, 2021
Advanced Data Storage Technologies参考文献 25被引用 5
一句话总结

本文提出了三种新颖的B树设计技术——确定性页影子机制、局部化页修改日志记录和稀疏重做日志记录,利用现代存储设备中的硬件透明压缩,将B树的写入放大减少超过10倍。该方法使B树在写入性能和存储效率方面达到或优于RocksDB等LSM树的水平。

ABSTRACT

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.

研究动机与目标

  • 通过利用具备透明压缩功能的现代存储硬件,重新评估LSM树在写入放大方面对B树的主导地位。
  • 解决长期以来认为LSM树在写入放大和存储效率方面天然优于B树的观念。
  • 探索如何在无需产生物理存储成本的前提下,高效利用支持透明压缩的存储设备上的稀疏数据结构。
  • 设计并实现减少写入放大同时保持原子性和持久性的B树技术。

提出的方法

  • 通过确定性页影子机制确定页更新,确保原子性,且无需额外的物理写入。
  • 实现局部化页修改日志记录,通过仅写入已修改的数据段,减少因部分页更新导致的写入放大。
  • 应用稀疏重做日志记录,通过仅写入非零或已更改的数据块来最小化日志开销,利用存储设备对稀疏数据的压缩能力。
  • 利用存储设备的透明压缩功能,在数据结构被有意设计为稀疏的情况下,仍保持较低的物理存储成本。
  • 将三种技术整合到B树实现中,并在具备内置压缩功能的商用存储驱动器上进行评估。
  • 基于压缩后的物理存储写入量来测量写入放大,而非逻辑写入量。

实验结果

研究问题

  • RQ1当运行在具备内置透明压缩功能的存储硬件上时,B树能否实现与LSM树相当的写入放大?
  • RQ2数据管理系统的稀疏数据结构如何在现代存储设备上被有效利用,且不产生物理存储成本?
  • RQ3哪些设计技术能够通过利用基于硬件的压缩和稀疏数据表示来减少B树的写入放大?
  • RQ4在透明压缩环境下,B树在写入吞吐量和存储效率方面,能够多大程度上优于或匹配基于LSM树的系统(如RocksDB)?
  • RQ5确定性页影子机制、局部化修改日志记录和稀疏重做日志记录的组合能否显著降低B树的写入放大?

主要发现

  • 所提出的三种设计技术在具备内置透明压缩功能的商用存储驱动器上,将B树的写入放大降低了超过10倍。
  • 即使不使用稀疏重做日志记录,B树在150GB数据集(每条记录128B)上的写入吞吐量仍比RocksDB高出19%。
  • B树的写入吞吐量约为WiredTiger和基线B树实现的2.1倍。
  • 写入放大结果与实测随机写入速度表现高度相关,证实了优化措施的有效性。
  • B树实现的物理存储空间使用效率与RocksDB相当或更优,成功在写入放大和空间效率方面缩小了与LSM树的差距。
  • 结果表明,当B树针对具备透明压缩功能的现代存储硬件进行适当优化时,其在写入密集型工作负载中可与LSM树竞争。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。