ISSN 1000-1239 CN 11-1777/TP

计算机研究与发展 ›› 2015, Vol. 52 ›› Issue (6): 1351-1361.doi: 10.7544/issn1000-1239.2015.20150171

所属专题: 2015面向应用领域需求的体系结构

• 系统结构 • 上一篇    下一篇



  1. 1(首都师范大学信息工程学院 北京 100048);2(计算机体系结构国家重点实验室(中国科学院计算技术研究所) 北京 100190);3(高可靠嵌入式系统技术北京市工程研究中心(首都师范大学) 北京 100048) (
  • 出版日期: 2015-06-01
  • 基金资助: 

Mitigating Log Cost through Non-Volatile Memory and Checkpoint Optimization

Wan Hu1, Xu Yuanchao1,2, Yan Junfeng1, Sun Fengyun1, Zhang Weigong1,3   

  1. 1(College of Information Engineering, Capital Normal University, Beijing 100048);2(State Key Laboratory of Computer Architecture (Institute of Computing Technology, Chinese Academy of Sciences), Beijing 100190);3(Beijing Engineering Research Center of High Reliable Embedded System(Capital Normal University), Beijing 100048)
  • Online: 2015-06-01

摘要: 在文件系统进行用户数据和元数据的持久化过程中,如果出现异常掉电或系统崩溃,可能导致文件系统出现数据的不一致性问题.现有的Ext4文件系统通过写前日志(write-ahead logging, WAL)技术结合事务机制来保证持久化操作的一致性.写前日志技术将文件系统元数据写入磁盘2次,元数据的粒度小、数量大、重复度高,影响了程序的性能,也缩短了Flash存储介质的使用寿命.针对这一问题,提出了使用新型非易失存储(non-volatile memory, NVM)作为存放日志的独立外部设备,并通过存取指令(load/store)接口直接访问;同时使用倒序扫描(reverse scan)技术对检查点(checkpoint)流程进行优化,减少同一数据块的重复写操作.实验结果表明,使用NVM作为外部日志分区,对于写操作比重较大的程序,在HDD上带宽提升接近50%;在SSD上带宽提升达到23%;在checkpoint时使用倒序扫描之后,写入次数降低明显,带宽提升接近20%.

关键词: 文件系统, 非易失存储, 日志, 事务, 崩溃一致性, 检查点

Abstract: The sudden power failure or system crash can result in file system inconsistency upon updating permanent user data or metadata to their home locations in disk layout, an issue known as crash-consistency problem. Most existing file systems leverage some kind of consistency techniques such as write-ahead logging(WAL), copy-on-write(COW) to avoid this situation. Ext4 file system ensures the consistency of persistent operations through transaction as well as journaling mechanism. However, it is required to write file system metadata to disk twice. The metadata has the features with small granularity, big quantity and high repetition, which degrades the performance of program and also shortens the lifetime of flash-based SSD. This paper is proposed to employ non-volatile memory(NVM) as an independent log partition, which can be accessed through load/store interface directly. Furthermore, we optimize disk write operations by using reverse scan while checkpointing in order to reduce the repeated metadata updates to the same data block. The preliminary experimental results show that the performance can be improved up to 50% on HDD, and 23% on SSD for heavy-write workloads when using NVM as the external journal partition device and the number of write operations can be reduced significantly after using reverse scan checkpoint technique.

Key words: file system, non-volatile memory(NVM), journaling, transaction, crash consistency, checkpoint