节点文献

内存数据库事务并发控制研究和设计

Research and Design of Transaction Concurrency Control in Main Memory Database(mmdb)

【作者】 董晓辉

【导师】 黄本雄;

【作者基本信息】 华中科技大学 , 通信与信息系统, 2009, 硕士

【摘要】 随着电力行业信息化程度不断普及,电力系统对现场数据的实时处理的需求日渐提高,催生了支持实时性的高性能数据库的诞生。内存容量的增加和成本的降低,使基于内存的高性能实时数据库成为主流技术趋势。内存数据库的数据主要存储在内存中,数据的读写都在内存中完成,没有因磁盘I/O带来很大的开销。因此,在海量数据的处理过程中,事务并发控制的好坏直接决定了数据处理性能的高低。本文的目标就是研究内存数据库事务并发控制技术,设计一套适合于内存数据库事务管理的方案,以满足电力行业海量数据处理的需求。由于电力行业现场采集数据到达时刻极不均衡,具有较强的突发性,这给事务的并发控制带来了空前的挑战。本文通过分析现有事务并发控制技术,包括两阶段加锁协议、树形多粒度锁、意向锁、动态多粒度锁和死锁检测等,提出了本文要解决的问题:多核环境下高突发性事务流的并发控制问题。通过对多核环境下高突发性事务流的并发控制问题的深入分析,本文基于现有的自主开发的内存数据库——CacheDB的构架,设计了一套适合电力行业应用的事务管理功能模块,包括事务管理器、事务调度器和锁管理器。该方案综合了意向锁和动态多粒度锁的优点,事务冲突多时,采用并发能力强的行级锁;事务冲突少时,采用加锁开销小的表级锁,很大程度地提高了系统的总体性能。此外,本文对传统的动态多粒度锁机制进行了改进,重点考虑了锁的相容及开销情况,优化了事务冲突的判决机制;针对动态多粒度锁,优化了现有的死锁检测机制,尽可能的减少不必要的死锁检测动作。为了验证CacheDB事务管理方案的可行性,本文对闩和动态多粒度锁进行了仿真测试。测试结果显示,采用意向锁和动态多粒度锁相结合的事务并发控制设计方案,在数据到达不均衡条件下,系统总体事务处理性能得到明显提高。

【Abstract】 With the development of technology, the disposal of real-time data requires the support of high capable Database. The data of Main Memory Database (MMDB) is memorized in Memory and all orders are processed in the Memory, thus Disc I/O is not the bottleneck of data visiting any more. In the process of great capacity for data, the control of transaction concurrency is crucial to the performance degree of data processing. In order to satisfy the demand of great capacity for simultaneity electric power, it is necessary to design a kind of fit-for scheme of CacheDB Transaction. The objective of this article is to research the related technologies of Memory Database Transaction, especially to deal with transaction concurrency control.The extreme imbalance of great capacity for data in the industry of electric power brings the transaction of concurrency control an unprecedented challenge. With a responsibly professional analysis on current transaction concurrent control, my paper is trying to figure out emergent tasks, I deeply analyzed the key technologies concerned of current locking, including the protocol of two-phrase locking, the multiple locking of tree-format, the intension Lock, the dynamic multi-granularity locking and the detection of deadlock.After deeply analyzing the crucial technologies and combining with the current framework of CacheDB, I design a series of procedures, which are fit to manage the transaction of CacheDB. My ideas is to adopt both intension lock and dynamic muti- granularity locking: when conflicts of transaction are frequently, row level lock will be in effect; on the contrary, table level lock will be in use.This paper provides a way to improve the mechanism of dynamic muti-granularity, especially optimizing the weight of lock compatibility and cost to transaction conflicts. Comparing to dynamic multi-granularity, it aims to improve the mechanism of deadlock detection with a goal of reducing unnecessary deadlock detection preocedures.To test the feasibility of the design of transaction management, I have done an imitating-test on latch and dynamic muti-granularity locking. Test Results Indicate that once the data scale reaches imbalance, the scheme of the transaction concurrency control that is a combination of Intension Lock and dynamic muti-granularity locking, turns out comparable processing feasibility.

  • 【分类号】TP311.13
  • 【被引频次】4
  • 【下载频次】194
节点文献中: 

本文链接的文献网络图示:

本文的引文网络