[论文解读] Lessons learned from the early performance evaluation of Intel Optane DC Persistent Memory in DBMS
本文评估了在 Microsoft SQL Server 2019 中使用 Intel Optane DC 持久内存(PMem)作为缓冲池或持久存储在 OLTP(TPC-C)和 OLAP(TPC-H)工作负载下的性能表现。研究发现,仅将 DRAM 替换为 PMem 在内存模式下会因写入效率低下而损害性能,而有效利用 PMem 需要智能的页面放置策略和基于工作负载的调优,而不仅仅是硬件替换。
Non-volatile memory (NVM) is an emerging technology, which has the persistence characteristics of large capacity storage devices(e.g., HDDs and SSDs), while providing the low access latency and byte-addressablity of traditional DRAM memory. This unique combination of features open up several new design considerations when building database management systems (DBMSs), such as replacing DRAM (as the main working space memory) or block devices (as the persistent storage), or complementing both at the same time for several DBMS components (such as access methods,storage engine, buffer management, logging/recovery, etc). However, interacting with NVM requires changes to application software to best use the device (e.g. mmap and clflush of small cache lines instead of write and fsync of large page buffers). Before introducing (potentially major) code changes to the DBMS for NVM, developers need a clear understanding of NVM performance in various conditions to help make better design choices. In this paper, we provide extensive performance evaluations conducted with a recently released NVM device, Intel Optane DC Persistent Memory (PMem), under different configurations with several micro-benchmark tools. Further, we evaluate OLTP and OLAP database workloads (i.e., TPC-C and TPC-H) with Microsoft SQL Server 2019 when using the NVM device as an in-memory buffer pool or persistent storage. From the lessons learned we share some recommendations for future DBMS design with PMem, e.g.simple hardware or software changes are not enough for the best use of PMem in DBMSs.
研究动机与目标
- 评估在不同配置下,Intel Optane DC 持久内存(PMem)在真实数据库管理系统(DBMS)工作负载中的性能表现。
- 识别在将 PMem 集成到数据库管理系统(DBMS)时面临的关键性能瓶颈和设计权衡。
- 为 PMem 友好的 DBMS 中的缓冲管理与存储引擎设计提供可操作的建议。
- 评估 PMem 对写入密集型(TPC-C)和读取密集型(TPC-H) OLTP 与 OLAP 工作负载的影响。
- 强调仅进行简单的软硬件更改不足以实现 PMem 在 DBMS 中的最优利用。
提出的方法
- 在不同 I/O 请求大小、并行度和访问模式下,对 PMem 进行微基准测试。
- 评估了 PMem 的三种配置:作为内存模式下的 DRAM 替代品、作为直接访问(DAX)设备,以及作为基于文件 I/O 的持久存储。
- 使用 TPC-C(OLTP)和 TPC-H(OLAP)工作负载,在生产级 Microsoft SQL Server 2019 上测量性能表现。
- 监控内存使用情况和 I/O 行为,以分析热点页面缓存和 tempdb 溢出的影响。
- 分析由于中间查询结果频繁写入导致的 PMem 内存模式下写入性能下降问题。
- 提出并评估了一种 PMem 优化的缓冲区放置策略,以优先将热点页面置于 DRAM,减少对 PMem 的写入压力。
实验结果
研究问题
- RQ1在微基准测试中,PMem 性能如何随 I/O 请求大小和并行度变化?
- RQ2在 OLTP 和 OLAP 工作负载中,将 PMem 用作 DRAM 替代品(内存模式)会产生何种性能影响?
- RQ3当用作数据库文件的持久存储时,PMem 与 SSD 在查询执行时间上的表现如何比较?
- RQ4在写入密集型工作负载下,中间结果溢出到 tempdb 对 PMem 性能的劣化作用有多大?
- RQ5在将 DRAM 缓冲池扩展至 PMem 时,需要何种缓冲管理策略以避免性能下降?
主要发现
- 在内存模式下,PMem 由于高写入延迟,显著降低了 OLTP 和 OLAP 工作负载的性能,尽管其读取带宽很高。
- 对于 TPC-H(读取密集型),在 SF=100 时,PMem 内存模式下的查询执行时间约为 60 秒,远慢于使用 DRAM 的情况,这是由于写入密集型的 tempdb 操作所致。
- 在 SF=100 时,PMem 文件 I/O 和 SSD 使用了高达 150GB 的 DRAM 缓冲池,而 PMem DAX 仅使用了约 20GB,表明缓存利用率低下且 I/O 开销更高。
- 对于 8KB 页面,PMem DAX 与文件 I/O 之间的性能差异极小,表明页面大小和访问模式对读取密集型工作负载的影响有限。
- OLTP 工作负载(TPC-C)显示,PMem 与 SSD 之间无显著性能差异,但 PMem 在饱和状态下写入带宽会下降,而 SSD 不会出现此现象。
- 仅通过硬件替换(如 DRAM → PMem)或不加智能页面放置的软件扩展,均会导致性能未达最优,凸显了开发 PMem 友好的缓冲策略的必要性。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。