Hybrid Indexes D a v i d G . A n d e r s e n A n d - - PowerPoint PPT Presentation

hybrid indexes
SMART_READER_LITE
LIVE PREVIEW

Hybrid Indexes D a v i d G . A n d e r s e n A n d - - PowerPoint PPT Presentation

Reducing the Storage Overhead of Main-Memory OLTP Databases with C o - a u t h o r s : Hybrid Indexes D a v i d G . A n d e r s e n A n d r e w P a v l o M i c h a e l K a m i n s k y Huanchen


slide-1
SLIDE 1

Reducing the Storage Overhead of Main-Memory OLTP Databases with

Hybrid Indexes

Huanchen Zhang

C

  • a

u t h

  • r

s :

D a v i d G . A n d e r s e n A n d r e w P a v l

  • M

i c h a e l K a m i n s k y L i n M a R u i S h e n

slide-2
SLIDE 2

You are running out of memory

2

slide-3
SLIDE 3

You are running out of memory

2

slide-4
SLIDE 4

Buy more

?

You are running out of memory

2

slide-5
SLIDE 5

2M 4M 6M 8M 10M 20K 60K

Transactions Executed Throughput TPC-C on

  • Store

3

Memory (GB)

Disk tuples In-memory tuples Indexes

4 8 Memory Limit = 5GB

slide-6
SLIDE 6

4

slide-7
SLIDE 7

The better way: Use memory more efficiently

5

slide-8
SLIDE 8

Indexes are LARGE

Benchmark % space for index

TPC-C Voter Articles

58% 55% 34%

Hybrid Index

34% 41% 18%

6

slide-9
SLIDE 9

Our Contributions The hybrid index architecture The Dual-Stage Transformation Applied to 4 index structures

  • B+tree
  • Masstree

7

  • Skip List
  • Adaptive Radix Tree (ART)

Performance Space

30 – 70%

slide-10
SLIDE 10

2M 4M 6M 8M 10M 20K 60K

Transactions Executed Throughput (txn/s) Did we solve this problem?

TPC-C on

  • Store

Stay tuned

8

slide-11
SLIDE 11

How do hybrid indexes achieve memory savings ?

9

Static

slide-12
SLIDE 12

dynamic stage static stage

Hybrid Index: a dual-stage architecture

10

slide-13
SLIDE 13

dynamic stage static stage write merge

Inserts are batched in the dynamic stage

11

slide-14
SLIDE 14

dynamic stage static stage read read

Reads search the stages in order

12

slide-15
SLIDE 15

dynamic stage static stage read read

A Bloom filter improves read performance

13

slide-16
SLIDE 16

dynamic stage static stage read read write merge Memory-efficient Skew-aware

14

~ ~ ~ ~ ~ ~ ~ ~

slide-17
SLIDE 17

dynamic stage static stage merge

The Dual-Stage Transformation

15

slide-18
SLIDE 18

Compaction Reduction Compression

The Dynamic-to-Static Rules

16

slide-19
SLIDE 19

2 4 4 1 2 a b 6 8 10 3 c 4 d 5 5 e f 5 g 6 h 7 i 8 j 9 k 10 l 11 m 12 n

Compaction: minimize # of memory blocks

17

slide-20
SLIDE 20

1 2 3 a b c 4 5 6 d h 7 8 9 i j k 10 11 12 l m n e f g 3 6 9 17

Compaction: minimize # of memory blocks

slide-21
SLIDE 21

1 2 3 a b c 4 5 6 d h 7 8 9 i j k 10 11 12 l m n e f g 3 6 9

Reduction: minimize structural overhead

18

slide-22
SLIDE 22

2 4 4 1 2 a b 6 8 10 3 4 c d 5 5 e f 5 6 g h 7 8 i j 9 10 k l 11 12 m n 1 2 3 a b c 4 5 6 d h 7 8 9 i j k 10 11 12 l m n e f g 3 6 9 18

Reduction: minimize structural overhead

slide-23
SLIDE 23

dynamic stage static stage merge

The Dual-Stage Transformation

19

Merge Questions:

1. Partial? 2. When? 3. Blocking?

? ? ?

slide-24
SLIDE 24

2M 4M 6M 8M 10M 20K 60K

Transactions Executed Throughput (txn/s) Did we solve this problem?

TPC-C on

  • Store

B+tree

20

slide-25
SLIDE 25

2M 4M 6M 8M 10M 20K 60K

Transactions Executed Throughput (txn/s)

60K 20K

Yes, we improved the DBMS’s capacity!

TPC-C on

  • Store

B+tree Hybrid

20

slide-26
SLIDE 26

Transactions Executed Throughput (txn/s)

20K 60K 20K 60K

Memory (GB)

2M 4M 6M 8M 10M

TPC-C on

  • Store

4 4 8 8

B+tree Hybrid B+tree Hybrid Disk tuples In-memory tuples Indexes

21

slide-27
SLIDE 27

Transactions Executed Throughput (txn/s)

20K 60K 20K 60K

Memory (GB)

2M 4M 6M 8M 10M

TPC-C on

  • Store

4 4 8 8

B+tree Hybrid B+tree Hybrid Disk tuples In-memory tuples Indexes

21

slide-28
SLIDE 28

Transactions Executed Throughput (txn/s)

20K 60K 20K 60K

Memory (GB)

2M 4M 6M 8M 10M

TPC-C on

  • Store

4 4 8 8

B+tree Hybrid B+tree Hybrid Disk tuples In-memory tuples Indexes

21

slide-29
SLIDE 29

Transactions Executed Throughput (txn/s)

20K 60K 20K 60K

Memory (GB)

2M 4M 6M 8M 10M

TPC-C on

  • Store

4 4 8 8

B+tree Hybrid B+tree Hybrid Disk tuples In-memory tuples Indexes

21

slide-30
SLIDE 30

Transactions Executed Throughput (txn/s)

20K 60K 20K 60K

Memory (GB)

2M 4M 6M 8M 10M

TPC-C on

  • Store

4 4 8 8

B+tree Hybrid B+tree Hybrid Disk tuples In-memory tuples Indexes

21

Take Away:

Larger working set in memory Higher throughput Memory saved by indexes

slide-31
SLIDE 31

This is just the BEGINNING

22

slide-32
SLIDE 32

Conclusions The hybrid index architecture The Dual-Stage Transformation Applied to 4 index structures GENERAL PRACTICAL USEFUL

23

  • B+tree
  • Masstree
  • Skip List
  • Adaptive Radix Tree (ART)
slide-33
SLIDE 33

1-844-88-CMUDB Toll-Free Hotline: