Trustworthy Systems

A scalable lock manager for multicores

Authors

Hyungsoo Jung, Hyuck Han, Alan Fekete, Gernot Heiser and Heon Yeom

NICTA

Dongduk Women’s University

University of Sydney

UNSW

Seoul National University

Abstract

Modern implementations of DBMS software are intended to take advantage of high core counts that are becoming common in high-end servers. However, we have observed that several database platforms, including MySQL, Shore-MT, and a commercial system, exhibit throughput collapse as load increases into over-saturation (where there are more request threads than cores), even for a workload with little or no logical contention for locks, such as a read-only workload. Our analysis of MySQL identifies latch contention within the lock manager as the bottleneck responsible for this collapse.

We design a lock manager with reduced latching, implement it in MySQL, and show that it avoids the collapse and generally improves performance. Our efficient implementation of a lock manager is enabled by a staged allocation and de-allocation of locks. Locks are pre-allocated in bulk, so that the lock manager only has to perform simple list-manipulation operations during the acquire and release phases of a transaction. De-allocation of the lock data-structures is also performed in bulk, which enables the use of fast implementations of lock acquisition and release, as well as concurrent deadlock checking.

BibTeX Entry

  @article{Jung_HFHY_14,
    author           = {Jung, Hyungsoo and Han, Hyuck and Fekete, Alan and Heiser, Gernot and Yeom, Heon},
    doi              = {10.1145/2691190.2691192},
    journal          = {ACM Transactions on Database Systems},
    keywords         = {concurrency, transaction processing, locking, multicore, scalability, lock-free synchronisation},
    month            = dec,
    number           = {4},
    pages            = {29:1--29:29},
    paperurl         = {https://trustworthy.systems/publications/nicta_full_text/7506.pdf},
    title            = {A Scalable Lock Manager for Multicores},
    volume           = {39},
    year             = {2014}
  }

Download