Dremel: Interac-ve Analysis of Web-Scale Datasets By Frank - - PowerPoint PPT Presentation

dremel interac ve analysis of web scale datasets
SMART_READER_LITE
LIVE PREVIEW

Dremel: Interac-ve Analysis of Web-Scale Datasets By Frank - - PowerPoint PPT Presentation

Dremel: Interac-ve Analysis of Web-Scale Datasets By Frank Chan CS297 Outline Background Data Model Data conversion Query execu-on Background


slide-1
SLIDE 1

Dremel: ¡Interac-ve ¡Analysis ¡of ¡ Web-­‑Scale ¡Datasets ¡

By ¡Frank ¡Chan ¡ CS297 ¡

slide-2
SLIDE 2

Outline ¡

  • Background ¡
  • Data ¡Model ¡
  • Data ¡conversion ¡
  • Query ¡execu-on ¡
slide-3
SLIDE 3

Background ¡

  • Many ¡-mes ¡users ¡need ¡to ¡be ¡able ¡to ¡query ¡a ¡

database ¡to ¡access ¡par-cular ¡records ¡

  • Generally, ¡views ¡can ¡be ¡created ¡for ¡mul-ple ¡

joins, ¡but ¡views ¡are ¡slow ¡

  • Alterna-vely, ¡a ¡replicated ¡table ¡of ¡that ¡join ¡can ¡

be ¡created ¡to ¡store ¡a ¡“results” ¡table ¡

  • Problem ¡1: ¡“results” ¡tables ¡are ¡not ¡up ¡to ¡date ¡
  • Problem ¡2: ¡DBMS ¡requires ¡to ¡load ¡the ¡data ¡

first, ¡not ¡good ¡with ¡distributed ¡datastores ¡

slide-4
SLIDE 4

Data ¡Model ¡

  • Conversion ¡of ¡record ¡stores ¡into ¡column ¡oriented ¡

model ¡

  • Advantage: ¡A, ¡B, ¡C ¡can ¡be ¡stored ¡con-guously ¡so ¡that ¡

A, ¡B, ¡C ¡can ¡be ¡retrieved ¡without ¡needing ¡to ¡access ¡D, ¡E ¡

slide-5
SLIDE 5

Data ¡Conversion ¡

  • Repe--on ¡level ¡

– At ¡what ¡repeated ¡field ¡in ¡the ¡field’s ¡path ¡the ¡value ¡ has ¡repeated ¡

  • Defini-on ¡level ¡

– How ¡many ¡fields ¡could ¡be ¡undefined ¡(because ¡it’s ¡

  • p-onal ¡or ¡repeated) ¡are ¡actually ¡present ¡
  • Encoding ¡

– Levels ¡generally ¡are ¡not ¡large, ¡so ¡bits ¡can ¡be ¡used ¡ to ¡encode ¡

slide-6
SLIDE 6

Data ¡Conversion ¡Example ¡

1 ¡ 1 ¡ 1 ¡ 2 ¡ 2 ¡ 2 ¡ 2 ¡ 2 ¡ 2 ¡ 2 ¡ 2 ¡ 2 ¡ 1 ¡ 1 ¡ 1 ¡ 1 ¡ 1 ¡ 2 ¡ 3 ¡ 3 ¡ 3 ¡ 2 ¡ 2 ¡ 3 ¡ 3 ¡

slide-7
SLIDE 7

Data ¡Conversion ¡Example ¡(Cont’d) ¡

slide-8
SLIDE 8

Data ¡record ¡reassembled ¡

  • Reassembling ¡the ¡record ¡can ¡be ¡done ¡in ¡a ¡graph ¡
  • Refer ¡back ¡to ¡slide ¡6 ¡to ¡see ¡the ¡data ¡defini-on ¡for ¡precedence ¡
slide-9
SLIDE 9

Query ¡record ¡reassembled ¡

slide-10
SLIDE 10

Query ¡Execu-on ¡

  • Query ¡execu-on ¡is ¡done ¡in ¡a ¡three ¡step ¡

process ¡in ¡a ¡tree ¡architechture ¡

slide-11
SLIDE 11

Query ¡Execu-on ¡Steps ¡

  • Root ¡server ¡

– Retrieves ¡the ¡incoming ¡query ¡ – Reads ¡metadata ¡from ¡tables ¡ – Routes ¡queries ¡to ¡the ¡intermediate ¡servers ¡(by ¡doing ¡a ¡ rewrite ¡based ¡on ¡the ¡metadata) ¡

  • Leaf ¡servers ¡

– Accesses ¡the ¡local ¡data ¡results ¡retrieved ¡from ¡the ¡ predicate ¡

  • Intermediate ¡servers ¡

– Rewrites ¡the ¡query ¡to ¡separate ¡the ¡results ¡to ¡the ¡leaf ¡ servers ¡ – Uses ¡a ¡UNION ¡ALL ¡aggrega-on ¡to ¡finalize ¡the ¡total ¡results ¡

slide-12
SLIDE 12

Query ¡Sample ¡

  • Query ¡is ¡received ¡by ¡the ¡root ¡node ¡
  • Query ¡is ¡rewri_en ¡so ¡that ¡it ¡can ¡be ¡dispersed ¡to ¡the ¡intermediate ¡

server ¡

  • Queries ¡are ¡given ¡to ¡the ¡leaf ¡nodes ¡based ¡on ¡data ¡locality ¡of ¡Ti ¡
slide-13
SLIDE 13

Performance ¡experiment: ¡Columnar ¡vs. ¡Record ¡disk ¡access ¡ ¡

  • As ¡number ¡of ¡fields ¡increases, ¡columnar ¡format ¡increases ¡ ¡
  • For ¡Record ¡format, ¡opera-on ¡is ¡sta-c ¡regardless ¡of ¡how ¡

many ¡fields ¡need ¡to ¡be ¡operated ¡on ¡ ¡

slide-14
SLIDE 14

Experiement: ¡MR ¡vs. ¡Dremel ¡

  • Both ¡systems ¡have ¡3000 ¡workers ¡
  • Uses ¡the ¡same ¡query: ¡

– In ¡SQL: ¡SELECT ¡SUM(CountWords(txtField))/ COUNT(*) ¡FROM ¡T1; ¡ ¡ – In ¡MR: ¡

slide-15
SLIDE 15

Experiement: ¡MR ¡vs. ¡Dremel ¡Results ¡

  • Switching ¡MR ¡from ¡records ¡to ¡columns, ¡it ¡gained ¡

a ¡full ¡order ¡of ¡magnitude ¡(hours ¡to ¡mins) ¡

  • Another ¡order ¡of ¡magnitude ¡is ¡gained ¡going ¡from ¡

MR-­‑columns ¡to ¡Dremel ¡(mins ¡to ¡secs) ¡