Skip to main content
QUICK REVIEW

[论文解读] Re-enabling high-speed caching for LSM-trees

Lei Guo, Dejun Teng|arXiv (Cornell University)|Jun 7, 2016
Advanced Data Storage Technologies参考文献 12被引用 3
一句话总结

本文提出 dLSM,一种改进的 LSM-tree,通过使用磁盘上的压缩缓冲区来减少密集写入期间的缓存失效。通过为频繁压缩的数据维持稳定的磁盘地址,dLSM 实现持久缓存,在 HDD 存储上使用相同 DRAM 缓存时,查询性能比标准 LSM-tree 提高 5–8 倍。

ABSTRACT

LSM-tree has been widely used in cloud computing systems by Google, Facebook, and Amazon, to achieve high performance for write-intensive workloads. However, in LSM-tree, random key-value queries can experience long latency and low throughput due to the interference from the compaction, a basic operation in the algorithm, to caching. LSM-tree relies on frequent compaction operations to merge data into a sorted structure. After a compaction, the original data are reorganized and written to other locations on the disk. As a result, the cached data are invalidated since their referencing addresses are changed, causing serious performance degradations. We propose dLSM in order to re-enable high-speed caching during intensive writes. dLSM is an LSM-tree with a compaction buffer on the disk, working as a cushion to minimize the cache invalidation caused by compactions. The compaction buffer maintains a series of snapshots of the frequently compacted data, which represent a consistent view of the corresponding data in the underlying LSM-tree. Being updated in a much lower rate than that of compactions, data in the compaction buffer are almost stationary. In dLSM, an object is referenced by the disk address of the corresponding block either in the compaction buffer for frequently compacted data, or in the underlying LSM-tree for infrequently compacted data. Thus, hot objects can be effectively kept in the cache without harmful invalidations. With the help of a small on-disk compaction buffer, dLSM achieves a high query performance by enabling effective caching, while retaining all merits of LSM-tree for write-intensive data processing. We have implemented dLSM based on LevelDB. Our evaluations show that with a standard DRAM cache, dLSM can achieve 5--8x performance improvement over LSM with the same cache on HDD storage.

研究动机与目标

  • 解决由于压缩操作导致的 LSM-tree 性能下降问题。
  • 克服压缩重新组织数据并使缓存块失效的根本限制,即使数据内容保持不变。
  • 在不依赖 SSD 或额外键值缓存的情况下,为写入密集型工作负载中的随机键值查询实现有效缓存。
  • 在显著提升随机读取吞吐量的同时,保持 LSM-tree 的写入效率和范围查询性能。
  • 提供一种低开销、通用的解决方案,适用于动态和混合工作负载,且无需系统级架构更改。

提出的方法

  • 引入一个持久的磁盘压缩缓冲区,用于存储频繁压缩数据的快照,保持稳定的磁盘块地址。
  • 将压缩缓冲区用作暂存区,数据在此处的更新频率远低于主 LSM-tree,从而最小化地址变化。
  • 通过压缩缓冲区的稳定块地址引用热数据,而访问频率较低的数据则保留在主 LSM-tree 中。
  • 通过确保压缩缓冲区中缓存块在压缩过程中保持有效,将缓存与数据的物理位置解耦。
  • 复用现有的 LSM-tree 压缩调度和合并逻辑(如 LevelDB 中的实现),以保持写入效率并均衡 I/O 负载。
  • 在压缩缓冲区中使用大型布隆过滤器,以实现快速键值查找,同时保持极低的性能开销。

实验结果

研究问题

  • RQ1持久的磁盘缓冲区是否能减少 LSM-tree 在密集压缩期间的缓存失效?
  • RQ2压缩缓冲区在不降低写入吞吐量或增加内存使用的情况下,能在多大程度上提升随机读取性能?
  • RQ3在缓冲区中保持稳定的块地址是否能维持写入密集型工作负载中的缓存有效性?
  • RQ4在混合读写工作负载下,dLSM 与标准 LSM-tree 在缓存命中率和查询吞吐量方面有何差异?
  • RQ5dLSM 是否能在不依赖 SSD 或额外键值缓存层的情况下,实现在 HDD 存储上的高性能?

主要发现

  • 在 HDD 上使用标准 DRAM 缓存时,dLSM 在相同写入工作负载下相比标准 LSM-tree 实现了 5–8 倍更高的查询性能。
  • 在压缩过程中,dLSM 的平均缓存命中率稳定在约 90%,而标准 LSM-tree 的平均命中率下降至 47%。
  • dLSM 的随机读取吞吐量保持稳定(约 3,400 QPS),而标准 LSM-tree 在压缩期间吞吐量在 50 至 850 QPS 之间波动。
  • 在全量压缩期间,dLSM 保持高性能,而标准 LSM-tree 因缓存频繁更换导致性能显著下降。
  • 压缩缓冲区通过将频繁访问数据的更新速率与主压缩过程解耦,减少了缓存失效的突发情况。
  • 在压缩阶段,dLSM 的平均缓存命中率比标准 LSM-tree 高 41%,平均读取吞吐量高 91%。

更好的研究,从现在开始

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

无需绑定信用卡

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