skip to main content
research-article

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

Published: 01 September 2020 Publication History

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.
[2]
CCBench Experimental Data. https://github.com/thawk105/ccdata.
[3]
CCBench OCC. https://github.com/thawk105/ccbench/tree/master/occ.
[4]
Code of Cavalia. https://github.com/Cavalia.
[5]
Code of CCBench. https://github.com/thawk105/ccbench.
[6]
Code of DBx1000. https://github.com/yxymit/DBx1000.
[7]
Code of Masstree. https://github.com/kohler/masstree-beta.
[8]
Code of Peloton. https://pelotondb.io.
[9]
gflags. https://github.com/gflags/gflags.
[10]
How to Extend CCBench. https://medium.com/@jnmt.
[11]
mimalloc. https://github.com/microsoft/mimalloc.
[12]
The Transaction Processing Council. TPC-C Benchmark (Revision 5.11), February 2011.
[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.
[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.
[15]
R. Bayer, H. Heller, and A. Reiser. Parallelism and Recovery in Database Systems. ACM TODS, 5(2):139--156, 1980.
[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.
[17]
P. A. Bernstein and N. Goodman. Concurrency Control in Distributed Database Systems. ACM Comput. Surv., 13(2):185--221, 1981.
[18]
P. A. Bernstein, V. Hadzilacos, and N. Goodman. Concurrency control and recovery in database systems. 1987.
[19]
A. T. Clements, M. F. Kaashoek, and N. Zeldovich. RadixVM: Scalable address spaces for multithreaded applications. In EuroSys, pages 211--224, 2013.
[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.
[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.
[22]
B. Ding, L. Kot, and J. Gehrke. Improving Optimistic Concurrency Control through Transaction Batching and Operation Reordering. PVLDB, 12(2):169--182, 2018.
[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.
[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.
[25]
J. M. Faleiro, D. J. Abadi, and J. M. Hellerstein. High Performance Transactions via Early Write Visibility. PVLDB, 10(5):613--624, 2017.
[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.
[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.
[28]
R. Harding, D. Van Aken, A. Pavlo, and M. Stonebraker. An Evaluation of Distributed Concurrency Control. PVLDB, 10(5):553--564, 2017.
[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.
[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.
[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.
[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.
[33]
H. Kimura. FOEDUS: OLTP engine for a thousand cores and NVRAM. In SIGMOD Conf., pages 691--706, 2015.
[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.
[35]
H. Lim, M. Kaminsky, and D. G. Andersen. Cicada: Dependably fast multi-core in-memory transactions. In SIGMOD Conf., pages 21--35, 2017.
[36]
Y. Mao, E. Kohler, and R. T. Morris. Cache Craftiness for Fast Multicore Key-Value Storage. In EuroSys, pages 183--196, 2012.
[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.
[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.
[39]
T. Morzy. The Correctness of Concurrency Control for Multiversion Database Systems with Limited Number of Versions. In ICDE, pages 595--604, 1993.
[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.
[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.
[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.
[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.
[44]
G. Prasaad, A. Cheung, and D. Suciu. Handling Highly Contended OLTP Workloads Using Fast Dynamic Partitioning. In SIGMOD Conf., pages 527--542, 2020.
[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.
[46]
M. L. Scott and W. N. Scherer. Scalable Queue-based Spin Locks with Timeout. In SIGPLAN Notices, volume 36, pages 44--52, 2001.
[47]
Y. Sheng, A. Tomasic, T. Zhang, and A. Pavlo. Scheduling OLTP Transactions via Learned Abort Prediction. In aiDM, 2019.
[48]
R. E. Stearns and D. J. Rosenkrantz. Distributed Database Concurrency Controls Using Before-Values. In SIGMOD Conf., pages 74--83, 1981.
[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.
[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.
[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.
[52]
R. H. Thomas. A Majority Consensus Approach to Concurrency Control for Multiple Copy Databases. ACM TODS, 4(2):180--209, 1979.
[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.
[54]
C. Wang, K. Huang, and X. Qian. A Comprehensive Evaluation of RDMA-enabled Concurrency Control Protocols. http://arxiv.org/abs/2002.12664, 2020.
[55]
T. Wang, R. Johnson, A. Fekete, and I. Pandis. The Serial Safety Net: Efficient Concurrency Control on Modern Hardware. In DaMoN, 2015.
[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.
[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.
[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.
[59]
G. Weikum and G. Vossen. Transactional Information Systems. Elsevier, 2001.
[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.
[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.
[62]
Y. Wu and K.-L. Tan. Scalable In-Memory Transaction Processing with HTM. In ATC, pages 365--377, 2016.
[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.
[64]
X. Yu, A. Pavlo, D. Sanchez, and S. Devadas. Tictoc: Time Traveling Optimistic Concurrency Control. In SIGMOD Conf., pages 1629--1642, 2016.
[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.

Cited By

View all

Recommendations

Comments

Information & Contributors

Information

Published In

cover image Proceedings of the VLDB Endowment
Proceedings of the VLDB Endowment  Volume 13, Issue 13
September 2020
100 pages
ISSN:2150-8097
Issue’s Table of Contents

Publisher

VLDB Endowment

Publication History

Published: 01 September 2020
Published in PVLDB Volume 13, Issue 13

Qualifiers

  • Research-article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)61
  • Downloads (Last 6 weeks)6
Reflects downloads up to 03 Jan 2025

Other Metrics

Citations

Cited By

View all

View Options

Login options

Full Access

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media