approximate indexing with bf trees a rum access method
play

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


  1. Approximate ¡Indexing ¡with ¡BF-­‑Trees* A ¡RUM ¡access ¡method Manos ¡Athanassoulis* ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡Anastasia ¡Ailamaki Harvard ¡SEAS ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡EPFL *work ¡done ¡while ¡at ¡EPFL

  2. Tree ¡indexing wide ¡and ¡short ¡trees … ¡which ¡have ¡large ¡size ¡in ¡order ¡to ¡ minimizing ¡random ¡accesses This ¡is ¡not ¡enough! … ¡is ¡designed ¡for ¡disks 2

  3. A ¡brave ¡new ¡(storage) ¡world 3

  4. A ¡brave ¡new ¡(storage) ¡world update ¡cost ¡varies read ¡performance ¡varies memory ¡price ¡varies 4

  5. RUM: ¡Read ¡vs Update ¡vs Memory ¡ Read ¡Optimized Access ¡Method Update ¡Optimized Memory/Storage ¡Optimized 5

  6. RUM: ¡Read ¡vs Update ¡vs Memory ¡ Read ¡Optimized LA-­‑Tree ¡[PVLDB09] FD-­‑Tree ¡[PVLDB10] μ-­‑Tree ¡[EMSOFT10] SILT ¡[SOSP11] MaSM [SIGMOD11] HDD-­‑based ¡access ¡methods PIO ¡B-­‑Tree ¡[PVLDB11] Bw-­‑Tree ¡[ICDE13] Flash-­‑aware ¡access ¡methods SSD-­‑based ¡access ¡methods Update ¡Optimized Memory/Storage ¡Optimized 6

  7. Memory ¡Price ¡vs. ¡Reads High ¡Performance Expensive ¡Memory Better Low ¡Performance Cheap ¡Memory exchange ¡more ¡reads ¡for ¡lower ¡size Better rethink ¡indexing! 7

  8. RUM: ¡Read ¡vs Update ¡vs Memory ¡ Read ¡Optimized Approximate ¡Indexing ¡with Bloom ¡filter ¡Tree Future ¡exploration Update ¡Optimized Memory/Storage ¡Optimized let’s ¡see ¡how ¡BF-­‑Tree ¡works 8

  9. Flash-­‑aware ¡indexing focuses ¡on ¡internal ¡node ¡organization lazy ¡updates LA-­‑Tree ¡[PVLDB09] FD-­‑Tree ¡[PVLDB10] immutable ¡data μ-­‑Tree ¡[EMSOFT10] SILT ¡[SOSP11] MaSM [SIGMOD11] PIO ¡B-­‑Tree ¡[PVLDB11] Bw-­‑Tree ¡[ICDE13] what ¡about ¡solid-­‑state ¡storage ¡ fast ¡reads ? 9

  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 how ¡common ¡is ¡ implicit ¡clustering ? 10

  11. Implicit ¡Clustering TPCH ¡data: ¡transaction ¡dates data ¡organized ¡based ¡on ¡creation ¡time 11

  12. Implicit ¡Clustering Electricity ¡consumption ¡– Smart ¡Home ¡Dataset ¡(SHD) how ¡can ¡BF-­‑Tree ¡index ¡such ¡data? data ¡values ¡correlated ¡with ¡creation ¡time 12

  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 [-­‑10,-­‑5) [-­‑5,0) [1,9) [9,11) P j-­‑2 … P j-­‑1 P j P j+1 … 13

  14. Bloom ¡filter ¡Trees 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 BF BF BF BF BF BF BF BF P j-­‑2 … P j-­‑1 P j P j+1 … [-­‑10,-­‑5) [-­‑5,0) [1,9) [9,11) 14

  15. Bloom ¡filter ¡Trees BF BF BF BF BF BF BF BF P j-­‑2 … P j-­‑1 P j P j+1 … [-­‑10,-­‑5) [-­‑5,0) [1,9) [9,11) 15

  16. Bloom ¡filter ¡Trees min:1 max: ¡8 Partition ¡P j All ¡k ¡pages ¡contain values ¡ BF BF BF BF between ¡partition-­‑wide min ¡and ¡max. ¡ … 1,3 2,5 4,8 3,6 … Partition ¡P j with ¡k ¡pages 16

  17. Bloom ¡filter ¡Trees Search ¡for ¡3 min:1 max: ¡8 BF BF BF BF … 1,3 2,5 4,8 3,6 … Partition ¡P j with ¡k ¡pages 17

  18. Bloom ¡filter ¡Trees Search ¡for ¡3 min:1 max: ¡8 BF BF BF BF … 1,3 2,5 4,8 3,6 … Partition ¡P j with ¡k ¡pages 18

  19. Bloom ¡filter ¡Trees Search ¡for ¡3 min:1 max: ¡8 BF BF BF BF … 1,3 2,5 4,8 3,6 … Partition ¡P j with ¡k ¡pages 19

  20. Bloom ¡filter ¡Trees Search ¡for ¡3 min:1 max: ¡8 BF-­‑leaf k ¡Bloom ¡filters BF BF BF BF K ¡pages ¡in ¡the ¡partition ¡P j … 1,3 2,5 4,8 3,6 … Partition ¡P j with ¡k ¡pages 20

  21. Bloom ¡filter ¡Trees Search ¡for ¡3 min:1 max: ¡8 BF BF BF BF … 1,3 2,5 4,8 3,6 … Partition ¡P j with ¡k ¡pages 21

  22. Bloom ¡filter ¡Trees Search ¡for ¡3 min:1 max: ¡8 BF BF BF BF false ¡positives ¡are ¡also ¡possible … 1,3 2,5 4,8 3,6 … retrieve ¡and ¡search ¡for ¡desired ¡value Partition ¡P j with ¡k ¡pages 22

  23. Bloom ¡filter ¡Trees Search ¡for ¡3 min:1 max: ¡8 False ¡positive BF BF BF BF … 1,3 2,5 4,8 3,6 … Partition ¡P j with ¡k ¡pages 23

  24. BF-­‑Tree ¡Design BF BF BF BF BF BF BF BF BF BF BF BF BFs ¡have ¡tunable ¡size Variable ¡ false ¡positive ¡probability (fpp) p 1 ¡ = ¡0.01% BF BF BF BF BF BF BF BF If ¡BF ¡size ¡is ¡half BF BF BF BF p 2 ¡ = ¡1% False ¡positive à variable ¡performance tunable ¡size ¡ à 24

  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

  26. BF-­‑Trees ¡for ¡PK average ¡index ¡probe ¡time ¡for ¡1GB ¡relation Tuplesize: ¡256 ¡bytes varying Keysize: ¡8 ¡bytes false ¡positive ¡probability; ¡storage ¡configuration mem/SSD mem/HDD SSD/SSD B + -­‑Tree ¡Latency SSD/HDD HDD/HDD 1.E+02 1.E+02 Response ¡time ¡(ms) 1.E+01 1.E+01 1.E+00 1.E+00 1.E-­‑01 1.E-­‑01 1.00E+00 1.00E-­‑03 1.00E-­‑06 1.00E-­‑09 1.00E-­‑12 1.00E-­‑15 false ¡positive ¡probability 26 Bigger ¡Tree ¡Size

  27. BF-­‑Trees ¡for ¡PK average ¡index ¡probe ¡time ¡for ¡1GB ¡relation Tuplesize: ¡256 ¡bytes varying Keysize: ¡8 ¡bytes false ¡positive ¡probability; ¡storage ¡configuration Data ¡location ¡ Both ¡data/index ¡ matters ¡most locations ¡matter mem/SSD mem/HDD SSD/SSD B + -­‑Tree ¡Latency SSD/HDD HDD/HDD 1.E+02 1.E+02 Response ¡time ¡(ms) 1.E+01 1.E+01 1.E+00 1.E+00 1.E-­‑01 1.E-­‑01 1.00E+00 1.00E-­‑03 1.00E-­‑06 1.00E-­‑09 1.00E-­‑12 1.00E-­‑15 false ¡positive ¡probability what ¡about ¡the ¡tree ¡size? 27 Bigger ¡Tree ¡Size

  28. BF-­‑Tree ¡vs B + -­‑Tree: ¡Size ¡& ¡Latency average ¡index ¡probe ¡time ¡for ¡1GB ¡relation Tuplesize: ¡256 ¡bytes varying Keysize: ¡8 ¡bytes false ¡positive ¡probability; ¡storage ¡configuration Solid: B+-­‑Tree Pattern: BF-­‑Tree ¡(best) 1.E+02 3.8x ¡ 19.4x 12.2x smaller ¡size Response ¡time ¡(ms) 1.E+01 1.E+00 1.E-­‑01 mem/SSD mem/HDD SSD/SSD SSD/HDD HDD/HDD 28

  29. BF-­‑Tree ¡vs B + -­‑Tree: ¡Size ¡& ¡Latency average ¡index ¡probe ¡time ¡for ¡1GB ¡relation Tuplesize: ¡256 ¡bytes varying Keysize: ¡8 ¡bytes false ¡positive ¡probability; ¡storage ¡configuration Solid: B+-­‑Tree Pattern: BF-­‑Tree ¡(best) 1.E+02 3.8x ¡ 19.4x 12.2x smaller ¡size Response ¡time ¡(ms) 1.E+01 1.E+00 competitive ¡performance ¡with ¡space ¡savings 1.E-­‑01 mem/SSD mem/HDD SSD/SSD SSD/HDD HDD/HDD 29

  30. BF-­‑Tree ¡for ¡SHD 1.E+02 4 Solid: B+-­‑Tree Pattern: BF-­‑Tree ¡(best) Response ¡time ¡(ms) 22 16 1.E+01 3 Capacity ¡Gain 6.2 6.2 6.2 6.0 1.E+00 2 0.7 0.6 0.31 0.25 1.E-­‑01 1 mem/SSD mem/HDD SSD/SSD SSD/HDD HDD/HDD 30

  31. TPCH ¡point ¡queries ¡on ¡date Cardinality: ¡2k ¡values 9 BF ¡normalized ¡resp. ¡time ¡with ¡B+Tree 8 7 High ¡hit ¡rate: ¡B+ ¡Tree ¡is ¡faster 6 Data ¡on ¡HDD ¡ à High ¡overhead ¡(unless ¡index ¡is ¡slow) 5 Index ¡perf. ¡≈ ¡data ¡perf. ¡ à Low ¡overhead 4 3 2 BF-­‑Tree ¡is ¡always ¡faster ¡for ¡low ¡hit ¡rate 1 0 0% 5% 10% 25% Probe ¡hit ¡rate mem/SSD mem/HDD SSD/SSD SSD/HDD HDD/HDD 31

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend