Locking in Practice : Performance of a Database System on a Multicore Machine

락의 실제 : 멀티코어 상의 데이터베이스 성능 분석

  • 한혁 (동덕여자대학교 컴퓨터학과)
  • Received : 2014.04.18
  • Accepted : 2014.06.18
  • Published : 2014.08.28


A lock is a general and popular way of serializing accesses to shared data in multiprocessor environments. After the mutual exclusion was first introduced in 1960s, many spinlock algorithms have been proposed and deployed to real systems such as operating systems and (transactional) database systems. In this study, we measure impacts of a lock mechanism on a database system under various CPU configurations using a high-end multicore system. For the evaluation, we use the most up-to-date version of MySQL (version 5.6) with InnoDB engine, which has been substantially re-architected to improve scalability on multicore machines. We changed the original spinlock function of InnoDB to evaluate various spinlock mechanisms on multicore machines.




  1. T. E. Anderson, "The performance of spin lock alternatives for shared-memory multiprocessors," IEEE Transactions on Parallel and Distributed Systems, Vol.1, No.1, pp.6-16, 1990.
  2. E. W. Dijkstra, "Solution of a problem in concurrent programming control," Communications of the ACM, Vol.8, No.9, p.569, 1965.
  3. D. P. Reed and R. K. Kanodia, "Synchronization with event-counts and sequencers," Communications of the ACM, Vol.22, No.2, pp.115-123, 1979.
  4. G. L. Peterson, "Myths about the mutual exclusion problem," Information Processing Letters, Vol.12, No.3, pp.115-116, 1981.
  5. J. M. Mellor-Crummey and M. L. Scott, "Algorithms for scalable synchronization on shared-memory multiprocessors," ACM Transactions on Computer Systems, Vol.9, No.1, pp.21-65, 1991.
  6. S. Boyd-Wickizer, A. T. Clements, Y. Mao, A. Pesterev, M. F. Kaashoek, R. Morris, and N. Zeldovich, "An analysis of Linux scalability to many cores," in Proceedings of the 9th USENIX Conference on Operating Systems Design and Implementation (OSDI), pp.1-8, 2010.
  7. A. T. Clements, F. Kaashoek, and N. Zeldovich, "Scalable Address Spaces Using RCU Balanced Trees," in Proceedings of the 17th International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS), 2012.