High read and write performance is important for generic key/value stores, which are fundamental to modern applications and databases. Yet, achieving high performance for both reads and writes is challenging due to traditionally limited memory and the pick-any-two-out-of-three tradeoff between memory use, read performance, and write performance. Existing state-of-the-art approaches limit memory usage and chose a primary dimension (reads or writes) for which to optimize their on-disk structures. They recover performance in the remaining dimension by other mechanisms. This approach limits databases' maximum performance in the remaining dimension and their dynamic (online) tunability to respond to changing workloads. We explore a different approach that dynamically trades memory for read or write performance as needed. We present TurtleKV, which includes a novel unbiased data structure for on-disk storage. It includes a knob that dynamically increases memory reserved for increasing read or write performance. When evaluated on YCSB, TurtleKV achieves up to 8x the write throughput of industry-leader RocksDB and up to 5x the read throughput while incurring similar space amplification. Compared to the state-of-the-art system SplinterDB, TurtleKV runs up to 40% better on point queries, up to 6x better on range scans and achieves similar write performance, while incurring 50% less space amplification.
翻译:高读写性能对于通用键值存储至关重要,这是现代应用与数据库的基础。然而,由于传统内存限制以及内存使用、读取性能与写入性能三者之间的“三选二”权衡,同时实现高读取和写入性能具有挑战性。现有前沿方法通过限制内存使用,并选择主要优化维度(读取或写入)来设计其磁盘存储结构,再通过其他机制弥补另一维度的性能。这种方法限制了数据库在剩余维度上的最大性能及其响应动态工作负载变化的在线可调性。我们探索了一种不同的方法,可根据需求动态地将内存资源分配给读取或写入性能。本文提出TurtleKV,它包含一种新颖的无偏磁盘存储数据结构,并配备可动态调节的机制,通过增加预留内存来提升读取或写入性能。在YCSB基准测试中,TurtleKV的写入吞吐量最高可达行业领先的RocksDB的8倍,读取吞吐量最高可达5倍,同时保持相近的空间放大率。与前沿系统SplinterDB相比,TurtleKV在点查询上性能提升最高达40%,范围扫描性能提升最高达6倍,写入性能相近,且空间放大率降低50%。