Approximate Indexing with BF-Trees* A RUM access method Manos - - PowerPoint PPT Presentation

approximate indexing with bf trees a rum access method
SMART_READER_LITE
LIVE PREVIEW

Approximate Indexing with BF-Trees* A RUM access method Manos - - PowerPoint PPT Presentation

Approximate Indexing with BF-Trees* A RUM access method Manos Athanassoulis* Anastasia Ailamaki Harvard SEAS


slide-1
SLIDE 1

Approximate ¡Indexing ¡with ¡BF-­‑Trees* A ¡RUM ¡access ¡method

Manos ¡Athanassoulis* ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡Anastasia ¡Ailamaki Harvard ¡SEAS ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡EPFL

*work ¡done ¡while ¡at ¡EPFL

slide-2
SLIDE 2

Tree ¡indexing

2

… ¡is ¡designed ¡for ¡disks

wide ¡and ¡short ¡trees … ¡which ¡have ¡large ¡size ¡in ¡order ¡to ¡ minimizing ¡random ¡accesses

This ¡is ¡not ¡enough!

slide-3
SLIDE 3

A ¡brave ¡new ¡(storage) ¡world

3

slide-4
SLIDE 4

A ¡brave ¡new ¡(storage) ¡world

4

memory ¡price ¡varies read ¡performance ¡varies update ¡cost ¡varies

slide-5
SLIDE 5

RUM: ¡Read ¡vs Update ¡vs Memory ¡

5

Read ¡Optimized Update ¡Optimized Memory/Storage ¡Optimized Access ¡Method

slide-6
SLIDE 6

RUM: ¡Read ¡vs Update ¡vs Memory ¡

6

Read ¡Optimized Update ¡Optimized Memory/Storage ¡Optimized HDD-­‑based ¡access ¡methods Flash-­‑aware ¡access ¡methods SSD-­‑based ¡access ¡methods

LA-­‑Tree ¡[PVLDB09] FD-­‑Tree ¡[PVLDB10] μ-­‑Tree ¡[EMSOFT10] SILT ¡[SOSP11] MaSM [SIGMOD11] PIO ¡B-­‑Tree ¡[PVLDB11] Bw-­‑Tree ¡[ICDE13]

slide-7
SLIDE 7

Memory ¡Price ¡vs. ¡Reads

7

Better Better

High ¡Performance Expensive ¡Memory Low ¡Performance Cheap ¡Memory

rethink ¡indexing!

exchange ¡more ¡reads ¡for ¡lower ¡size

slide-8
SLIDE 8

RUM: ¡Read ¡vs Update ¡vs Memory ¡

8

Read ¡Optimized Update ¡Optimized Memory/Storage ¡Optimized Approximate ¡Indexing ¡with Bloom ¡filter ¡Tree Future ¡exploration

let’s ¡see ¡how ¡BF-­‑Tree ¡works

slide-9
SLIDE 9

Flash-­‑aware ¡indexing

focuses ¡on ¡internal ¡node ¡organization lazy ¡updates immutable ¡data

9

what ¡about ¡solid-­‑state ¡storage ¡fast ¡reads?

LA-­‑Tree ¡[PVLDB09] FD-­‑Tree ¡[PVLDB10] μ-­‑Tree ¡[EMSOFT10] SILT ¡[SOSP11] MaSM [SIGMOD11] PIO ¡B-­‑Tree ¡[PVLDB11] Bw-­‑Tree ¡[ICDE13]

slide-10
SLIDE 10

Approximate ¡Tree ¡Indexing

Design ¡choices ¡

use ¡Bloom ¡filters for ¡membership ¡queries ¡per ¡ page tunable ¡tree ¡size probabilistically ¡tunable ¡random ¡reads

Caveat

works ¡well ¡for ¡datasets ¡with ¡implicit ¡clustering

10

how ¡common ¡is ¡implicit ¡clustering?

slide-11
SLIDE 11

Implicit ¡Clustering

11

TPCH ¡data: ¡transaction ¡dates

data ¡organized ¡based ¡on ¡creation ¡time

slide-12
SLIDE 12

Implicit ¡Clustering

12

Electricity ¡consumption ¡– Smart ¡Home ¡Dataset ¡(SHD)

data ¡values ¡correlated ¡with ¡creation ¡time

how ¡can ¡BF-­‑Tree ¡index ¡such ¡data?

slide-13
SLIDE 13

Bloom ¡filter ¡Trees

select ¡desired ¡tree ¡size ¡(aka ¡BF ¡per ¡page ¡size) each ¡partition ¡

has ¡about ¡the ¡same ¡unique values has ¡a ¡partition-­‑wide ¡min ¡and ¡max has ¡a ¡(variable) ¡number ¡of ¡physical ¡pages

13

Pj-­‑2 Pj-­‑1 Pj … … Pj+1 [-­‑10,-­‑5) [-­‑5,0) [1,9) [9,11)

slide-14
SLIDE 14

for ¡every ¡page ¡of ¡every ¡partition

build ¡BF ¡with ¡desired ¡size ¡(and, ¡hence, ¡false ¡positive)

build ¡a ¡B+-­‑Tree ¡on ¡top ¡of ¡all ¡partitions ¡

using ¡the ¡min/max ¡as ¡keys

Bloom ¡filter ¡Trees

14

Pj-­‑2 Pj-­‑1 Pj … … Pj+1 BF BF BF BF BF BF BF BF [-­‑10,-­‑5) [-­‑5,0) [1,9) [9,11)

slide-15
SLIDE 15

Bloom ¡filter ¡Trees

15

… … BF BF BF BF BF BF BF BF [-­‑10,-­‑5) [-­‑5,0) [1,9) [9,11) Pj-­‑2 Pj-­‑1 Pj Pj+1

slide-16
SLIDE 16

Bloom ¡filter ¡Trees

16

… …

Partition ¡Pj with ¡k ¡pages

Partition ¡Pj All ¡k ¡pages ¡contain values ¡ between ¡partition-­‑wide min ¡and ¡max. ¡ 1,3 2,5 3,6

min:1 max: ¡8

BF BF BF BF 4,8

slide-17
SLIDE 17

Bloom ¡filter ¡Trees

17

… …

Partition ¡Pj with ¡k ¡pages

BF BF BF BF 1,3 2,5 4,8

min:1 max: ¡8

Search ¡for ¡3 3,6

slide-18
SLIDE 18

Bloom ¡filter ¡Trees

18

… …

Partition ¡Pj with ¡k ¡pages

BF BF BF BF 1,3 2,5 4,8

min:1 max: ¡8

Search ¡for ¡3 3,6

slide-19
SLIDE 19

Bloom ¡filter ¡Trees

19

… …

Partition ¡Pj with ¡k ¡pages

BF BF BF BF 1,3 2,5 4,8

min:1 max: ¡8

Search ¡for ¡3 3,6

slide-20
SLIDE 20

Bloom ¡filter ¡Trees

20

BF … … BF BF BF-­‑leaf k ¡Bloom ¡filters K ¡pages ¡in ¡the ¡partition ¡Pj BF

Partition ¡Pj with ¡k ¡pages

1,3 2,5 4,8

min:1 max: ¡8

Search ¡for ¡3 3,6

slide-21
SLIDE 21

1,3 2,5 4,8

min:1 max: ¡8

Bloom ¡filter ¡Trees

21

BF … … BF BF BF

Partition ¡Pj with ¡k ¡pages

Search ¡for ¡3 3,6

slide-22
SLIDE 22

Bloom ¡filter ¡Trees

22

BF … … BF BF BF

Partition ¡Pj with ¡k ¡pages

retrieve ¡and ¡search ¡for ¡desired ¡value

1,3 2,5 4,8 3,6

min:1 max: ¡8

Search ¡for ¡3

false ¡positives ¡are ¡also ¡possible

slide-23
SLIDE 23

Bloom ¡filter ¡Trees

23

BF … … BF BF BF

Partition ¡Pj with ¡k ¡pages

1,3 2,5 4,8 3,6

min:1 max: ¡8

Search ¡for ¡3 False ¡positive

slide-24
SLIDE 24

BF-­‑Tree ¡Design

Variable ¡false ¡positive ¡probability (fpp)

24

BF BF BF BF BF BF BF BF BF BF BF BF BFs ¡have ¡tunable ¡size

tunable ¡size ¡à à variable ¡performance

BF BF BF BF BF BF BF BF BF BF BF BF False ¡positive p1 ¡= ¡0.01% If ¡BF ¡size ¡is ¡half p2 ¡= ¡1%

slide-25
SLIDE 25

BF-­‑Trees ¡in ¡action

Datasets

1GB ¡synthetic with ¡256b ¡tuples ¡and ¡8b ¡keys 30GB ¡TPCH ¡(SF30) Smart ¡Home ¡Dataset ¡(SHD)

Workload

Point ¡queries ¡(PK ¡or ¡TPCH ¡date ¡or ¡energy ¡level)

5 ¡storage ¡configurations ¡(index/data)

mem/SSD mem/HDD SSD/SSD SSD/HDD HDD/HDD

25

slide-26
SLIDE 26

1.E-­‑01 1.E+00 1.E+01 1.E+02 1.00E-­‑15 1.00E-­‑12 1.00E-­‑09 1.00E-­‑06 1.00E-­‑03 1.00E+00

Response ¡time ¡(ms)

mem/SSD mem/HDD SSD/SSD SSD/HDD HDD/HDD

BF-­‑Trees ¡for ¡PK

average ¡index ¡probe ¡time ¡for ¡1GB ¡relation varying

false ¡positive ¡probability; ¡storage ¡configuration

26 false ¡positive ¡probability

1.E-­‑01 1.E+00 1.E+01 1.E+02

B+-­‑Tree ¡Latency

Tuplesize: ¡256 ¡bytes Keysize: ¡8 ¡bytes

Bigger ¡Tree ¡Size

slide-27
SLIDE 27

1.E-­‑01 1.E+00 1.E+01 1.E+02 1.00E-­‑15 1.00E-­‑12 1.00E-­‑09 1.00E-­‑06 1.00E-­‑03 1.00E+00

Response ¡time ¡(ms)

mem/SSD mem/HDD SSD/SSD SSD/HDD HDD/HDD

BF-­‑Trees ¡for ¡PK

average ¡index ¡probe ¡time ¡for ¡1GB ¡relation varying

false ¡positive ¡probability; ¡storage ¡configuration

27 false ¡positive ¡probability

1.E-­‑01 1.E+00 1.E+01 1.E+02

B+-­‑Tree ¡Latency

Tuplesize: ¡256 ¡bytes Keysize: ¡8 ¡bytes

Bigger ¡Tree ¡Size

Data ¡location ¡ matters ¡most Both ¡data/index ¡ locations ¡matter

what ¡about ¡the ¡tree ¡size?

slide-28
SLIDE 28

average ¡index ¡probe ¡time ¡for ¡1GB ¡relation varying

false ¡positive ¡probability; ¡storage ¡configuration

1.E-­‑01 1.E+00 1.E+01 1.E+02

mem/SSD mem/HDD SSD/SSD SSD/HDD HDD/HDD

Response ¡time ¡(ms) Solid: B+-­‑Tree Pattern: BF-­‑Tree ¡(best)

BF-­‑Tree ¡vs B+-­‑Tree: ¡Size ¡& ¡Latency

28

Tuplesize: ¡256 ¡bytes Keysize: ¡8 ¡bytes

3.8x ¡ smaller ¡size 12.2x 19.4x

slide-29
SLIDE 29

average ¡index ¡probe ¡time ¡for ¡1GB ¡relation varying

false ¡positive ¡probability; ¡storage ¡configuration

1.E-­‑01 1.E+00 1.E+01 1.E+02

mem/SSD mem/HDD SSD/SSD SSD/HDD HDD/HDD

Response ¡time ¡(ms) Solid: B+-­‑Tree Pattern: BF-­‑Tree ¡(best)

BF-­‑Tree ¡vs B+-­‑Tree: ¡Size ¡& ¡Latency

29

Tuplesize: ¡256 ¡bytes Keysize: ¡8 ¡bytes

3.8x ¡ smaller ¡size

competitive ¡performance ¡with ¡space ¡savings

12.2x 19.4x

slide-30
SLIDE 30

BF-­‑Tree ¡for ¡SHD

30 0.25 6.2 0.7 6.2 22 0.31 6.0 0.6 6.2 16

1 2 3 4

1.E-­‑01 1.E+00 1.E+01 1.E+02

mem/SSD mem/HDD SSD/SSD SSD/HDD HDD/HDD

Capacity ¡Gain Response ¡time ¡(ms) Solid: B+-­‑Tree Pattern: BF-­‑Tree ¡(best)

slide-31
SLIDE 31

TPCH ¡point ¡queries ¡on ¡date

31

1 2 3 4 5 6 7 8 9 0% 5% 10% 25%

BF ¡normalized ¡resp. ¡time ¡with ¡B+Tree Probe ¡hit ¡rate

mem/SSD mem/HDD SSD/SSD SSD/HDD HDD/HDD

BF-­‑Tree ¡is ¡always ¡faster ¡for ¡low ¡hit ¡rate High ¡hit ¡rate: ¡B+ ¡Tree ¡is ¡faster Data ¡on ¡HDD ¡à High ¡overhead ¡(unless ¡index ¡is ¡slow) Index ¡perf. ¡≈ ¡data ¡perf. ¡à Low ¡overhead

Cardinality: ¡2k ¡values

slide-32
SLIDE 32

Approximate ¡Tree ¡Indexing

tunable ¡size ¡à variable ¡performance competitive ¡resp. ¡time ¡w/ ¡4-­‑20x ¡capacity ¡savings tailored ¡for:

datasets ¡with ¡implicit ¡clustering workloads ¡with ¡low ¡hit ¡rate

more ¡details ¡in ¡paper:

analytical ¡modeling, ¡range ¡scans updates, ¡datasets, ¡more ¡comparisons

32

slide-33
SLIDE 33

RUM ¡Tunable ¡Indexing

33

Read ¡Optimized Update ¡Optimized Memory/Storage ¡Optimized HDD-­‑based ¡access ¡methods Flash-­‑aware ¡access ¡methods SSD-­‑based ¡access ¡methods

LA-­‑Tree ¡[PVLDB09] FD-­‑Tree ¡[PVLDB10] μ-­‑Tree ¡[EMSOFT10] SILT ¡[SOSP11] MaSM [SIGMOD11] PIO ¡B-­‑Tree ¡[PVLDB11] Bw-­‑Tree ¡[ICDE13]

slide-34
SLIDE 34

RUM ¡Tunable ¡Indexing

34

Read ¡Optimized Update ¡Optimized Memory/Storage ¡Optimized http://daslab.seas.harvard.edu/rum-­‑conjecture/

Thanks!

Questions?