Cache Conscious Indexing for DecisionSupport in Main Memory - PowerPoint PPT Presentation

1 / 32
About This Presentation
Title:

Cache Conscious Indexing for DecisionSupport in Main Memory

Description:

CSS-trees indices exploit cache behavior to get ... Level CSS-trees have fewer comparisons per node ... Flexibility of CSS-trees across different cache designs ... – PowerPoint PPT presentation

Number of Views:48
Avg rating:3.0/5.0
Slides: 33
Provided by: pradip7
Category:

less

Transcript and Presenter's Notes

Title: Cache Conscious Indexing for DecisionSupport in Main Memory


1
Cache Conscious Indexing for Decision-Support in
Main Memory
  • Pradip Dhara

2
Why In-memory databases
  • Telecommunications
  • CAD tools
  • Moores law will allow us to store relations in
    memory

3
Redesigning DBMSs
  • Optimize memory-cpu performance vs disk-memory
    performance
  • Re-evaluate space/time tradeoff space isnt
    cheap
  • Given certain space requirement, need to optimize
    response time for lookups

4
Indices in In-Memory DBMSs
  • Little extra space vs. Increased performance
  • Index design takes on new dimensions when looking
    at in-memory databases
  • Space overhead can not be ignored hash tables
    are unacceptable

5
Hardware solutions
  • Caches
  • Growing disparity between CPU performance and
    memory performance.
  • Cache misses cant be overlapped

6
Solution
  • CSS-trees indices exploit cache behavior to get
    improved performance

7
Direct Mapped Cache
8
Fully Associative Cache
9
2-Way Set Associative Cache
10
Binary Search on Sorted Array
  • Store the relation in sorted order on a key
  • Cache performance dependent upon tuple size

11
T-trees

12
Enhanced B trees

13
Hash Indices

000

001
010
011
Put however many pairs fit into a
cache line
100
101
110
111
14
Idea Behind CSS-trees
  • Save space by not storing pointers
  • Use an array as a tree
  • Implicitly store pointers as offsets into the
    array

15
Useful Formulas for CSS-trees

n of elements m of elements per node N
of nodes
Children of a node b are nodes b(m1) to b(m1)
(m1)
(EQ 1)
N n m
(EQ 2)
of Internal Nodes
(EQ 3)
First leaf node in bottom level
(EQ 4)
16
How it works

17
Building a full CSS-tree

18
Searching Within a Node

19
Level CSS-trees

m 2t
Entries per node m -1
20
Level vs. Full CSS-trees
  • Level CSS-trees will be deeper due to the
    difference in branching factor
  • Level CSS-trees have fewer comparisons per node
  • Level CSS-trees have more cache accesses and and
    node traversals

21
Time Analysis

22
Space Analysis

23
Experiment
  • Results are for Ultra Sparc II
  • Keys randomly generated integers between 0 and 1
    million
  • Performed 5 tests of 100,00 searches for random
    keys

24
Figure 5a Array Size vs. time

25
Figure 5b Array Size vs. Time

26
Figure 6a Array Size vs. 2nd cache accesses

27
Figure 6b Array Size vs. 2nd cache misses

28
Figure 7 Node Size vs. Time

29
CSS Performance on Other Queries
  • CSS is very good for individual selection queries
  • CSS will probably perform the best in range
    queries
  • Index nested loops join vs. Sort merge join

30
Doubts About CSS
  • Flexibility of CSS-trees across different cache
    designs
  • Any applicability to variable sized records
  • Multiple CSS-tree indices on different keys

31
Conclusion
  • CSS-trees improve searching performance by
    exploiting cache consciousness.

32
One Last Thought
  • Cache designs
  • Should we redesign them to let programmers have
    control?
Write a Comment
User Comments (0)
About PowerShow.com