CompassDB:开创基于完美哈希的高性能键值存储
CompassDB: Pioneering High-Performance Key-Value Store with Perfect Hash
AI总结:
针对LSM-tree在SSD下CPU瓶颈与高读写放大问题,提出基于双层完美哈希表(TPH)的CompassDB,将索引查找降至O(1),显著提升吞吐量并降低延迟。
摘要:
现代主流的持久化键值存储引擎利用基于 Log-Structured Merge tree (LSM-tree) 的设计,通过利用顺序磁盘 I/O 来优化读/写性能。然而,SSD 的出现及其在带宽和 IOPS 方面的显著提升,将瓶颈从 I/O 转移到了 CPU。LSM tree 相关的高 compaction 成本和大的读/写放大已成为关键瓶颈。在本文中,我们介绍了 CompassDB,它利用 Two-tier Perfect Hash Table (TPH) 设计来显著降低读/写放大和 compaction 成本。CompassDB 的内存索引使用完美哈希算法,使得每个键值对的平均索引成本约为 6 字节。这种紧凑的索引将查找时间复杂度从 $O(log N)$ 降低到 $O(1)$,并降低了总体成本。因此,它允许为读取存储更多的键值对,或为写入的 memtable 提供额外的内存。这带来了吞吐量和延迟两方面的显著改善。我们使用 YCSB 基准工具进行的评估表明,与 RocksDB 相比,CompassDB 在六种典型工作负载下的吞吐量提高了 2.5 倍至 4 倍,与 PebblesDB 相比提高了 5 倍至 17 倍。此外,CompassDB 显著降低了平均和第 99 百分位的读/写延迟,与 RocksDB 相比实现了 50% 至 85% 的降低。
英文摘要:
Modern mainstream persistent key-value storage engines utilize Log-Structured Merge tree (LSM-tree) based designs, optimizing read/write performance by leveraging sequential disk I/O. However, the advent of SSDs, with their significant improvements in bandwidth and IOPS, shifts the bottleneck from I/O to CPU. The high compaction cost and large read/write amplification associated with LSM trees have become critical bottlenecks. In this paper, we introduce CompassDB, which utilizes a Two-tier Perfect Hash Table (TPH) design to significantly decrease read/write amplification and compaction costs. CompassDB utilizes a perfect hash algorithm for its in-memory index, resulting in an average index cost of about 6 bytes per key-value pair. This compact index reduces the lookup time complexity from $O(log N)$ to $O(1)$ and decreases the overall cost. Consequently, it allows for the storage of more key-value pairs for reads or provides additional memory for the memtable for writes. This results in substantial improvements in both throughput and latency. Our evaluation using the YCSB benchmark tool shows that CompassDB increases throughput by 2.5x to 4x compared to RocksDB, and by 5x to 17x compared to PebblesDB across six typical workloads. Additionally, CompassDB significantly reduces average and 99th percentile read/write latency, achieving a 50% to 85% reduction in comparison to RocksDB.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。