The set-associative cache performance of search trees

We consider the costs of access to data stored in search trees assuming that those memory accesses are managed with a cache. Our cache memory model is two-level, has a small degree of set-associativity, and uses LRU replacement, and we consider the number of cache misses that a set of accesses incurs. For standard tree access--searches and traversals---changing the degree of set-associativity has no effect on performance.To explain this, we develop general stochastic access models, an adaptation of the independent reference model (IRM), and analyze the expected number of cache hits and misses incurred by these types of access. The models and analyses are accurate: we are able to exactly predict the cache performance of tree data structures. In addition, we prove why set-associativity is of little or no benefit for these types of memory access and give examples where direct-mapping performs better than set-associativity.

[1]  Kai Shen,et al.  Adaptive Algorithms for Cache-Efficient Trie Search , 1998, ALENEX.

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

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

[4]  Matteo Frigo,et al.  Cache-oblivious algorithms , 1999, 40th Annual Symposium on Foundations of Computer Science (Cat. No.99CB37039).

[5]  James R. Larus,et al.  Cache-conscious data structures: design and implementation , 1999 .

[6]  Jeffrey Scott Vitter,et al.  External Memory Algorithms: Dealing With Massive Data , 2002 .

[7]  Jeffrey Scott Vitter,et al.  Algorithms for parallel memory, I: Two-level memories , 2005, Algorithmica.

[8]  Boris Klots,et al.  Optimal Partitioning Which Maximizes the Sum of the Weighted Averages , 1995, Oper. Res..

[9]  Richard E. Ladner,et al.  Caches and algorithms , 1996 .

[10]  Peter Sanders Fast Priority Queues for Cached Memory , 1999, ALENEX.

[11]  Richard E. Ladner,et al.  The influence of caches on the performance of heaps , 1996, JEAL.

[12]  Alon Itai,et al.  Optimal Mapping in Direct Mapped Cache Environments , 1992, ISTCS.

[13]  Peter Sanders,et al.  Accessing Multiple Sequences Through Set Associative Caches , 1999, ICALP.

[14]  Shirley Dex,et al.  JR 旅客販売総合システム(マルス)における運用及び管理について , 1991 .

[15]  Jeffrey Scott Vitter,et al.  Algorithms for parallel memory, II: Hierarchical multilevel memories , 1992, Algorithmica.

[16]  Li Xiao,et al.  Improving memory performance of sorting algorithms , 2000, JEAL.

[17]  Chandra Krintz,et al.  Cache-conscious data placement , 1998, ASPLOS VIII.

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

[19]  Alok Aggarwal,et al.  Hierarchical memory with block transfer , 1987, 28th Annual Symposium on Foundations of Computer Science (sfcs 1987).

[20]  Bowen Alpern,et al.  The uniform memory hierarchy model of computation , 2005, Algorithmica.

[21]  James R. Larus,et al.  Cache-conscious structure layout , 1999, PLDI '99.

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

[23]  Richard E. Ladner,et al.  Cache performance analysis of traversals and random accesses , 1999, SODA '99.

[24]  W. Frank King,et al.  Analysis of Demand Paging Algorithms , 1971, IFIP Congress.

[25]  Gururaj S. Rao,et al.  Performance Analysis of Cache Memories , 1978, JACM.

[26]  Richard E. Ladner,et al.  The influence of caches on the performance of sorting , 1997, SODA '97.

[27]  Karl Pettis,et al.  Profile guided code positioning , 1990, PLDI '90.

[28]  Bowen Alpern,et al.  A model for hierarchical memory , 1987, STOC.

[29]  Peter J. Denning,et al.  Operating Systems Theory , 1973 .

[30]  James R. Larus,et al.  Making Pointer-Based Data Structures Cache Conscious , 2000, Computer.

[31]  Sandeep Sen,et al.  Towards a theory of cache-efficient algorithms , 2000, SODA '00.

[32]  James R. Larus,et al.  Using generational garbage collection to implement cache-conscious data placement , 1998, ISMM '98.

[33]  Michael A. Bender,et al.  Cache-oblivious B-trees , 2000, Proceedings 41st Annual Symposium on Foundations of Computer Science.