CARMI:一种基于代价构造算法的缓存感知学习索引
CARMI: A Cache-Aware Learned Index with a Cost-based Construction Algorithm
摘要:
学习索引使用机器学习模型来取代传统的索引结构,在最近的研究中显示出有希望的结果。然而,现有的学习索引在合成数据集和真实数据集之间表现出性能差距,使它们远离实用索引。在本文中,我们发现,在模型训练过程中忽略数据划分的重要性是这个问题的主要原因。因此,我们明确地应用数据分区索引建设,并提出了一个新的高效和可更新的缓存感知RMI框架,称为CARMI。具体而言,本文引入熵作为度量指标,量化和表征学习索引中树节点数据划分的有效性,并提出了一种新的代价模型,为后续研究奠定了新的理论基础。然后,基于我们的新的成本模型,CARMI可以自动确定树结构和模型类型下的各种数据集和工作负载的混合构建算法,而无需任何手动调整。此外,由于内存访问限制了RMI的性能,一个新的缓存感知的设计也应用在CARMI中,它充分利用CPU缓存的特性,有效地减少内存访问的次数。我们的实验研究表明,CARMI的性能优于基线,实现了2.2倍/1.9倍的平均加速比相比,B+树/ALEX,而只使用约0.77倍的B+树的内存空间。在SOSD平台上,CARMI的性能优于所有基线,平均加速比最接近的竞争对手RMI高出1.2倍,后者已提前针对每个数据集进行了精心调整。
英文摘要:
Learned indexes, which use machine learning models to replace traditional index structures, have shown promising results in recent studies. However, existing learned indexes exhibit a performance gap between synthetic and real-world datasets, making them far from practical indexes. In this paper, we identify that ignoring the importance of data partitioning during model training is the main reason for this problem. Thus, we explicitly apply data partitioning to index construction and propose a new efficient and updatable cache-aware RMI framework, called CARMI. Specifically, we introduce entropy as a metric to quantify and characterize the effectiveness of data partitioning of tree nodes in learned indexes and propose a novel cost model, laying a new theoretical foundation for future research. Then, based on our novel cost model, CARMI can automatically determine tree structures and model types under various datasets and workloads by a hybrid construction algorithm without any manual tuning. Furthermore, since memory accesses limit the performance of RMIs, a new cache-aware design is also applied in CARMI, which makes full use of the characteristics of the CPU cache to effectively reduce the number of memory accesses. Our experimental study shows that CARMI performs better than baselines, achieving an average of 2.2x/1.9x speedup compared to B+ Tree/ALEX, while using only about 0.77x memory space of B+ Tree. On the SOSD platform, CARMI outperforms all baselines, with an average speedup of 1.2x over the nearest competitor RMI, which has been carefully tuned for each dataset in advance.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。