CoroBase: Coroutine-Oriented Main-Memory Database Engine

Data stalls are a major overhead in main-memory database engines due to the use of pointer-rich data structures. Lightweight coroutines ease the implementation of software prefetching to hide data stalls by overlapping computation and asynchronous data prefetching. Prior solutions, however, mainly focused on (1) individual components and operations and (2) intra-transaction batching that requires interface changes, breaking backward compatibility. It was not clear how they apply to a full database engine and how much end-to-end benefit they bring under various workloads. This paper presents \corobase, a main-memory database engine that tackles these challenges with a new coroutine-to-transaction paradigm. Coroutine-to-transaction models transactions as coroutines and thus enables inter-transaction batching, avoiding application changes but retaining the benefits of prefetching. We show that on a 48-core server, CoroBase can perform close to 2x better for read-intensive workloads and remain competitive for workloads that inherently do not benefit from software prefetching.

[1]  Ippokratis Pandis,et al.  Data-oriented transaction execution , 2010, Proc. VLDB Endow..

[2]  Daniel J. Abadi,et al.  High Performance Transactions via Early Write Visibility , 2017, Proc. VLDB Endow..

[3]  Hideaki Kimura,et al.  FOEDUS: OLTP Engine for a Thousand Cores and NVRAM , 2015, SIGMOD Conference.

[4]  Daniel J. Abadi,et al.  Rethinking serializable multiversion concurrency control , 2014, Proc. VLDB Endow..

[5]  Babak Falsafi,et al.  Meet the walkers accelerating index traversals for in-memory databases , 2013, 2013 46th Annual IEEE/ACM International Symposium on Microarchitecture (MICRO).

[6]  Raghu Ramakrishnan,et al.  Database Management Systems , 1976 .

[7]  Kenneth A. Ross,et al.  Making Updates Disk-I/O Friendly Using SSDs , 2013, Proc. VLDB Endow..

[8]  Gary Valentin,et al.  Fractal prefetching B+-Trees: optimizing both cache and disk performance , 2002, SIGMOD '02.

[9]  Melvin E. Conway,et al.  Design of a separable transition-diagram compiler , 1963, CACM.

[10]  Martin L. Kersten,et al.  MonetDB: Two Decades of Research in Column-oriented Database Architectures , 2012, IEEE Data Eng. Bull..

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

[12]  Anastasia Ailamaki,et al.  Micro-architectural Analysis of In-Memory OLTP , 2015 .

[13]  Kenneth A. Ross,et al.  Rethinking SIMD Vectorization for In-Memory Databases , 2015, SIGMOD Conference.

[14]  Kenneth A. Ross,et al.  Making B+- trees cache conscious in main memory , 2000, SIGMOD '00.

[15]  Xuejun Yang,et al.  Eliminating the call stack to save RAM , 2009, LCTES '09.

[16]  Norman May,et al.  Interleaving with Coroutines: A Practical Approach for Robust Index Joins , 2017, Proc. VLDB Endow..

[17]  Jim Hunter,et al.  Exploiting Coroutines to Attack the "Killer Nanoseconds" , 2018, Proc. VLDB Endow..

[18]  Timothy L. Harris,et al.  A Pragmatic Implementation of Non-blocking Linked-Lists , 2001, DISC.

[19]  Eddie Kohler,et al.  Speedy transactions in multicore in-memory databases , 2013, SOSP.

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

[21]  Anastasia Ailamaki,et al.  Micro-architectural Analysis of OLAP: Limitations and Opportunities , 2020, Proc. VLDB Endow..

[22]  Alfons Kemper,et al.  HyPer: A hybrid OLTP&OLAP main memory database system based on virtual memory snapshots , 2011, 2011 IEEE 27th International Conference on Data Engineering.

[23]  Norman May,et al.  Interleaving with coroutines: a systematic and practical approach to hide memory latency in index joins , 2018, The VLDB Journal.

[24]  Eva Zangerle,et al.  HOT: A Height Optimized Trie Index for Main-Memory Database Systems , 2018, SIGMOD Conference.

[25]  Hyeontaek Lim,et al.  Cicada: Dependably Fast Multi-Core In-Memory Transactions , 2017, SIGMOD Conference.

[26]  Anoop Gupta,et al.  Design and evaluation of a compiler algorithm for prefetching , 1992, ASPLOS V.

[27]  Guangyu Sun,et al.  Path Prefetching: Accelerating Index Searches for In-Memory Databases , 2018, 2018 IEEE 36th International Conference on Computer Design (ICCD).

[28]  Martin L. Kersten,et al.  Database Architecture Evolution: Mammals Flourished long before Dinosaurs became Extinct , 2009, Proc. VLDB Endow..

[29]  Ippokratis Pandis,et al.  Query Fresh: Log Shipping on Steroids , 2017, Proc. VLDB Endow..

[30]  Andrew Pavlo,et al.  An Empirical Evaluation of In-Memory Multi-Version Concurrency Control , 2017, Proc. VLDB Endow..

[31]  Jonathan Walpole,et al.  Performance of memory reclamation for lockless synchronization , 2007, J. Parallel Distributed Comput..

[32]  Babak Falsafi,et al.  Asynchronous Memory Access Chaining , 2015, Proc. VLDB Endow..

[33]  Ippokratis Pandis,et al.  Aether: A Scalable Approach to Logging , 2010, Proc. VLDB Endow..

[34]  Eddie Kohler,et al.  Cache craftiness for fast multicore key-value storage , 2012, EuroSys '12.

[35]  Ippokratis Pandis,et al.  Efficiently making (almost) any concurrency control mechanism serializable , 2016, The VLDB Journal.

[36]  Todd C. Mowry,et al.  Compiler-based prefetching for recursive data structures , 1996, ASPLOS VII.

[37]  Sudipta Sengupta,et al.  High Performance Transactions in Deuteronomy , 2015, CIDR.

[38]  S. B. Yao,et al.  Efficient locking for concurrent operations on B-trees , 1981, TODS.

[39]  Boris Schling The Boost C++ Libraries , 2011 .

[40]  Adam Silberstein,et al.  Benchmarking cloud serving systems with YCSB , 2010, SoCC '10.

[41]  Thomas Würthinger,et al.  An Optimization-Driven Incremental Inline Substitution Algorithm for Just-in-Time Compilers , 2019, 2019 IEEE/ACM International Symposium on Code Generation and Optimization (CGO).

[42]  Viktor Leis,et al.  Everything You Always Wanted to Know About Compiled and Vectorized Queries But Were Afraid to Ask , 2018, Proc. VLDB Endow..

[43]  Chuliang Weng,et al.  Interleaved Multi-Vectorizing , 2019, Proc. VLDB Endow..

[44]  Craig Freedman,et al.  Hekaton: SQL server's memory-optimized OLTP engine , 2013, SIGMOD '13.

[45]  Todd C. Mowry,et al.  Improving index performance through prefetching , 2001, SIGMOD '01.

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

[47]  Marcos Antonio Vaz Salles,et al.  Reactors: A Case for Predictable, Virtualized Actor Database Systems , 2017, SIGMOD Conference.

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

[49]  Viktor Leis,et al.  The adaptive radix tree: ARTful indexing for main-memory databases , 2013, 2013 IEEE 29th International Conference on Data Engineering (ICDE).

[50]  George C. Necula,et al.  CIL: Intermediate Language and Tools for Analysis and Transformation of C Programs , 2002, CC.

[51]  Roberto Ierusalimschy,et al.  Revisiting coroutines , 2009, TOPL.

[52]  Ippokratis Pandis,et al.  ERMIA: Fast Memory-Optimized Database System for Heterogeneous Workloads , 2016, SIGMOD Conference.

[53]  Ismail Oukid,et al.  Bridging the Latency Gap between NVM and DRAM for Latency-bound Operations , 2019, DaMoN.

[54]  Sudipta Sengupta,et al.  The Bw-Tree: A B-tree for new hardware platforms , 2013, 2013 IEEE 29th International Conference on Data Engineering (ICDE).