arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2405.03267cs.DCcs.DBcs.IR
收藏

刻画十亿级向量搜索中性能与索引规模的两难困境并以二级内存破解之

Characterizing the Dilemma of Performance and Index Size in Billion-Scale Vector Search and Breaking It with Second-Tier Memory

Rongxin Cheng, Yifan Peng, Xingda Wei, Hongrui Xie, Rong Chen, Sijie Shen, Haibo Chen

AI总结:

本文首次刻画了十亿级向量搜索中 SSD 上图索引与聚类索引的性能-索引规模两难困境,提出以 RDMA/CXL 连接的二级内存为核心重新设计索引结构和执行引擎,在多种二级内存设备上以数量级更小的索引放大率实现最优性能,并给出两种索引的选型对比。

摘要:

大规模数据集上的向量搜索对现代在线服务(如网页搜索和检索增强生成 RAG)至关重要,这必然要求将数据集及其索引存储在 SSD 等二级存储上。在本文中,我们首次刻画了现有基于 SSD 的图索引和聚类索引中性能与索引规模之间的权衡:为了将吞吐量分别提升 5.7 倍和 1.7 倍,这些索引不得不付出相对于数据集大小 5.8 倍和 7.7 倍的存储放大代价。其根本原因在于 SSD 的粗粒度访问方式与向量索引在低放大率下所需的细粒度随机读取不匹配。本文认为,二级内存(例如通过 RDMA 或 CXL 连接的远程 DRAM/NVM)凭借其细粒度访问粒度,是从系统视角解决该问题的有力存储介质。然而,将现有索引(主要为 SSD 设计)直接置于二级内存上无法充分发挥其能力。同时,二级内存在行为上仍更接近存储设备,因此将其当作 DRAM 使用同样低效。为此,我们构建了以二级内存性能特征为核心的图索引和聚类索引。通过精心设计的执行引擎和索引布局,我们证明向量索引在多种二级内存设备上能够以数量级更小的索引放大率实现最优性能。基于我们在二级内存上改进的图索引和向量索引,我们进一步对二者进行了系统性对比研究,以帮助开发者为其工作负载选择合适的索引。有趣的是,二级内存上的发现与 SSD 上的结论相矛盾。

英文摘要:

Vector searches on large-scale datasets are critical to modern online services like web search and RAG, which necessity storing the datasets and their index on the secondary storage like SSD. In this paper, we are the first to characterize the trade-off of performance and index size in existing SSD-based graph and cluster indexes: to improve throughput by 5.7$\times$ and 1.7$\times$, these indexes have to pay a 5.8$\times$ storage amplification and 7.7$\times$ with respect to the dataset size, respectively. The root cause is that the coarse-grained access of SSD mismatches the fine-grained random read required by vector indexes with small amplification. This paper argues that second-tier memory, such as remote DRAM/NVM connected via RDMA or CXL, is a powerful storage for addressing the problem from a system's perspective, thanks to its fine-grained access granularity. However, putting existing indexes -- primarily designed for SSD -- directly on second-tier memory cannot fully utilize its power. Meanwhile, second-tier memory still behaves more like storage, so using it as DRAM is also inefficient. To this end, we build a graph and cluster index that centers around the performance features of second-tier memory. With careful execution engine and index layout designs, we show that vector indexes can achieve optimal performance with orders of magnitude smaller index amplification, on a variety of second-tier memory devices. Based on our improved graph and vector indexes on second-tier memory, we further conduct a systematic study between them to facilitate developers choosing the right index for their workloads. Interestingly, the findings on the second-tier memory contradict the ones on SSDs.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑