Title
Contention-aware lock scheduling for transactional databases
Abstract
AbstractLock managers are among the most studied components in concurrency control and transactional systems. However, one question seems to have been generally overlooked: "When there are multiple lock requests on the same object, which one(s) should be granted first?"Nearly all existing systems rely on a FIFO (first in, first out) strategy to decide which transaction(s) to grant the lock to. In this paper, however, we show that the lock scheduling choices have significant ramifications on the overall performance of a transactional system. Despite the large body of research on job scheduling outside the database context, lock scheduling presents subtle but challenging requirements that render existing results on scheduling inapt for a transactional database. By carefully studying this problem, we present the concept of contention-aware scheduling, show the hardness of the problem, and propose novel lock scheduling algorithms (LDSF and bLDSF), which guarantee a constant factor approximation of the best scheduling. We conduct extensive experiments using a popular database on both TPC-C and a microbenchmark. Compared to FIFO---the default scheduler in most database systems---our bLDSF algorithm yields up to 300x speedup in overall transaction latency. Alternatively, our LDSF algorithm, which is simpler and achieves comparable performance to bLDSF, has already been adopted by open-source community, and was chosen as the default scheduling strategy in MySQL 8.0.3+
Year
DOI
Venue
2018
10.1145/3187009.3177740
Hosted Content
Field
DocType
Volume
FIFO (computing and electronics),Concurrency control,Lock (computer science),Computer science,Scheduling (computing),Job scheduler,Database transaction,Transactional leadership,Database,Speedup
Journal
11
Issue
ISSN
Citations 
5
2150-8097
3
PageRank 
References 
Authors
0.37
39
4
Name
Order
Citations
PageRank
Boyu Tian130.37
Jiamin Huang21357.01
Barzan Mozafari381938.21
Grant Schoenebeck450939.48