Efficient Locking Techniques for Databases on Modern Hardware
Efficient Locking Techniques for Databases on Modern Hardware 康涛 2014. 3. 14
• VLDB 2012 • Brown University, Hewlett-Packard Laboratories • Hideaki Kimura, Goetz Graefe, Harumi Kuno
论文背景 • OLTP overhead breakdown and goal.
论文内容 • 关注于锁瓶颈 • 使用四种技术处理数据库中锁的所有方面: (1) efficient key range locking, (2) lightweight intent locks, (3) a deadlock detection and recovery scheme, (4) an improvement on early lock release algorithm to ensure correct treatment of read-only transactions
KEY RANGE LOCKING • Prior Techniques ARIES/KVL and ARIES/IM:Mohan et al. 提出 ARIES/KVL , 通过锁定neighboring keys 来保 证可序列化的锁协议, ARIES / IM减少有多 个二级索引的表的锁数量 Key range lock modes: Lomet定义了一组key range lock modes由两部分组成range mode and key mode例如:‘Range. X-S’锁以独占模 式保护range和共享模式保护key
KEY RANGE LOCKING 此设计使用’prior-key locking’。 key range lock模式为:
KEY RANGE LOCKING Point queries:
KEY RANGE LOCKING • Range queries: 如” Select * From T Where T. a Between 15 And 25”的范围查询需要游标 The lock mode to take depends on the type of cursors (ascending or descending) and on the inclusion or exclusion of of boundary values in the query predicate (e. g. , key > 15 or key >=15).
INTENT LOCKS • Lock acquisition and release:
DEADLOCKS
EARLY LOCK RELEASE Anomaly of straightforward ELR
PERFORMANCE EVALUATION • Environment : HP Z 600 system (6 -core 2. 67 GHz Intel Xeon CPU with 12 MB cache, 6 GB of RAM, running x 86 64 Fedora Core 14 Linux)。
- Slides: 21