Generalized Micro-Specialization for Modern DBMS Architectures

Performance considerations are crucial for DBMSes and have led to numerous innovations in DBMS architecture in recent years, including columnar stores, the operator-ata-time execution model, and query compilation. However, there are some sources of runtime overhead that these techniques do not address. Micro-specialization uses information about runtime invariants in DBMS code to dynamically specialize frequently executed code snippets, thereby optimizing away overheads arising from the generic nature of the original DBMS code. However, micro-specialization as originally presented suffers from some shortcomings that limit its applicability. It is limited in the kinds of invariants that it considers and its application to modern architectural features, such as operator-at-a-time model and query compilation, can be problematic. Furthermore, some of the overheads that are eliminated in the original work on micro-specialization of PostgreSQL are also optimized away in columnar store architectures, thereby raising the question of whether the approach can yield comparably significant performance improvements on modern DBMS architectures. Our research generalizes micro-specialization to address these shortcomings. The principal contributions are as follows. First, we introduce the notion of a class of generalized invariants, that enables a much wider variety of optimizations, including many that would not be possible in the original formulation of micro-specialization. Second, we extend traditional micro-specialization to deal with key characteristics of modern DBMS architectures, namely, columnar-store, operator-at-a-time model, and query compilation. Third, we show that the resulting approach of generalized microspecialization is able to obtain significant performance increases on a modern DBMS architecture that are already highly optimized through these three extant approaches.

[1]  Martin L. Kersten,et al.  Breaking the memory wall in MonetDB , 2008, CACM.

[2]  Toshiaki Yasue,et al.  Design, implementation, and evaluation of optimizations in a just-in-time compiler , 1999, JAVA '99.

[3]  Richard T. Snodgrass,et al.  Micro-Specialization in DBMSes , 2012, 2012 IEEE 28th International Conference on Data Engineering.

[4]  Patrick Cousot,et al.  Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints , 1977, POPL.

[5]  Rui Zhang,et al.  Micro-Specialization: Dynamic Code Specialization in DBMSes , 2012 .

[6]  Viktor Leis,et al.  Compiling Database Queries into Machine Code , 2014, IEEE Data Eng. Bull..

[7]  Richard T. Snodgrass,et al.  Micro-specialization: dynamic code specialization of database management systems , 2012, CGO '12.

[8]  Stratis Viglas Just-in-time compilation for SQL query processing , 2014, 2014 IEEE 30th International Conference on Data Engineering.

[9]  Jim Euchner Design , 2014, Catalysis from A to Z.

[10]  Stratis Viglas,et al.  Generating code for holistic query evaluation , 2010, 2010 IEEE 26th International Conference on Data Engineering (ICDE 2010).

[11]  Flemming Nielson,et al.  Principles of Program Analysis , 1999, Springer Berlin Heidelberg.

[12]  Nong Li,et al.  Runtime Code Generation in Cloudera Impala , 2014, IEEE Data Eng. Bull..

[13]  Vasanth Bala,et al.  Dynamo: a transparent dynamic optimization system , 2000, SIGP.

[14]  Richard T. Snodgrass,et al.  Application of Micro-specialization to Query Evaluation Operators , 2012, 2012 IEEE 28th International Conference on Data Engineering Workshops.

[15]  Dorit Nuzman,et al.  JIT technology with C/C++ , 2013, ACM Trans. Archit. Code Optim..

[16]  Craig Freedman,et al.  Compilation in the Microsoft SQL Server Hekaton Engine , 2014, IEEE Data Eng. Bull..