
小 型 微 型 计 算 机 系 统
Journal of Chinese Computer Systems
收稿日期:2021-10-12 基金项目:国家自然科学基金创新研究群体项目(No.61821003)资助;国家自然科学基金面上项目(No.62072196)资助;深
圳市科技计划基础研究面上项目(JCYJ20190809095001781)资助。 作者简介:王中华,女,1994 年生,博士研究生,研究方向为大数据存储、键值存
储系统、非易失性内存和学习索引等;舒碧华,男,1996 年生,硕士研究生,研究方向为大数据存储、键值存储系统、非易失性内存和学习索引等;陈
书宁,男,1994 年生,公司员工,研究方向为键值存储系统、分布式存储等;刘瀚阳,男,1996 年生,公司员工,研究方向为键值存储系统、分布式存
储等;崔秋,男,1994 年生,公司员工,研究方向为大数据存储、键值存储系统、非易失性内存和学习索引等;万继光,男,1972 年生,博士,教授,
研究方向为大数据存储、键值存储系统、文件系统、分布式存储和智能化存储等;
LI-Tree:一个基于非易失性内存和轻量级 B+树的学习索引
王中华
1
,舒碧华
1
,陈书宁
2
,刘瀚阳
2
,崔 秋
2
,万继光
1,3
1
(武汉光电国家研究中心, 华中科技大学计算机学院,教育部信息存储系统重点实验室 武汉 430074)
2
(北京平凯星辰科技发展有限公司 北京 100192)
3
(深圳华中科技大学研究院 深圳 518000)
E-mail:wangzhonghua@hust.edu.cn
摘 要:大数据背景下剧增的数据给经典的内存索引技术带来了巨大挑战,为了实现对海量数据的高性能索引,工业界和学术
界分别从设备和结构角度推出了高性能大容量的非易失型内存(Non-Volatile Memory, NVM)和受机器学习启发的学习索引
(Learned Index, LI)。然而目前基于 NVM 的学习索引结构的相关研究非常稀少,在如何结合 NVM 和 LI 来高效地索引海量数据
方面还有许多问题需要解决。本文提出了一种基于 NVM 的新型智能索引结构 LI-Tree,充分发挥了两者的优势。具体的,LI-Tree
可分为三层:由机器学习模型组成的能够提高 LI-Tree 单点性能的模型层、由静态数组构成的减少 NVM 写的数据索引层和由一
系列轻量级 B+树组成以避免模型层插入时频繁重训练的数据层。在真实设备上评估表明,LI-Tree 相比传统 B+树,插入、查询
和删除性能分别提高了 70%、30%和 130%。另外,LI-Tree 与学习索引结构 ALEX, PGM-Index 和 XIndex 对比,插入性能分别提升
了 80%,130%和 150%。
关键词:非易失内存;索引结构;学习索引;B+树;键值存储
中图分类号:TP392 文献标识码:A
LI-Tree
:
A Learned Index based on Non-Volatile Memory and Lightweight B+ Trees
WANG Zhong-hua
1
, SHU Bi-hua
1
, CHEN Shu-ning
2
, LIU Han-yang
2
, CUI Qiu
2
, and WAN Ji-guang
1,3
1
(Wuhan National Laboratory for Optoelectronics, School of Computer Science & Technology in Huazhong University of Science and Technology, and Key
Laboratory of Information Storage System Ministry of Education of China, Wuhan, 430074)
2
(PingCAP©, Beijing, 100192)
3
(Research Institute of Huazhong University of Science and Technology in Shenzhen, Shenzhen, 518000)
Abstract:The dramatic growth of data volumes in the era of big data poses challenges to in-memory indexing techniques in terms of
both devices and data structures. Commercial Non-Volatile Memory (NVM) devices are now available as the supplement of or
alternative for memory, and the new Learned Index (LI) data structures are proposed for indexing massive data in read-heavy scenarios.
However, naively applying LI on NVMs is not efficient due to the heavy retraining overhead for LI when data size growing. In this work,
we present the LI-tree, an NVM-oriented learned index structure that maximizes LI's write performance while fully exploiting LI's read
performance. Specifically, the LI-Tree consists of three layers: a model layer composed of machine learning models that target on
improve point query performance, a data index layer consists of static arrays to reduce NVM write operations, and a data layer that uses
lightweight B+ trees to alleviate the training overhead of the other two layers for insert operations. Evaluation results on real NVM
devices show that LI-Tree improves the performance of insert, query, and delete operations by 70%, 30%, and 130%, respectively,
compared to the traditional B+ tree. LI-Tree improves the insert performance by 80%, 130%, and 150% when compared to ALEX,
PGM-Index, and XIndex, respectively.
Key words:Non-Volatile Memory, Indexing Structure, Learned Index, B+ tree, Key-Value Storage
1 引言
数字时代下,急剧增长的数据量对存储系统提出了更高
的容量、性能和成本挑战
[1]
。然而,对存储系统性能至关重
要的经典内存索引结构却无法满足当前的需求
[2]
。一方面,
传统 DRAM 内存面临着容量和能耗等方面的问题
[3]
,另一方
面,经典范围索引结构经过多年发展,其结构弊端明显且优
化空间有限
[4]
。
在设备方面,为了进一步逼近性能、价格与容量的博弈
极限, 工 业 界 推 出 了 新 型 非 易失性内存 (Non-Volatile
Memory, NVM)
[5]
,它拥有堪比固态驱动器 (Solid State
评论