Understanding, modeling, and improving main-memory database performance

textabstractDuring the last two decades, computer hardware has experienced remarkable developments. Especially CPU (clock-)speed has been following Moore's Law, i.e., doubling every 18 months; and there is no indication that this trend will change in the foreseeable future. Recent research has revealed that database performance, even with main-memory based systems, can hardly benefit from the ever increasing CPU power. The reason for this is that the performance of other hardware components has not been increasing at the same rate as CPU speed. While memory bandwidth has been growing steadily, memory latency has hardly changed. Thus, random memory access has become a major bottleneck for database query processing. This thesis analyzes the impact of modern hardware on main-memory database performance and develops new techniques to better exploit the available hardware resources. Using simple benchmarks, we show that --- unless special care is taken --- database algorithms can spend up to 90% of their time waiting for memory. Exhaustive experiments reveal that memory access is a major bottleneck for database performance on almost any hardware platform, ranging from small of-the-shelf PCs to large high-performance servers. The insight gained allows us to design detailed cost models to predict the performance behavior of database algorithms by estimating the number of performance-relevant events, such as cache misses and TLB misses, and scoring them by their respective cost, i.e., their latency. Focusing on joins, we develop new cache-conscious algorithms. The main idea is to restrict random data access to data that fits into the (smallest) CPU cache. Our cost models allow us to automatically tune our algorithms to achieve optimal performance on various hardware platforms. Further analysis shows that even with minimized memory access costs, database algorithms cannot exploit the full potential of modern super-scaler CPUs. We discuss various implementation techniques to improve the efficiency.

[1]  Mikal Ziane,et al.  Parallel query processing in DBS3 , 1993, [1993] Proceedings of the Second International Conference on Parallel and Distributed Information Systems.

[2]  Jeffrey F. Naughton,et al.  Selectivity and Cost Estimation for Joins Based on Random Sampling , 1996, J. Comput. Syst. Sci..

[3]  Yossi Matias,et al.  DIMACS Series in Discrete Mathematicsand Theoretical Computer Science Synopsis Data Structures for Massive Data , 2007 .

[4]  Surajit Chaudhuri,et al.  Self-tuning histograms: building histograms without looking at data , 1999, SIGMOD '99.

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

[6]  Martin L. Kersten,et al.  MIL primitives for querying a fragmented world , 1999, The VLDB Journal.

[7]  Roelof van Zwol Modelling and searching web-based document collections , 2002 .

[8]  Naphtali Rishe,et al.  An instant and accurate size estimation method for joins and selections in a retrieval-intensive environment , 1993, SIGMOD '93.

[9]  Jeffrey Scott Vitter,et al.  Wavelet-based histograms for selectivity estimation , 1998, SIGMOD '98.

[10]  S. Sudarshan,et al.  Distributed Multi-Level Recovery in Main-Memory Databases , 1996, Fourth International Conference on Parallel and Distributed Information Systems.

[11]  Tore Risch,et al.  Query processing over object views of relational data , 1997, The VLDB Journal.

[12]  J.S.J.H. Penders,et al.  The practical art of moving physical objects , 1999 .

[13]  Nes UvA-DARE ( Digital Academic Repository ) Image database management systems design considerations algorithms and architecture , 2007 .

[14]  Ravi Krishnamurthy,et al.  Query optimization in a memory-resident domain relational calculus database system , 1990, TODS.

[15]  A. N. Wilschut Parallel Query Execution In A Main-Memory Database System , 1993 .

[16]  Martin L. Kersten,et al.  Optimizing database architecture for the new bottleneck: memory access , 2000, The VLDB Journal.

[17]  Yossi Matias,et al.  Fast incremental maintenance of approximate histograms , 1997, TODS.

[18]  Yannis E. Ioannidis,et al.  Universality of Serial Histograms , 1993, VLDB.

[19]  B. Hamber Publications , 1998, Weed Technology.

[20]  K. Selçuk Candan,et al.  Query caching and optimization in distributed mediator systems , 1996, SIGMOD '96.

[21]  ZhaoHui Tang,et al.  Calibrating the Query Optimizer Cost Model of IRO-DB, an Object-Oriented Federated Database System , 1996, VLDB.

[22]  H. Boral,et al.  Database Machines Sixth International Workshop, IWDM '89 , 1989 .

[23]  Jacob Lenting Informed gambling : conception and analysis of a multi-agent mechanism for discrete reallocation , 1999 .

[24]  Larry Kerschberg,et al.  A Detailed Database Statistics Model for Realtional Query Optimization , 1985 .

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

[26]  Paul W. P. J. Grefen,et al.  PRISMA/DB: A Parallel Main Memory Relational DBMS , 1992, IEEE Trans. Knowl. Data Eng..

[27]  A. Schmidt,et al.  Processing XML in Database Systems , 2002 .

[28]  Hongjun Lu,et al.  Hash-Based Join Algorithms for Multiprocessor Computers , 1990, VLDB.

[29]  Stefan Manegold,et al.  Load Balanced Query Evaluation in Shared-Everything Environments , 1997, Euro-Par.

[30]  P.J. Haas,et al.  Sampling-based selectivity estimation for joins using augmented frequent value statistics , 1995, Proceedings of the Eleventh International Conference on Data Engineering.

[31]  Sally A. McKee,et al.  Smarter Memory: Improving Bandwidth for Streamed References , 1998, Computer.

[32]  David A. Patterson,et al.  Performance characterization of a Quad Pentium Pro SMP using OLTP workloads , 1998, ISCA.

[33]  S. Sudarshan,et al.  Dalí: A High Performance Main Memory Storage Manager , 1994, VLDB.

[34]  Michael Stonebraker,et al.  The Asilomar report on database research , 1998, SGMD.

[35]  Patrick Valduriez,et al.  Join indices , 1987, TODS.

[36]  Jeffrey F. Naughton,et al.  Practical selectivity estimation through adaptive sampling , 1990, SIGMOD '90.

[37]  Jaideep Srivastava,et al.  Optimizing multi-joint queries in parallel relational databases , 1993, [1993] Proceedings of the Second International Conference on Parallel and Distributed Information Systems.

[38]  Goetz Graefe,et al.  Query evaluation techniques for large databases , 1993, CSUR.

[39]  Myra Spiliopoulou,et al.  A Cost Model for the Estimation Query Execution Time in a Parallel Environment Supporting Pipeline , 1996, Comput. Artif. Intell..

[40]  Michael J. Carey,et al.  Query processing in main memory database management systems , 1986, SIGMOD '86.

[41]  Martin L. Kersten,et al.  Macro- and Micro-parallelism in a DBMS , 2001, Euro-Par.

[42]  VitterJeffrey Scott,et al.  Approximate computation of multidimensional aggregates of sparse data using wavelets , 1999 .

[43]  Martin L. Kersten,et al.  What Happens During a Join? Dissecting CPU and Memory Optimization Effects , 2000, VLDB.

[44]  Martin L. Kersten,et al.  Calibration of a DBMS Cost Model with the Software Testpilot , 1995, CISMOD.

[45]  Surajit Chaudhuri,et al.  An overview of query optimization in relational systems , 1998, PODS.

[46]  Stefan Manegold,et al.  Transparent Parallelism in Query Execution , 1998 .

[47]  David Spelt,et al.  Verification Support for Object Database Design , 1999 .

[48]  Luiz André Barroso,et al.  Memory system characterization of commercial workloads , 1998, ISCA.

[49]  Guy M. Lohman,et al.  Index scans using a finite LRU buffer: a validated I/O model , 1989, ACM Trans. Database Syst..

[50]  S. J. Karlsson Scalable distributed data structures for database management , 2000 .

[51]  Margaret H. Eich,et al.  Main memory database research directions , 1989 .

[52]  S. Sudarshan,et al.  Distributed Multi-Level Recovery in Main-Memory Databases , 2004, Distributed and Parallel Databases.

[53]  Giovanni Maria Sacco,et al.  Buffer management in relational database systems , 1986, TODS.

[54]  Evan Dekker Conferences and workshops , 1980 .

[55]  Kyuseok Shim,et al.  Approximate query processing using wavelets , 2001, The VLDB Journal.

[56]  Stavros Christodoulakis,et al.  On the propagation of errors in the size of join results , 1991, SIGMOD '91.

[57]  Patrick Valduriez,et al.  On the Effectiveness of Optimization Search Strategies for Parallel Execution Spaces , 1993, VLDB.

[58]  Serge Abiteboul,et al.  Foundations of Databases , 1994 .

[59]  Giovanni Maria Sacco Index Access with a Finite Buffer , 1987, VLDB.

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

[61]  Jacco van Ossenbruggen,et al.  Processing structured hypermedia - a matter of style , 2001, SIKS dissertation series.

[62]  Michael J. Carey,et al.  A Study of Index Structures for a Main Memory Database Management System , 1986, HPTS.

[63]  Peter Fankhauser,et al.  Federating object-oriented and relational databases: the IRO-DB experience , 1997, Proceedings of CoopIS 97: 2nd IFCIS Conference on Cooperative Information Systems.

[64]  S. Turner,et al.  Performance Analysis Using the MIPS R10000 Performance Counters , 1996, Proceedings of the 1996 ACM/IEEE Conference on Supercomputing.

[65]  Abraham Silberschatz,et al.  Database Systems Concepts , 1997 .

[66]  Stavros Christodoulakis,et al.  Optimal histograms for limiting worst-case error propagation in the size of join results , 1993, TODS.

[67]  Weimin Du,et al.  Query Optimization in a Heterogeneous DBMS , 1992, VLDB.

[68]  Martin L. Kersten,et al.  Generic Database Cost Models for Hierarchical Memory Systems , 2002, VLDB.

[69]  Qiang Zhu,et al.  Building regression cost models for multidatabase systems , 1996, Fourth International Conference on Parallel and Distributed Information Systems.

[70]  Veerle Coupé,et al.  Sensitivity Analysis of Decision-Theoretic Networks , 2000 .

[71]  Kian-Lee Tan,et al.  Multi-Join Optimization for Symmetric Multiprocessors , 1993, VLDB.

[72]  Peter A. Boncz,et al.  The Drill Down Benchmark , 1998, VLDB.

[73]  Jennifer Widom,et al.  Database Systems: The Complete Book , 2001 .

[74]  Guy M. Lohman,et al.  Query Optimization in the IBM DB2 Family. , 1993 .

[75]  Stefan Manegold,et al.  Integrating I/O processing and transparent parallelism: toward comprehensive query execution in parallel database systems , 1999 .

[76]  Gennady Antoshenkov,et al.  Random Sampling from Pseudo-Ranked B+ Trees , 1992, VLDB.

[77]  F. Waas Principles of probabilistic query optimization , 2000 .

[78]  Josep Torrellas,et al.  The memory performance of DSS commercial workloads in shared-memory multiprocessors , 1997, Proceedings Third International Symposium on High-Performance Computer Architecture.

[79]  Bernhard Seeger,et al.  A comparison of selectivity estimators for range queries on metric attributes , 1999, SIGMOD '99.

[80]  Donald Ervin Knuth,et al.  The Art of Computer Programming , 1968 .

[81]  Robert Kooi,et al.  The Optimization of Queries in Relational Databases , 1980 .

[82]  Hector Garcia-Molina,et al.  Main Memory Database Systems: An Overview , 1992, IEEE Trans. Knowl. Data Eng..

[83]  R. V. D. Pol Knowledge-based query formulation in information retrieval , 2000 .

[84]  Yossi Matias,et al.  Bifocal sampling for skew-resistant join size estimation , 1996, SIGMOD '96.

[85]  Peter J. Haas,et al.  Sequential sampling procedures for query size estimation , 1992, SIGMOD '92.

[86]  S.P.C. Schonhage,et al.  DIVA Architectural Perspectives on Information Visualization , 2001 .

[87]  Juan Roberto Castelo Valdueza,et al.  The Discrete Acyclic Digraph Markov Model in Data Mining , 2002 .

[88]  Guido Moerkotte,et al.  On the Complexity of Generating Optimal Left-Deep Processing Trees with Cross Products , 1995, ICDT.

[89]  Yannis E. Ioannidis,et al.  Balancing histogram optimality and practicality for query result size estimation , 1995, SIGMOD '95.

[90]  Peter Boncz,et al.  Monet: An Impressionist Sketch of an Advanced Database System , 1994 .

[91]  Mikael Ronström,et al.  Design and Modelling of a Parallel Data Server for Telecom Applications , 2004 .

[92]  Doron Rotem,et al.  Simple Random Sampling from Relational Databases , 1986, VLDB.

[93]  G.E. Moore,et al.  Cramming More Components Onto Integrated Circuits , 1998, Proceedings of the IEEE.

[94]  Don S. Batory,et al.  On searching transposed files , 1978, ACM Trans. Database Syst..

[95]  Myra Spiliopoulou,et al.  Modelling Resource Utilization in Pipelined Query Execution , 1996, Euro-Par, Vol. I.

[96]  Kenneth A. Ross,et al.  Cache Conscious Indexing for Decision-Support in Main Memory , 1999, VLDB.

[97]  Willem-Jan van den Heuvel Integrating modern business applications with objectified legacy systems , 2002 .

[98]  Hongjun Lu,et al.  Optimization of Multi-Way Join Queries for Parallel Execution , 1991, VLDB.

[99]  S. Manegold,et al.  Data Threaded Query Evaluation in Shared-EverythingEnvironments , 1996 .

[100]  Roger King,et al.  A model of data distribution based on texture analysis , 1985, SIGMOD '85.

[101]  Guido Moerkotte,et al.  On the complexity of generating optimal plans with cross products (extended abstract) , 1997, PODS '97.

[102]  Stanley Y. W. Su,et al.  Database computers : principles, architectures, and techniques , 1988 .

[103]  Per-Åke Larson,et al.  A query sampling method for estimating local cost parameters in a multidatabase system , 1994, Proceedings of 1994 IEEE 10th International Conference on Data Engineering.

[104]  Times-Ten Team,et al.  In-memory data management for consumer transactions the timesten approach , 1999, SIGMOD '99.

[105]  Martin L. Kersten,et al.  A Multi-query Optimizer for Monet , 2000, BNCOD.

[106]  L. Mommers,et al.  Applied legal epistemology. Building a knowledge-based ontology of the legal domain , 2002 .

[107]  P.H.G. van Langen,et al.  The Anatomy of Design: Foundations, Models and Applications , 2002 .

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

[109]  F. J. Wiesman,et al.  Information retrieval by graphically browsing meta-information , 1998 .

[110]  Sridhar Ramaswamy,et al.  Join synopses for approximate query answering , 1999, SIGMOD '99.

[111]  I. Olkin,et al.  Inequalities: Theory of Majorization and Its Applications , 1980 .

[112]  Christoforos E. Kozyrakis,et al.  A case for intelligent RAM , 1997, IEEE Micro.

[113]  Kenneth C. Yeager The Mips R10000 superscalar microprocessor , 1996, IEEE Micro.

[114]  Gerhard Weikum,et al.  Combining Histograms and Parametric Curve Fitting for Feedback-Driven Query Result-size Estimation , 1999, VLDB.

[115]  Wei Sun,et al.  An evaluation of sampling-based size estimation methods for selections in database systems , 1995, Proceedings of the Eleventh International Conference on Data Engineering.

[116]  Sumit Ganguly,et al.  Query optimization for parallel execution , 1992, SIGMOD '92.

[117]  Nick Roussopoulos,et al.  Adaptive selectivity estimation using query feedback , 1994, SIGMOD '94.

[118]  Kyu-Young Whang,et al.  Approximating the number of unique values of an attribute without sorting , 1987, Inf. Syst..

[119]  S. Sudarshan,et al.  Recovering from Main-Memory Lapses , 1993, VLDB.

[120]  Stavros Christodoulakis,et al.  Implications of certain assumptions in database performance evauation , 1984, TODS.

[121]  Torsten Suel,et al.  Optimal Histograms with Quality Guarantees , 1998, VLDB.

[122]  Stefan Manegold,et al.  Thinking Big in a Small World - Efficient Query Execution on Small-scale SMPs , 1998 .

[123]  Jeffrey F. Naughton,et al.  Sampling Issues in Parallel Database Systems , 1992, EDBT.

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

[125]  Eugueni Smirnov,et al.  Conjunctive and Disjunctive Version Spaces with Instance-based Boundary Sets , 2001 .

[126]  Margaret H. Eich A classification and comparison of main memory database recovery techniques , 1987, 1987 IEEE Third International Conference on Data Engineering.

[127]  Guy M. Lohman,et al.  R* optimizer validation and performance evaluation for local queries , 1986, SIGMOD '86.

[128]  S. Sudarshan,et al.  DataBlitz storage manager: main-memory database performance for critical applications , 1999, SIGMOD '99.

[129]  Gregory Piatetsky-Shapiro,et al.  Accurate estimation of the number of tuples satisfying a condition , 1984, SIGMOD '84.

[130]  Jeffrey F. Naughton,et al.  Storage Estimation for Multidimensional Aggregates in the Presence of Hierarchies , 1996, VLDB.

[131]  Ans A. G. Steuten A contribution to the linguistic analysis of business conversations within the language/action perspective , 1998 .

[132]  Alan Jay Smith,et al.  Evaluating Associativity in CPU Caches , 1989, IEEE Trans. Computers.

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

[134]  David J. DeWitt,et al.  Equi-depth multidimensional histograms , 1988, SIGMOD '88.

[135]  Martin L. Kersten Using Logarithmic Code-Expansion to Speedup Index Access and Maintenance , 1989, FODO.

[136]  H Hongjing Wu,et al.  A reference architecture for adaptive hypermedia applications , 2002 .

[137]  Rik Eshuis,et al.  Semantics and Verification of UML Activity Diagrams for Workflow Modelling , 2002 .

[138]  Stavros Christodoulakis,et al.  Estimating block transfers and join sizes , 1983, SIGMOD '83.

[139]  Peter J. Haas,et al.  Improved histograms for selectivity estimation of range predicates , 1996, SIGMOD '96.

[140]  Jaap Gordijn,et al.  Value-based requirements engineering: exploring innovative e-commerce ideas , 2003, Requirements Engineering.

[141]  Kenneth A. Ross,et al.  Making B+-Trees Cache Conscious in Main Memory , 2000, SIGMOD Conference.

[142]  P.A.T. van Eck,et al.  A Compositional Semantic Structure for Multi-Agent Systems Dynamics , 2001 .

[143]  Erol Gelenbe,et al.  The Size of Projections of Relations Satisfying a Functional Dependency , 1982, VLDB.

[144]  Yannis E. Ioannidis,et al.  Approximate Query Answering using Histograms , 1999, IEEE Data Eng. Bull..

[145]  Viswanath Poosala Histogram-Based Estimation Techniques in Database Systems , 1997 .

[146]  Stefan Manegold,et al.  In Quest of the Bottleneck - Monitoring Parallel Database Systems , 1997, PVM/MPI.

[147]  Todd C. Mowry,et al.  Tolerating latency through software-controlled data prefetching , 1994 .

[148]  W.C.A. Wijngaards,et al.  Agent-Based Modelling of Dynamics: Biological and Organisational Applications , 2002 .

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

[150]  David B. Lomet,et al.  AlphaSort: a RISC machine sort , 1994, SIGMOD '94.

[151]  Scott A. Mahlke,et al.  Integrated predicated and speculative execution in the IMPACT EPIC architecture , 1998, ISCA.

[152]  Rajeev Motwani,et al.  On random sampling over joins , 1999, SIGMOD '99.

[153]  Martin L. Kersten,et al.  Design and Implementation of a DBMS Performance Assessment Tool , 1993, DEXA.

[154]  Per-Åke Larson,et al.  Developing Regression Cost Models for Multidatabase Systems. , 1996 .

[155]  M. Sloof,et al.  Physiology of Quality Change Modelling. Automated modelling of quality change of agricultural products , 1999 .

[156]  S. Sudarshan,et al.  DataBlitz: A High Performance Main-Memory Storage Manager , 1994, VLDB.

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

[158]  Esen A. Ozkarahan Database machines and database management , 1986 .

[159]  Gerhard Weikum,et al.  Auto-Tuned Spline Synopses for Database Statistics Management , 2000 .

[160]  Patricia G. Selinger,et al.  Access path selection in a relational database management system , 1979, SIGMOD '79.

[161]  Marie-Anne Neimat,et al.  Cost Model Development for a Main Memory Database System , 1997 .

[162]  Sakti Pramanik,et al.  Fast search in main memory databases , 1992, SIGMOD '92.

[163]  Rajeev Motwani,et al.  Random sampling for histogram construction: how much is enough? , 1998, SIGMOD '98.

[164]  Deok-Hwan Kim,et al.  Multi-dimensional selectivity estimation using compressed histogram information , 1999, SIGMOD '99.

[165]  Koen V. Hindriks,et al.  Agent programming languages: programming with mental models , 2001 .

[166]  C.M.T. Metselaar,et al.  Sociaal-organisatorische gevolgen van kennistechnologie : een procesbenadering en actorperspectief , 2000 .

[167]  Yossi Matias,et al.  New sampling-based summary statistics for improving approximate query answers , 1998, SIGMOD '98.

[168]  Stefan Manegold,et al.  Efficient Resource Utilization in Shared-Everything Environments , 1998, IADT.

[169]  Toshihide Ibaraki,et al.  On the optimal nesting order for computing N-relational joins , 1984, TODS.

[170]  Kenneth C. Sevcik,et al.  A buffer management model for use in predicting overall database system performance , 1989, [1989] Proceedings. Fifth International Conference on Data Engineering.

[171]  Martin L. Kersten,et al.  Research and Business Challenges in Data Mining Technology , 1997, BTW.

[172]  Martin L. Kersten,et al.  Integrated querying of XML data in RDBMSs , 2003, SAC '03.

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

[174]  Yannis E. Ioannidis,et al.  Histogram-Based Approximation of Set-Valued Query-Answers , 1999, VLDB.

[175]  Wietske de Vries,et al.  Agent interaction: abstract approaches to modelling, programming and verifying multi-agent systems , 2002 .

[176]  Jeffrey Scott Vitter,et al.  Approximate computation of multidimensional aggregates of sparse data using wavelets , 1999, SIGMOD '99.

[177]  S. Renooij Qualitative approaches to quantifying probabilistic networks , 2001 .

[178]  Per-Åke Larson,et al.  Solving Local Cost Estimation Problem for Global Query Optimization in Multidatabase Systems , 1998, Distributed and Parallel Databases.

[179]  Ki Hong Kim,et al.  Xmas: an extensible main-memory storage system for high-performance applications , 1998, SIGMOD '98.

[180]  G. de Haan,et al.  ETAG, A Formal Model of Competence Knowledge for User Interface Design , 2000 .

[181]  Philippe Flajolet,et al.  Probabilistic Counting Algorithms for Data Base Applications , 1985, J. Comput. Syst. Sci..

[182]  Michael L. Heytens,et al.  NonStop SQL/MX primitives for knowledge discovery , 1999, KDD '99.