Critical sections: re-emerging scalability concerns for database storage engines

Critical sections in database storage engines impact performance and scalability more as the number of hardware contexts per chip continues to grow exponentially. With enough threads in the system, some critical section will eventually become a bottleneck. While algorithmic changes are the only long-term solution, they tend to be complex and costly to develop. Meanwhile, changes in enforcement of critical sections require much less effort. We observe that, in practice, many critical sections are so short that enforcing them contributes a significant or even dominating fraction of their total cost and tuning them directly improves database system performance. The contribution of this paper is two-fold: we (a) make a thorough performance comparison of the various synchronization primitives in the database system developer's toolbox and highlight the best ones for practical use, and (b) show that properly enforcing critical sections can delay the need to make algorithmic changes for a target number of processors.

[1]  Kunle Olukotun,et al.  Niagara: a 32-way multithreaded Sparc processor , 2005, IEEE Micro.

[2]  Maged M. Michael,et al.  High performance dynamic lock-free hash tables and list-based sets , 2002, SPAA '02.

[3]  Anastasia Ailamaki,et al.  Improving hash join performance through prefetching , 2004, Proceedings. 20th International Conference on Data Engineering.

[4]  Christian S. Jensen,et al.  Join operations in temporal databases , 2005, The VLDB Journal.

[5]  Goetz Graefe,et al.  The five-minute rule twenty years later, and how flash memory changes the rules , 2007, DaMoN '07.

[6]  Martin L. Kersten,et al.  Database Architecture Optimized for the New Bottleneck: Memory Access , 1999, VLDB.

[7]  Devavrat Shah,et al.  Fast Updating Algorithms for TCAMs , 2001, IEEE Micro.

[8]  Maurice Herlihy,et al.  Wait-free synchronization , 1991, TOPL.

[9]  Babak Falsafi,et al.  Accelerating database operators using a network processor , 2005, DaMoN '05.

[10]  David B. Lomet,et al.  The performance of a multiversion access method , 1990, SIGMOD '90.

[11]  Erik D. Demaine,et al.  Frequency Estimation of Internet Packet Streams with Limited Space , 2002, ESA.

[12]  David J. DeWitt,et al.  DBMSs on a Modern Processor: Where Does Time Go? , 1999, VLDB.

[13]  Kenneth A. Ross,et al.  Improving Database Performance on Simultaneous Multithreading Processors , 2005, VLDB.

[14]  David P. Reed,et al.  Synchronization with eventcounts and sequencers , 1979, CACM.

[15]  Daniel J. Abadi,et al.  Column Stores for Wide and Sparse Data , 2007, CIDR.

[16]  Michael L. Scott,et al.  Scalable reader-writer synchronization for shared-memory multiprocessors , 1991, PPOPP '91.

[17]  Marcin Zukowski,et al.  Super-Scalar RAM-CPU Cache Compression , 2006, 22nd International Conference on Data Engineering (ICDE'06).

[18]  Martin L. Kersten,et al.  Optimizing Main-Memory Join on Modern Hardware , 2002, IEEE Trans. Knowl. Data Eng..

[19]  Erik Hagersten,et al.  Queue locks on cache coherent multiprocessors , 1994, Proceedings of 8th International Parallel Processing Symposium.

[20]  Daniel J. Abadi,et al.  Column-stores vs. row-stores: how different are they really? , 2008, SIGMOD Conference.

[21]  Marcin Zukowski,et al.  MonetDB/X100: Hyper-Pipelining Query Execution , 2005, CIDR.

[22]  Hidehiko Tanaka,et al.  Application of hash to data base machine and its architecture , 1983, New Generation Computing.

[23]  Kenneth A. Ross,et al.  Parallel buffers for chip multiprocessors , 2007, DaMoN '07.

[24]  Anastasia Ailamaki,et al.  Clotho: Decoupling memory page layout from storage organization , 2004, VLDB.

[25]  David J. DeWitt,et al.  Shoring up persistent applications , 1994, SIGMOD '94.

[26]  Bingsheng He,et al.  GPUQP: query co-processing using graphics processors , 2007, SIGMOD '07.

[27]  Rina Panigrahy,et al.  Finding Frequent Elements in Non-bursty Streams , 2007, ESA.

[28]  David J. DeWitt,et al.  Parallel sorting on a shared-nothing architecture using probabilistic splitting , 1991, [1991] Proceedings of the First International Conference on Parallel and Distributed Information Systems.

[29]  Trevor N. Mudge,et al.  FlashCache: a NAND flash memory file cache for low power web servers , 2006, CASES '06.

[30]  Divyakant Agrawal,et al.  An integrated efficient solution for computing frequent and top-k elements in data streams , 2006, TODS.

[31]  Setrag Khoshafian,et al.  A decomposition storage model , 1985, SIGMOD Conference.

[32]  Marcin Zukowski,et al.  Architecture-conscious hashing , 2006, DaMoN '06.

[33]  Geneviève Jomier,et al.  Indexing multiversion databases , 2007, CIKM '07.

[34]  Michael Stonebraker,et al.  Implementation techniques for main memory database systems , 1984, SIGMOD '84.

[35]  Eda Baykan,et al.  Recent Research on Database System Performance , 2005 .

[36]  Jignesh M. Patel,et al.  Data Morphing: An Adaptive, Cache-Conscious Storage Technique , 2003, VLDB.

[37]  Miron Livny,et al.  Concurrency control performance modeling: alternatives and implications , 1987, TODS.

[38]  Ramesh C. Agarwal,et al.  Block oriented processing of relational database operations in modern computer architectures , 2001, Proceedings 17th International Conference on Data Engineering.

[39]  Bernhard Seeger,et al.  Efficient temporal join processing using indices , 2002, Proceedings 18th International Conference on Data Engineering.

[40]  Dawn Xiaodong Song,et al.  New Streaming Algorithms for Fast Detection of Superspreaders , 2005, NDSS.

[41]  Divyakant Agrawal,et al.  Fast data stream algorithms using associative memories , 2007, SIGMOD '07.

[42]  David J. DeWitt,et al.  A Comparison of C-Store and Row-Store in a Common Framework , 2006 .

[43]  Kenneth A. Ross,et al.  Adaptive Aggregation on Chip Multiprocessors , 2007, VLDB.

[44]  Kyriakos Mouratidis,et al.  Continuous monitoring of top-k queries over sliding windows , 2006, SIGMOD Conference.

[45]  William N. Scherer,et al.  Preemption Adaptivity in Time-Published Queue-Based Spin Locks , 2005, HiPC.

[46]  W. Paul,et al.  Computer Architecture , 2000, Springer Berlin Heidelberg.

[47]  Sven Helmer,et al.  The implementation and performance of compressed databases , 2000, SGMD.

[48]  Yufei Tao,et al.  Cost models for overlapping and multiversion structures , 2002, TODS.

[49]  Thomas E. Anderson,et al.  The Performance of Spin Lock Alternatives for Shared-Memory Multiprocessors , 1990, IEEE Trans. Parallel Distributed Syst..

[50]  Michael J. Fischer,et al.  Finding a Majority Among N Votes. , 1982 .

[51]  James R. Goodman,et al.  Speculative lock elision: enabling highly concurrent multithreaded execution , 2001, MICRO.

[52]  Kenneth A. Ross,et al.  A multi-resolution block storage model for database design , 2003, Seventh International Database Engineering and Applications Symposium, 2003. Proceedings..

[53]  Daniel J. Abadi,et al.  Integrating compression and execution in column-oriented database systems , 2006, SIGMOD Conference.

[54]  Babak Falsafi,et al.  Database Servers on Chip Multiprocessors: Limitations and Opportunities , 2007, CIDR.

[55]  Michael L. Scott,et al.  Algorithms for scalable synchronization on shared-memory multiprocessors , 1991, TOCS.

[56]  Tobin J. Lehman,et al.  Locking and Latching in a Memory-Resident Database System , 1992, VLDB.

[57]  Maurice Herlihy,et al.  Transactional Memory: Architectural Support For Lock-free Data Structures , 1993, Proceedings of the 20th Annual International Symposium on Computer Architecture.

[58]  Traviss. Craig,et al.  Building FIFO and Priority-Queuing Spin Locks from Atomic Swap , 1993 .

[59]  Sang-Won Lee,et al.  Design of flash-based DBMS: an in-page logging approach , 2007, SIGMOD '07.

[60]  John T. Robinson A fast general-purpose hardware synchronization mechanism , 1985, SIGMOD '85.

[61]  Jeffrey F. Naughton,et al.  Cache Conscious Algorithms for Relational Query Processing , 1994, VLDB.

[62]  Christoforos E. Kozyrakis,et al.  JouleSort: a balanced energy-efficiency benchmark , 2007, SIGMOD '07.

[63]  James R. Goodman,et al.  Transactional lock-free execution of lock-based programs , 2002, ASPLOS X.

[64]  Naoki Abe,et al.  Using secure coprocessors for privacy preserving collaborative data mining and analysis , 2006, DaMoN '06.

[65]  Moses Charikar,et al.  Finding frequent items in data streams , 2002, Theor. Comput. Sci..

[66]  Michael Stumm,et al.  A Fair Fast Scalable Rea,der-Writer Lock , 1993, 1993 International Conference on Parallel Processing - ICPP'93.

[67]  Dimitrios Gunopulos,et al.  Ad-hoc Top-k Query Answering for Data Streams , 2007, VLDB.

[68]  Daniel J. Abadi,et al.  Performance tradeoffs in read-optimized databases , 2006, VLDB.

[69]  Christoforos E. Kozyrakis,et al.  Models and Metrics to Enable Energy-Efficiency Optimizations , 2007, Computer.

[70]  Larry Rudolph,et al.  Dynamic decentralized cache schemes for mimd parallel processors , 1984, ISCA '84.

[71]  David J. DeWitt,et al.  Materialization Strategies in a Column-Oriented DBMS , 2007, 2007 IEEE 23rd International Conference on Data Engineering.

[72]  Donovan A. Schneider,et al.  The Gamma Database Machine Project , 1990, IEEE Trans. Knowl. Data Eng..

[73]  Kenneth A. Ross,et al.  Implementing database operations using SIMD instructions , 2002, SIGMOD '02.

[74]  Michael Stonebraker,et al.  The End of an Architectural Era (It's Time for a Complete Rewrite) , 2007, VLDB.

[75]  Ippokratis Pandis,et al.  Shore-MT: A Quest for Scalability in the Many-Core Era , 2008 .

[76]  Kenneth A. Ross,et al.  Fast joins using join indices , 1999, The VLDB Journal.

[77]  Amr El Abbadi,et al.  Hardware Acceleration of Database Operations Using Content-Addressable Memories. , 2005 .

[78]  David J. DeWitt,et al.  Weaving Relations for Cache Performance , 2001, VLDB.

[79]  Eric Ruppert,et al.  Lock-free linked lists and skip lists , 2004, PODC '04.

[80]  Peter Boncz,et al.  UvA-DARE ( Digital Academic Repository ) Monet ; a next-Generation DBMS Kernel For Query-Intensive Applications , 2007 .

[81]  Sanjeev Khanna,et al.  Space-efficient online computation of quantile summaries , 2001, SIGMOD '01.

[82]  Nir Shavit,et al.  Software transactional memory , 1995, PODC '95.

[83]  George Kingsley Zipf,et al.  Human behavior and the principle of least effort , 1949 .

[84]  Kenneth A. Ross,et al.  Buffering Accesses to Memory-Resident Index Structures , 2003, VLDB.

[85]  Marcin Zukowski,et al.  Vectorized data processing on the cell broadband engine , 2007, DaMoN '07.

[86]  Goetz Graefe Parallel external sorting in volcano , 1989 .

[87]  Jim Gray,et al.  The convoy phenomenon , 1979, OPSR.

[88]  Michael Stonebraker,et al.  C-Store: A Column-oriented DBMS , 2005, VLDB.