arrow
Return

Two-Phase Locking Optimization Towards Dynamic High-Contented Workloads

delete2026-08-17
delete0
PRE
AI
D
Donghui Wang
Q
Qiyu Zhuang
Y
Yuxing Chen
C
Chengyao Jiang
A
Anqun Pan
W
Wei Jiang
S
Songli Wang
H
Hailin Lei
C
Chong Zhu
L
Lixiong Zheng
J
Jie Jiang
卢卫 cover
卢卫 (Wei Lu)
柴云鹏 cover
柴云鹏 (Yunpeng Chai)
张
张峰 (Feng Zhang)
X
Xiaoyong Du
DOI:10.1109/tkde.2026.3724702delete
deleteOriginal
deleteOriginal request for help
deleteShare
deleteSave
Abstract

Abstract

En 中文
Two-phase locking (2PL) is a fundamental and widely used concurrency control protocol. It regulates concur rent access to database data by following a specific sequence of lock acquisition and release during transaction execution, thereby ensuring transaction isolation. However, in strict 2PL, transactions must wait for conflicting transactions to commit and release their locks, which reduces concurrency and system throughput. We have observed that this issue is exacerbated in high-contented workloads at Tencent, where lock contention can severely degrade system performance. While existing optimiza tions demonstrate some effectiveness in high-contention scenarios, their performance remains insufficient because they suffer from lock contention and hotspot access waits. This paper presents optimizations in lock management imple mented in Tencent's database, TXSQL, with a particular focus on high-contention scenarios. First, we discuss our motivations and the journey toward general lock optimization, which includes lightweight lock management, a copy-free active transaction list, and queue locking mechanisms that effectively enhance concurrency. Second, we introduce a hotspot-aware approach that enables certain highly conflicting transactions to switch to a group locking method, which groups conflicting transactions at a specific hotspot and allows them to execute serially in an uncommitted state within a conflict group without the need for locking, thereby reducing lock contention. Our evaluation shows that under high-contented workloads, TXSQL achieves performance improvements of up to 6.5x and up to 22.3x compared to state-of-the-art methods and systems, respectively.
Keywords:
Optimization
Databases
Protocols
System recovery
Schedules
Scheduling
Synchronization
Timing
Concurrency control
Database systems

Journal

IEEE Transactions on Knowledge and Data Engineering cover
IEEE Transactions on Knowledge and Data Engineering
IF:
10.4
Papers:
6.8K
Citations:
3.2W

Organization

T
tencent inc
Scholars:
13
Papers: 3
Citations: 0
R
renmin university of china
Scholars:
273
Papers: 151
Citations: 0
Cited Papers

Cited Papers

No cited papers available