Optimizing database architecture for the new bottleneck: memory access

Abstract. In the past decade, advances in the speed of commodity CPUs have far out-paced advances in memory latency. Main-memory access is therefore increasingly a performance bottleneck for many computer applications, including database systems. In this article, we use a simple scan test to show the severe impact of this bottleneck. The insights gained are translated into guidelines for database architecture, in terms of both data structures and algorithms. We discuss how vertically fragmented data structures optimize cache performance on sequential data access. We then focus on equi-join, typically a random-access operation, and introduce radix algorithms for partitioned hash-join. The performance of these algorithms is quantified using a detailed analytical model that incorporates memory access cost. Experiments that validate this model were performed on the Monet database system. We obtained exact statistics on events such as TLB misses and L1 and L2 cache misses by using hardware performance counters found in modern CPUs. Using our cost model, we show how the carefully tuned memory access pattern of our radix algorithms makes them perform well, which is confirmed by experimental results.

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

[2]  David Thomas,et al.  The Art in Computer Programming , 2001 .

[3]  Martin L. Kersten,et al.  Flattening an object algebra to provide performance , 1998, Proceedings 14th International Conference on Data Engineering.

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

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

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

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

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

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

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

[11]  Martin L. Kersten,et al.  Monet And Its Geographic Extensions: A Novel Approach to High Performance GIS Processing , 1996, EDBT.

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

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

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

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

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

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

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