research-article

An analysis of concurrency control protocols for in-memory databases with CCBench

Abstract

This paper presents yet another concurrency control analysis platform, CCBench. CCBench supports seven protocols (Silo, TicToc, MOCC, Cicada, SI, SI with latch-free SSN, 2PL) and seven versatile optimization methods and enables the configuration of seven workload parameters. We analyzed the protocols and optimization methods using various workload parameters and a thread count of 224. Previous studies focused on thread scalability and did not explore the space analyzed here. We classified the optimization methods on the basis of three performance factors: CPU cache, delay on conflict, and version lifetime. Analyses using CCBench and 224 threads, produced six insights. The performance of optimistic concurrency control protocol for a read-only workload rapidly degrades as cardinality increases even without L3 cache misses. (I2) Silo can outperform TicToc for some write-intensive workloads by using invisible reads optimization. (I3) The effectiveness of two approaches to coping with conflict (wait and no-wait) depends on the situation. (I4) OCC reads the same record two or more times if a concurrent transaction interruption occurs, which can improve performance. (I5) Mixing different implementations is inappropriate for deep analysis. (I6) Even a state-of-the-art garbage collection method cannot improve the performance of multi-version protocols if there is a single long transaction mixed into the workload. On the basis of I4, we defined the read phase extension optimization in which an artificial delay is added to the read phase. On the basis of I6, we defined the aggressive garbage collection optimization in which even visible versions are collected. The code for CCBench and all the data in this paper are available online at GitHub.

References

  1. CCBench Developer Guide. https://github.com/thawk105/ccbench/tree/master/cc_format.Google ScholarGoogle Scholar
  2. CCBench Experimental Data. https://github.com/thawk105/ccdata.Google ScholarGoogle Scholar
  3. CCBench OCC. https://github.com/thawk105/ccbench/tree/master/occ.Google ScholarGoogle Scholar
  4. Code of Cavalia. https://github.com/Cavalia.Google ScholarGoogle Scholar
  5. Code of CCBench. https://github.com/thawk105/ccbench.Google ScholarGoogle Scholar
  6. Code of DBx1000. https://github.com/yxymit/DBx1000.Google ScholarGoogle Scholar
  7. Code of Masstree. https://github.com/kohler/masstree-beta.Google ScholarGoogle Scholar
  8. Code of Peloton. https://pelotondb.io.Google ScholarGoogle Scholar
  9. gflags. https://github.com/gflags/gflags.Google ScholarGoogle Scholar
  10. How to Extend CCBench. https://medium.com/@jnmt.Google ScholarGoogle Scholar
  11. mimalloc. https://github.com/microsoft/mimalloc.Google ScholarGoogle Scholar
  12. The Transaction Processing Council. TPC-C Benchmark (Revision 5.11), February 2011.Google ScholarGoogle Scholar
  13. R. Appuswamy, A. G. Anadiotis, D. Porobic, M. Iman, and A. Ailamaki. Analyzing the Impact of System Architecture on the Scalability of OLTP Engines for High-Contention Workloads. PVLDB, 11(2):121--134, 2017. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. T. Bang, N. May, I. Petrov, and C. Binnig. The Tale of 1000 Cores: An Evaluation of Concurrency Control on Real(Ly) Large Multi-Socket Hardware. In DaMoN, 2020. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. R. Bayer, H. Heller, and A. Reiser. Parallelism and Recovery in Database Systems. ACM TODS, 5(2):139--156, 1980. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. H. Berenson, P. Bernstein, J. Gray, J. Melton, E. O'Neil, and P. O'Neil. A Critique of ANSI SQL Isolation Levels. In SIGMOD Record, volume 24, pages 1--10, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. P. A. Bernstein and N. Goodman. Concurrency Control in Distributed Database Systems. ACM Comput. Surv., 13(2):185--221, 1981. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. P. A. Bernstein, V. Hadzilacos, and N. Goodman. Concurrency control and recovery in database systems. 1987. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. A. T. Clements, M. F. Kaashoek, and N. Zeldovich. RadixVM: Scalable address spaces for multithreaded applications. In EuroSys, pages 211--224, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. M. Dashti, S. Basil John, A. Shaikhha, and C. Koch. Transaction Repair for Multi-Version Concurrency Control. In SIGMOD Conf., pages 235--250, 2017. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. D. E. Difallah, A. Pavlo, C. Curino, and P. Cudre-Mauroux. OLTP-Bench: An Extensible Testbed for Benchmarking Relational Databases. PVLDB, 7(4):277--288, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. B. Ding, L. Kot, and J. Gehrke. Improving Optimistic Concurrency Control through Transaction Batching and Operation Reordering. PVLDB, 12(2):169--182, 2018. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. D. Durner and T. Neumann. No False Negatives: Accepting All Useful Schedules in a Fast Serializable Many-Core System. In ICDE, pages 734--745, 2019.Google ScholarGoogle ScholarCross RefCross Ref
  24. K. P. Eswaran, J. N. Gray, R. A. Lorie, and I. L. Traiger. The Notions of Consistency and Predicate Locks in a Database System. Comm. ACM, 19(11):624--633, 1976. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. J. M. Faleiro, D. J. Abadi, and J. M. Hellerstein. High Performance Transactions via Early Write Visibility. PVLDB, 10(5):613--624, 2017. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. J. Gray, P. Sundaresan, S. Englert, K. Baclawski, and P. J. Weinberger. Quickly generating billion-record synthetic databases. In SIGMOD Record, volume 23, pages 243--252, 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. J. Guo, P. Cai, J. Wang, W. Qian, and A. Zhou. Adaptive Optimistic Concurrency Control for Heterogeneous Workloads. PVLDB, 12(5):584--596, 2019. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. R. Harding, D. Van Aken, A. Pavlo, and M. Stonebraker. An Evaluation of Distributed Concurrency Control. PVLDB, 10(5):553--564, 2017. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. Y. Huang, W. Qian, E. Kohler, B. Liskov, and L. Shrira. Opportunities for Optimism in Contended Main-Memory Multicore Transactions. PVLDB, 13(5):629--642, 2020.Google ScholarGoogle Scholar
  30. R. Johnson, I. Pandis, R. Stoica, M. Athanassoulis, and A. Ailamaki. Aether: a Scalable Approach to Logging. PVLDB, 3(1-2):681--692, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. H. Jung, H. Han, A. Fekete, U. Röhm, and H. Y. Yeom. Performance of Serializable Snapshot Isolation on Multicore Servers. In DASFAA, pages 416--430, 2013.Google ScholarGoogle ScholarCross RefCross Ref
  32. K. Kim, T. Wang, R. Johnson, and I. Pandis. ERMIA: Fast Memory-Optimized Database System for Heterogeneous Workloads. In SIGMOD Conf., pages 1675--1687, 2016. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. H. Kimura. FOEDUS: OLTP engine for a thousand cores and NVRAM. In SIGMOD Conf., pages 691--706, 2015. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. P. Larson, S. Blanas, C. Diaconu, C. Freedman, J. M. Patel, and M. Zwilling. High-Performance Concurrency Control Mechanisms for Main-Memory Databases. PVLDB, 5(4):298--309, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. H. Lim, M. Kaminsky, and D. G. Andersen. Cicada: Dependably fast multi-core in-memory transactions. In SIGMOD Conf., pages 21--35, 2017. Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. Y. Mao, E. Kohler, and R. T. Morris. Cache Craftiness for Fast Multicore Key-Value Storage. In EuroSys, pages 183--196, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. V. J. Marathe, W. N. Scherer, and M. L. Scott. Design Tradeoffs in Modern Software Transactional Memory Systems. In LCR, pages 1--7, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. J. M. Mellor-Crummey and M. L. Scott. Scalable Reader-Writer Synchronization for Shared-Memory Multiprocessors. In SIGPLAN Notices, volume 26, pages 106--113, 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. T. Morzy. The Correctness of Concurrency Control for Multiversion Database Systems with Limited Number of Versions. In ICDE, pages 595--604, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. Y. Nakamura, H. Kawashima, and O. Tatebe. Integration of TicToc Concurrency Control Protocol with Parallel Write Ahead Logging Protocol. Journal of Network Computing, 9(2):339--353, 2019.Google ScholarGoogle ScholarCross RefCross Ref
  41. S. Nakazono, H. Uchiyama, Y. Fujiwara, Y. Nakamura, and H. Kawashima. NWR: Rethinking Thomas Write Rule for Omittable Write Operations. http://arxiv.org/abs/1904.08119, 2020.Google ScholarGoogle Scholar
  42. T. Neumann, T. Mühlbauer, and A. Kemper. Fast Serializable Multi-Version Concurrency Control for Main-Memory Database Systems. In SIGMOD Conf., pages 677--689, 2015. Google ScholarGoogle ScholarDigital LibraryDigital Library
  43. A. Pavlo, G. Angulo, J. Arulraj, H. Lin, J. Lin, L. Ma, P. Menon, T. C. Mowry, M. Perron, I. Quah, S. Santurkar, A. Tomasic, S. Toor, D. V. Aken, Z. Wang, Y. Wu, R. Xian, and T. Zhang. Self-Driving Database Management Systems. In CIDR, 2017.Google ScholarGoogle Scholar
  44. G. Prasaad, A. Cheung, and D. Suciu. Handling Highly Contended OLTP Workloads Using Fast Dynamic Partitioning. In SIGMOD Conf., pages 527--542, 2020. Google ScholarGoogle ScholarDigital LibraryDigital Library
  45. D. J. Rosenkrantz, R. E. Stearns, and P. M. Lewis. System Level Concurrency Control for Distributed Database Systems. ACM TODS, 3(2):178--198, 1978. Google ScholarGoogle ScholarDigital LibraryDigital Library
  46. M. L. Scott and W. N. Scherer. Scalable Queue-based Spin Locks with Timeout. In SIGPLAN Notices, volume 36, pages 44--52, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  47. Y. Sheng, A. Tomasic, T. Zhang, and A. Pavlo. Scheduling OLTP Transactions via Learned Abort Prediction. In aiDM, 2019. Google ScholarGoogle ScholarDigital LibraryDigital Library
  48. R. E. Stearns and D. J. Rosenkrantz. Distributed Database Concurrency Controls Using Before-Values. In SIGMOD Conf., pages 74--83, 1981. Google ScholarGoogle ScholarDigital LibraryDigital Library
  49. T. Tanabe, T. Hoshino, H. Kawashima, and O. Tatebe. An Analysis of Concurrency Control Protocols for In-Memory Databases with CCBench (Extended Version). http://arxiv.org/abs/2009.11558, 2020.Google ScholarGoogle Scholar
  50. T. Tanabe, H. Kawashima, and O. Tatebe. Integration of Parallel Write Ahead Logging and Cicada Concurrency Control Method. In BITS, pages 291--296, 2018.Google ScholarGoogle ScholarCross RefCross Ref
  51. D. Tang, H. Jiang, and A. J. Elmore. Adaptive Concurrency Control: Despite the Looking Glass, One Concurrency Control Does Not Fit All. In CIDR, 2017.Google ScholarGoogle Scholar
  52. R. H. Thomas. A Majority Consensus Approach to Concurrency Control for Multiple Copy Databases. ACM TODS, 4(2):180--209, 1979. Google ScholarGoogle ScholarDigital LibraryDigital Library
  53. S. Tu, W. Zheng, E. Kohler, B. Liskov, and S. Madden. Speedy Transactions in Multicore in-Memory Databases. In SOSP, pages 18--32, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  54. C. Wang, K. Huang, and X. Qian. A Comprehensive Evaluation of RDMA-enabled Concurrency Control Protocols. http://arxiv.org/abs/2002.12664, 2020.Google ScholarGoogle Scholar
  55. T. Wang, R. Johnson, A. Fekete, and I. Pandis. The Serial Safety Net: Efficient Concurrency Control on Modern Hardware. In DaMoN, 2015. Google ScholarGoogle ScholarDigital LibraryDigital Library
  56. T. Wang, R. Johnson, A. Fekete, and I. Pandis. Efficiently Making (Almost) Any Concurrency Control Mechanism Serializable. VLDB Journal, 26(4):537--562, 2017. Google ScholarGoogle ScholarDigital LibraryDigital Library
  57. T. Wang and H. Kimura. Mostly-Optimistic Concurrency Control for Highly Contended Dynamic Workloads on a Thousand Cores. PVLDB, 10(2):49--60, 2016. Google ScholarGoogle ScholarDigital LibraryDigital Library
  58. Z. Wang, S. Mu, Y. Cui, H. Yi, H. Chen, and J. Li. Scaling Multicore Databases via Constrained Parallel Execution. In SIGMOD Conf., pages 1643--1658, 2016. Google ScholarGoogle ScholarDigital LibraryDigital Library
  59. G. Weikum and G. Vossen. Transactional Information Systems. Elsevier, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  60. Y. Wu, J. Arulraj, J. Lin, R. Xian, and A. Pavlo. An empirical evaluation of in-memory multi-version concurrency control. PVLDB, 10(7):781--792, 2017. Google ScholarGoogle ScholarDigital LibraryDigital Library
  61. Y. Wu, C.-Y. Chan, and K.-L. Tan. Transaction Healing: Scaling Optimistic Concurrency Control on Multicores. In SIGMOD Conf., pages 1689--1704, 2016. Google ScholarGoogle ScholarDigital LibraryDigital Library
  62. Y. Wu and K.-L. Tan. Scalable In-Memory Transaction Processing with HTM. In ATC, pages 365--377, 2016. Google ScholarGoogle ScholarDigital LibraryDigital Library
  63. X. Yu, G. Bezerra, A. Pavlo, S. Devadas, and M. Stonebraker. Staring into the Abyss: An Evaluation of Concurrency Control with One Thousand Cores. PVLDB, 8(3):209--220, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  64. X. Yu, A. Pavlo, D. Sanchez, and S. Devadas. Tictoc: Time Traveling Optimistic Concurrency Control. In SIGMOD Conf., pages 1629--1642, 2016. Google ScholarGoogle ScholarDigital LibraryDigital Library
  65. Y. Yuan, K. Wang, R. Lee, X. Ding, J. Xing, S. Blanas, and X. Zhang. BCC: Reducing False Aborts in Optimistic Concurrency Control with Low Cost for in-Memory Databases. PVLDB, 9(6):504--515, 2016. Google ScholarGoogle ScholarDigital LibraryDigital Library

Comments

Login options

Check if you have access through your login credentials or your institution to get full access on this article.

Sign in

Full Access

  • Article Metrics

    • Downloads (Last 12 months)28
    • Downloads (Last 6 weeks)5

    Other Metrics

PDF Format

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader
About Cookies On This Site

We use cookies to ensure that we give you the best experience on our website.

Learn more

Got it!