在基于LSM的键值存储中使用混合键值放置来平衡垃圾回收与I/O放大
Balancing Garbage Collection vs I/O Amplification using hybrid Key-Value Placement in LSM-based Key-Value Stores
摘要:
键值(KV)分离是一种在I/O访问模式中引入随机性以减少用于快速存储设备(NVMe)的基于LSM的键值存储中的I/O放大的技术。KV分离有一个明显的缺点,使其不那么有吸引力:在现代工作负载中很重要的删除操作,特别是更新操作,会导致值日志中频繁而昂贵的垃圾回收(GC)。在本文中,我们设计并实现了视差,它提出了混合KV放置,大大减少了GC开销,并最大限度地利用日志的好处。我们首先为不同KV对大小的KV分离的好处建模。我们使用该模型将KV对分为三类:小型、中型和大型。然后,视差对每个KV类别使用不同的方法:它总是将大值放在日志中,并将小值放在适当的位置。对于中值,它使用混合策略,结合了使用日志的好处并消除了GC开销,如下所示:它将中值放置在LSM结构中除了最后几个(通常是一个或两个)级别之外的所有日志中,在那里它执行完全压缩,合并值,并回收日志空间而无需GC。我们评估视差对RocksDB的地方,所有的值和BlobDB,总是执行KV分离。我们发现,对于除了基于扫描的YCSB工作负载之外的所有工作负载,Parallax将吞吐量提高了12.4倍和17.83倍,将I/O放大率降低了27.1倍和26倍,并将CPU效率分别提高了18.7倍和28倍。
英文摘要:
Key-value (KV) separation is a technique that introduces randomness in the I/O access patterns to reduce I/O amplification in LSM-based key-value stores for fast storage devices (NVMe). KV separation has a significant drawback that makes it less attractive: Delete and especially update operations that are important in modern workloads result in frequent and expensive garbage collection (GC) in the value log. In this paper, we design and implement Parallax, which proposes hybrid KV placement that reduces GC overhead significantly and maximizes the benefits of using a log. We first model the benefits of KV separation for different KV pair sizes. We use this model to classify KV pairs in three categories small, medium, and large. Then, Parallax uses different approaches for each KV category: It always places large values in a log and small values in place. For medium values it uses a mixed strategy that combines the benefits of using a log and eliminates GC overhead as follows: It places medium values in a log for all but the last few (typically one or two) levels in the LSM structure, where it performs a full compaction, merges values in place, and reclaims log space without the need for GC. We evaluate Parallax against RocksDB that places all values in place and BlobDB that always performs KV separation. We find that Parallax increases throughput by up to 12.4x and 17.83x, decreases I/O amplification by up to 27.1x and 26x, and increases CPU efficiency by up to 18.7x and 28x respectively, for all but scan-based YCSB workloads.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。