ISSN 1000-1239 CN 11-1777/TP

计算机研究与发展 ›› 2018, Vol. 55 ›› Issue (2): 305-318.doi: 10.7544/issn1000-1239.2018.20170863

所属专题: 2018面向新型硬件的数据管理专题

• 软件技术 • 上一篇    下一篇

面向数据库的持久化事务内存

HillelAvni, 王鹏   

  1. (华为技术有限公司 广东深圳 518129) (hillel.avni@huawei.com)
  • 出版日期: 2018-02-01

Persistent Transactional Memory for Databases

Hillel Avni, Wang Peng   

  1. (Huawei Technologies Co. Ltd., Shenzhen, Guangdong 518129)
  • Online: 2018-02-01

摘要: 硬件事务内存(hardware transactional memory, HTM)和可字节寻址的非易失性内存(nonvolatile memory, NVM)已经可以在新的计算机设备中使用.使用HTM确保一致性和隔离性,使用NVM确保持久性,组合使用两者可以实现满足原子性、一致性、隔离性和持久性(atomicity, consistency, isolation and durability, ACID)特性的事务.ACID事务在数据库中非常有价值,但由于数据库事务通常较大,其面临的挑战是HTM固有的容量限制和争用水平.首先提出了一种通过HTM进行ACID事务处理的软硬件解决方案——持久化HTM(persistent HTM, PHTM).使用2种方法来消除PHTM的局限性:1)持久化混合事务内存(persistent hybrid TM, PHyTM),允许PHTM事务与支持任意大小的纯软件事务(software transactional memory, STM)并发执行;2)分离事务执行(split transaction execution, STE)算法,该算法为关系数据库事务量身定制,解决了大多数事务超过PHTM的容量限制的问题.简而言之,讨论了利用NVM将HTM扩展到ACID数据库事务的问题.

关键词: 硬件事务内存, 非易失性内存, 数据库事务, 多核, 共享内存, ACID特性, 一致性

Abstract: Hardware transactional memory (HTM) and byte-addressable nonvolatile memory (NVM) are already available in new computer equipment. It is tempting, but not trivial, to combine them to implement transactions having the capabilities of ACID (atomicity, consistency, isolation and durability), by using HTM for consistency and isolation, and NVM for durability. ACID transactions are especially useful in databases but, because of the size of database transactions, the challenge is to cope with the inherent HTM limitations of size and contention level. In this paper, we first present persistent HTM (PHTM), a software-hardware solution for ACID transactions with HTM. We continue with two methods to mitigate PHTM limitations. One is a persistent hybrid TM algorithm called PHyTM, which allows PHTM transactions to execute concurrently with pure software, unbounded transactions. The other is for workloads where most transactions are too large for PHTM. For the purpose we propose a new algorithm called split transactions execution (STE), which is tailored for relational database transactions. In a nutshell, this paper discusses the extension of HTM to ACID database transactions on NVM.

Key words: hardware transactional memory (HTM), nonvolatile memory (NVM), database transaction, multicore, shared memory, ACID, concurrency

中图分类号: