MapReduce: Simplified Data Processing on Large Clusters J. Dean, S. - - PowerPoint PPT Presentation

mapreduce
SMART_READER_LITE
LIVE PREVIEW

MapReduce: Simplified Data Processing on Large Clusters J. Dean, S. - - PowerPoint PPT Presentation

MapReduce: Simplified Data Processing on Large Clusters J. Dean, S. Ghemawat, OSDI, 2004. Review by Mariana Marasoiu for R212 Motivation: Large scale data processing We want to: Extract data from large datasets Run on big clusters of


slide-1
SLIDE 1

MapReduce:

Simplified Data Processing on Large Clusters

  • J. Dean, S. Ghemawat, OSDI, 2004.

Review by Mariana Marasoiu for R212

slide-2
SLIDE 2

Motivation: Large scale data processing

We want to: Extract data from large datasets Run on big clusters of computers Be easy to program

slide-3
SLIDE 3

Solution: MapReduce

A new programming model: Map & Reduce Provides: Automatic parallelization and distribution Fault tolerance I/O scheduling Status and monitoring

slide-4
SLIDE 4

(1, you are in Cambridge) (2, I like Cambridge) (3, we live in Cambridge) (you, 1) (are, 1) (in, 1) (Cambridge, 1) (I, 1) (like, 1) (Cambridge, 1) (we, 1) (live, 1) (in, 1) (Cambridge, 1)

Map

map (in_key, in_value) → list(out_key, intermediate_value)

slide-5
SLIDE 5

(you, 1) (are, 1) (in, 1) (Cambridge, 1) (I, 1) (like, 1) (Cambridge, 1) (we, 1) (live, 1) (in, 1) (Cambridge, 1)

slide-6
SLIDE 6

Partition

(we, 1) (you, 1) (live, 1) (are, 1) (Cambridge, 1) (Cambridge, 1) (Cambridge, 1) (in, 1) (in, 1) (I, 1) (like, 1) (you, 1) (are, 1) (in, 1) (Cambridge, 1) (I, 1) (like, 1) (Cambridge, 1) (we, 1) (live, 1) (in, 1) (Cambridge, 1)

slide-7
SLIDE 7

Partition Reduce

(we, 1) (you, 1) (live, 1) (are, 1) (Cambridge, 1) (Cambridge, 1) (Cambridge, 1) (in, 1) (in, 1) (I, 1) (like, 1) (you, 1) (are, 1) (in, 1) (Cambridge, 1) (I, 1) (like, 1) (Cambridge, 1) (we, 1) (live, 1) (in, 1) (Cambridge, 1) (you, 1) (are, 1) (in, 2) (Cambridge, 3) (I, 1) (like, 1) (we, 1) (live, 1)

reduce (out_key, list(intermediate_value)) -> list(out_value)

slide-8
SLIDE 8

File 1 File 2 File 3 User Program Input files

slide-9
SLIDE 9

File 1 File 2 worker worker worker worker worker File 3 User Program Master Input files fork fork fork

slide-10
SLIDE 10

File 1 File 2 worker worker worker worker worker File 3 User Program Master Input files fork assign map assign reduce

slide-11
SLIDE 11

File 1 File 2 split 0 split 1 split 2 split 3 split 4 worker worker worker worker worker File 3 User Program Master Input files M splits Map phase fork assign map assign reduce split read

slide-12
SLIDE 12

File 1 File 2 split 0 split 1 split 2 split 3 split 4 worker worker worker worker worker File 3 User Program Master Input files M splits Map phase Intermediate files (on local disks) fork assign map assign reduce split read local write

slide-13
SLIDE 13

File 1 File 2 split 0 split 1 split 2 split 3 split 4 worker worker worker worker worker File 3 User Program Master Input files M splits Map phase Intermediate files (on local disks) Reduce phase fork assign map assign reduce split read local write remote read

slide-14
SLIDE 14

File 1 File 2 split 0 split 1 split 2 split 3 split 4 worker worker worker worker worker Output File 1 Output File 2 File 3 User Program Master Input files M splits Map phase Intermediate files (on local disks) Reduce phase R Output files fork assign map assign reduce split read local write remote read write

slide-15
SLIDE 15

Fine task granularity

M so that data is between 16MB and 64MB R is small multiple of workers E.g. M = 200,000, R = 5,000 on 2,000 workers Advantages: dynamic load balancing fault tolerance

slide-16
SLIDE 16

Fault tolerance

Workers:

Detect failure via periodic heartbeat Re-execute completed and in-progress map tasks Re-execute in progress reduce tasks Task completion committed through master

Master:

Not handled - failure unlikely

slide-17
SLIDE 17

Refinements

Locality optimization Backup tasks Ordering guarantees Combiner function Skipping bad records Local execution

slide-18
SLIDE 18

Performance

Tests run on 1800 machines:

Dual 2GHz Intel Xeon processors with Hyper-Threading enabled 4GB of memory Two 160GB IDE disks Gigabit Ethernet link

2 Benchmarks:

MR_Grep 1010 x 100 byte entries, 92k matches MR_Sort 1010 x 100 byte entries

slide-19
SLIDE 19

MR_Grep

150 seconds run (startup overhead of ~60 seconds)

slide-20
SLIDE 20

MR_Sort

Normal execution No backup tasks 200 tasks killed

slide-21
SLIDE 21

Experience

Rewrite of the indexing system for Google web search Large scale machine learning Clustering for Google News Data extraction for Google Zeitgeist Large scale graph computations

slide-22
SLIDE 22

Conclusions

MapReduce: useful abstraction simplifies large-scale computations easy to use However: expensive for small applications long startup time (~1 min) chaining of map-reduce phases?