暂无图片
暂无图片
暂无图片
暂无图片
暂无图片
NUMA感知的持久内存存储引擎优化设计-屠要峰,陈河堆,王涵毅,闫宗帅,孔鲁,陈兵.pdf
456
18页
0次
2022-05-19
免费下载
软件学报 ISSN 1000-9825, CODEN RUXUEW E-mail: jos@iscas.ac.cn
Journal of Software, 2022,33(3):891908 [doi: 10.13328/j.cnki.jos.006443] http://www.jos.org.cn
©中国科学院软件研究所版权所有. Tel: +86-10-62562563
NUMA 感知的持久内存存储引擎优化设计
屠要峰
1,2
,
陈河堆
2
,
王涵毅
2
,
闫宗帅
2
,
2
,
1
1
(南京航空航天大学 计算机科学与技术学院, 江苏 南京 211106)
2
(中兴通讯股份有限公司, 江苏 南京 210012)
通信作者: 屠要峰, E-mail: 13605151819@qq.com
: 持久性内存(persist memory, PM)具有非易失、字节寻址、低时延和大容量等特性, 打破了传统内外存之
间的界限, 对现有软件体系结构带来颠覆性影响. 但是, 当前 PM 硬件还存在着磨损不均衡、读写不对称等问题,
特别是当跨 NUMA (non uniform memory access)节点访问 PM , 存在着严重的 I/O 性能衰减问题. 提出了一种
NUMA 感知的 PM 存储引擎优化设计, 并应用到中兴新一代数据库系统 GoldenX , 显著降低了数据库系统跨
NUMA 节点访问持久内存的开销. 主要创新点包括: 提出了一种 DRAM+PM 混合内存架构下跨 NUMA 节点的数
据空间分布策略和分布式存取模型, 实现了 PM 数据空间的高效使用; 针对跨 NUMA 访问 PM 的高开销问题,
出了 I/O 代理例程访问方法, 将跨 NUMA 访问 PM 开销转化为一次远程 DRAM 内存拷贝和本地访问 PM 的开销,
设计了 Cache Line Area (CLA)缓存页机制, 缓解了 I/O 写放大问题, 提升了本地访问 PM 的效率; 扩展了传统表空
间概念, 让每个表空间既拥有独立的表数据存储, 也拥有专门的 WAL (write-ahead logging)日志存储, 针对该分布
WAL 存储架构提出了一种基于全局顺序号的事务处理机制, 解决了单
WAL 性能瓶颈问题, 并实现了 NUMA
感知的事务处理、检查点和灾难恢复等优化机制及算法. 实验结果表明, 所提出的方法能够有效提升 NUMA 架构
PM 存储引擎的性能, YCSB 多种测试场景下分别提升了 105%317%, TPC-C 场景下提升了 90%134%.
关键词: 数据库; 存储引擎; 持久性内存; NUMA (non uniform memory access); WAL (write-ahead logging)
中图法分类号: TP311
中文引用格式: 屠要峰, 陈河堆, 王涵毅, 闫宗帅, 孔鲁, 陈兵. NUMA 感知的持久内存存储引擎优化设计. 软件学报,
2022, 33(3): 891–908. http://www.jos.org.cn/1000-9825/6443.htm
英文引用格式: Tu YF, Chen HD, Wang HY, Yan ZS, Kong L, Chen B. Optimal Design of NUMA-aware Persistent Memory
Storage Engine. Ruan Jian Xue Bao/Journal of Software, 2022, 33(3): 891908 (in Chinese). http://www.jos.org.cn/1000-9825/6443.
htm
Optimal Desi gn of NUMA-a ware Persistent Memory Storage Engine
TU Yao-Feng
1,2
, CHEN He-Dui
2
, WANG Han-Yi
2
, YAN Zong-Shuai
2
, KONG Lu
2
, CHEN Bing
1
1
(College of Computer Science and Technology, Nanjing University of Aeronautics and Astronautics, Nanjing 211106, China)
2
(Zhongxing Telecommunication Equipment Corporation, Nanjing 210012, China)
Abstra ct : Persistent memory (PM) has the characteristics of non-volatility, byte addressable, low latency, and large capacity, which
breaks the boundary between traditional internal and external memory and has a has a disruptive impact on the existing software
architecture. However, the current PM hardware still h as problems su ch as u neven wear and asymmetric r ead and writ e. Especially serious
I/O performance degradation problem will occur when the CPU accesses the PM across NUMA (non uniform memory access) nodes. An
NUMA-aware PM storage engine optimization design is proposed and applied to Zhongxing’s new generation database system GoldenX,
which significantly reduces the overhead of database system accessing persistent memory across NUMA nodes. The main innovations
基金项目: 国家重点研发计划(2019YFB2102002); 江苏省重点研发计划(BE2019012)
本文由数据库系统新型技术专题特约编辑李国良教授、于戈教授、杨俊教授和范举教授推荐.
收稿时间: 2021-06-30; 修改时间: 2021-07-31; 采用时间: 2021-09-13; jos 在线出版时间: 2021-10-21
892
软件学报 2022 年第 33 卷第 3
include: a data space distribution strategy and distributed access model across NUMA nodes are proposed under a DRAM+PM hybrid
memory architecture, which realizes the efficient use of PM data space; aiming at the high latency problem of accessing PM across
NUMA nodes, an I/O proxy routines access method is proposed, which converts the overhead of accessing PM across NUMA into the
overhead of a remote DRAM memory copy and local access to PM. The Cache Line Area cache page mechanism is designed to alleviate
the problem of I/O write amplification and improve the efficiency of local access to PM. The concept of traditional table space is ex tended,
so that each table space has both independent table data storage and dedicated WAL (write-ahead logging) storage. For the distributed
WAL storage architecture, a transaction processing mechanism based on global sequence numbers is proposed, which addresses the
problem of single-point the WAL performance bottleneck, and implement NUMA-aware transaction processing, checkpoint and disaster
recovery optimization mechanisms and algorithms. Experimental results show that the method proposed in this study can effectively
improve the performance of the PM storage engine under the NUMA architecture, by 105%317% in v arious test scenarios of YCSB and
90%134% in TPC-C.
Key words: database; storage engine; persist memory; NUMA (non uniform memory access); WAL (writ e-ahead logging)
数据库是高效组织、存储、管理数据的软件. 随着互联网、物联网和移动计算技术的发展, 人们能够获
取的数据规模爆炸式增长. 如何高效地存储、管理和查询这些海量多模的数据, 是当前数据管理领域面临的
严峻挑战. 近年来, 新型硬件技术突飞猛进, 特别是非易失性内存(non-volatile memory, NVM)的出现, 打破了
传统内外存之间的界限, 对现有的软件体系结构带来了颠覆性的影响. 传统的数据库系统是基于慢速块存储
设备构建的, 采用了经典的高速缓存+内存+磁盘三层存储架构设计, 由于磁盘和内存的硬件延迟相差两个
数量级, 导致数据在内存和外存之间移动或交换时会引发系统性能颠簸的问题. 计算机硬件的创新为数据库
系统带来了全新的机会, 数据库系统需要根据新型硬件特性重新优化设计软件的架构和算法.
非易失性内存也称为持久内存(persistent memory, PM)或存储级内存(storage-class memory, SCM), PM
有非易失性、字节寻址、低时延、大容量等优势, 但是当前的 PM 硬件也存在着磨损不均衡、读写不对称等
问题
[1]
. 文献[2]给出了英特尔®傲腾™ DC 持久内存(DCPMM) DRAM 的时延和带宽对比, 其中, DCPMM
读写时延约是 DRAM 4 , 说明 PM 的读写能力较 DRAM 还有一定的差距; DCPMM 的读带宽是其写带宽
10 倍以上,即存在巨大的读写非对称性. 因此, 业界普遍认为, PM 短期内还无法完全替代 DRAM, 采用
DRAM+P M 的混合内存架构更能发挥各自的优势
[3]
.
近年来, 一些先进的商业数据库已开始尝试应用 PM 来提升性能. Oracle 20c 增加了 PM Database
[4]
功能,
使数据库绕过 DRAM Bu ffer, 直接读取 PM 上的数据, 并能跟踪数据访问频率, 自动将热点数据从 PM 中调入
DRAM. SQL Se rver 2019 则增加了混合缓冲池, 使缓冲池对象能够直接引用 PM 设备上的数据页. 尽管这些商
业数据库推出了 PM 数据库功能, 但大多处于初级的 DAX (direct access)
[5]
接口适配阶段, 并未针对 PM 新特
性对数据库系统做深度优化.
NUMA (non uniform memory access)架构将内存和处理器分成组, 每组称为一个 NUM A 节点, 从任一个
处理器角度看, 与该处理器位于同一 NUMA 节点中的内存称为本地, 其他 NUMA 节点中的内存称为远端,
CPU 访问本地内存的速度远高于远端内存, 并且节点之间的距离越大, 访问时延越高
[6]
. PM 作为内存使用时
同样存在这个问题, 而且与 DR A M 相比, CPU NUMA 节点访问 PM 的性能衰减更加明显
[7]
. 因此, 构建 PM
存储引擎时, 需要把 NUMA 特性作为重要的设计考量, 确保合理使用 PM 数据存储空间的同时, 降低跨
NUMA 节点访问 PM 的开销.
本文探讨了中兴通讯新一代数据库系统 GoldenX PM 存储引擎设计实践, 重点研究了 NUMA 感知的
PM 存储引擎下的数据空间分布、事务处理和异常恢复等问题. 本文主要工作和贡献如下:(1) 提出了一种
DRAM+P M 混合内存架构下跨 NUMA 节点的数据空间分布策略和分布式存取模型, 实现了 PM 数据空间的高
效使用. (2) 针对跨 NUMA 访问 PM 的高开销问题, 提出了 I/O 代理例程访问方法, 将跨 NUMA 访问 PM 开销
转化为一次远程 DRAM 内存拷贝和本地访问 PM 的开销; 设计了 CLA 缓存页机制, 缓解 I/O 写放大问题,
升了本地访问 PM 的效率. (3) 扩展了传统的表空间概念, 让每个表空间既拥有独立的表数据存储, 也拥有专
门的 WA L 日志存储. 针对该分布式 WAL 存储架构提出一种基于全局顺序号的分布式 WAL 事务处理机制,
of 18
免费下载
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文档的来源(墨天轮),文档链接,文档作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论

关注
最新上传
暂无内容,敬请期待...
下载排行榜
Top250 周榜 月榜