Cloud Computing MapReduce, Batch Processing

Slides:



Advertisements
Similar presentations
Lecture 12: MapReduce: Simplified Data Processing on Large Clusters Xiaowei Yang (Duke University)
Advertisements

MAP REDUCE PROGRAMMING Dr G Sudha Sadasivam. Map - reduce sort/merge based distributed processing Best for batch- oriented processing Sort/merge is primitive.
Distributed Computations
CS 345A Data Mining MapReduce. Single-node architecture Memory Disk CPU Machine Learning, Statistics “Classical” Data Mining.
MapReduce Dean and Ghemawat. MapReduce: Simplified Data Processing on Large Clusters. Communications of the ACM, Vol. 51, No. 1, January Shahram.
MapReduce: Simplified Data Processing on Large Clusters J. Dean and S. Ghemawat (Google) OSDI 2004 Shimin Chen DISC Reading Group.
Homework 2 In the docs folder of your Berkeley DB, have a careful look at documentation on how to configure BDB in main memory. In the docs folder of your.
MapReduce Simplified Data Processing on Large Clusters Google, Inc. Presented by Prasad Raghavendra.
Distributed Computations MapReduce
7/14/2015EECS 584, Fall MapReduce: Simplied Data Processing on Large Clusters Yunxing Dai, Huan Feng.
L22: SC Report, Map Reduce November 23, Map Reduce What is MapReduce? Example computing environment How it works Fault Tolerance Debugging Performance.
MapReduce Simplified Data Processing On large Clusters Jeffery Dean and Sanjay Ghemawat.
Lecture 2 – MapReduce CPE 458 – Parallel Programming, Spring 2009 Except as otherwise noted, the content of this presentation is licensed under the Creative.
MapReduce : Simplified Data Processing on Large Clusters Hongwei Wang & Sihuizi Jin & Yajing Zhang
MapReduce: Simplified Data Processing on Large Clusters
Advanced Topics: MapReduce ECE 454 Computer Systems Programming Topics: Reductions Implemented in Distributed Frameworks Distributed Key-Value Stores Hadoop.
SIDDHARTH MEHTA PURSUING MASTERS IN COMPUTER SCIENCE (FALL 2008) INTERESTS: SYSTEMS, WEB.
Hadoop Ida Mele. Parallel programming Parallel programming is used to improve performance and efficiency In a parallel program, the processing is broken.
MapReduce.
Introduction to Parallel Programming MapReduce Except where otherwise noted all portions of this work are Copyright (c) 2007 Google and are licensed under.
By: Jeffrey Dean & Sanjay Ghemawat Presented by: Warunika Ranaweera Supervised by: Dr. Nalin Ranasinghe.
MapReduce. Web data sets can be very large – Tens to hundreds of terabytes Cannot mine on a single server Standard architecture emerging: – Cluster of.
Google MapReduce Simplified Data Processing on Large Clusters Jeff Dean, Sanjay Ghemawat Google, Inc. Presented by Conroy Whitney 4 th year CS – Web Development.
Süleyman Fatih GİRİŞ CONTENT 1. Introduction 2. Programming Model 2.1 Example 2.2 More Examples 3. Implementation 3.1 ExecutionOverview 3.2.
Take a Close Look at MapReduce Xuanhua Shi. Acknowledgement  Most of the slides are from Dr. Bing Chen,
Map Reduce for data-intensive computing (Some of the content is adapted from the original authors’ talk at OSDI 04)
Parallel Programming Models Basic question: what is the “right” way to write parallel programs –And deal with the complexity of finding parallelism, coarsening.
MapReduce: Simplified Data Processing on Large Clusters Jeffrey Dean and Sanjay Ghemawat.
MapReduce: Hadoop Implementation. Outline MapReduce overview Applications of MapReduce Hadoop overview.
Map Reduce: Simplified Processing on Large Clusters Jeffrey Dean and Sanjay Ghemawat Google, Inc. OSDI ’04: 6 th Symposium on Operating Systems Design.
MAP REDUCE : SIMPLIFIED DATA PROCESSING ON LARGE CLUSTERS Presented by: Simarpreet Gill.
MapReduce How to painlessly process terabytes of data.
Google’s MapReduce Connor Poske Florida State University.
MapReduce M/R slides adapted from those of Jeff Dean’s.
Mass Data Processing Technology on Large Scale Clusters Summer, 2007, Tsinghua University All course material (slides, labs, etc) is licensed under the.
MapReduce Kristof Bamps Wouter Deroey. Outline Problem overview MapReduce o overview o implementation o refinements o conclusion.
MAPREDUCE PRESENTED BY: KATIE WOODS & JORDAN HOWELL.
SECTION 5: PERFORMANCE CHRIS ZINGRAF. OVERVIEW: This section measures the performance of MapReduce on two computations, Grep and Sort. These programs.
MapReduce and the New Software Stack CHAPTER 2 1.
By Jeff Dean & Sanjay Ghemawat Google Inc. OSDI 2004 Presented by : Mohit Deopujari.
Chapter 5 Ranking with Indexes 1. 2 More Indexing Techniques n Indexing techniques:  Inverted files - best choice for most applications  Suffix trees.
MapReduce: Simplified Data Processing on Large Clusters Lim JunSeok.
MapReduce : Simplified Data Processing on Large Clusters P 謝光昱 P 陳志豪 Operating Systems Design and Implementation 2004 Jeffrey Dean, Sanjay.
C-Store: MapReduce Jianlin Feng School of Software SUN YAT-SEN UNIVERSITY May. 22, 2009.
MapReduce: Simplified Data Processing on Large Clusters By Dinesh Dharme.
MapReduce: simplified data processing on large clusters Jeffrey Dean and Sanjay Ghemawat.
MapReduce: Simplified Data Processing on Large Cluster Authors: Jeffrey Dean and Sanjay Ghemawat Presented by: Yang Liu, University of Michigan EECS 582.
MapReduce: Simplied Data Processing on Large Clusters Written By: Jeffrey Dean and Sanjay Ghemawat Presented By: Manoher Shatha & Naveen Kumar Ratkal.
MapReduce: Simplified Data Processing on Large Clusters Jeff Dean, Sanjay Ghemawat Google, Inc.
Lecture 3 – MapReduce: Implementation CSE 490h – Introduction to Distributed Computing, Spring 2009 Except as otherwise noted, the content of this presentation.
Lecture 4. MapReduce Instructor: Weidong Shi (Larry), PhD
Large-scale file systems and Map-Reduce
MapReduce: Simplified Data Processing on Large Clusters
Map Reduce.
Auburn University COMP7330/7336 Advanced Parallel and Distributed Computing MapReduce - Introduction Dr. Xiao Qin Auburn.
MapReduce Simplied Data Processing on Large Clusters
COS 418: Distributed Systems Lecture 1 Mike Freedman
湖南大学-信息科学与工程学院-计算机与科学系
Cse 344 May 2nd – Map/reduce.
February 26th – Map/Reduce
Map reduce use case Giuseppe Andronico INFN Sez. CT & Consorzio COMETA
Cse 344 May 4th – Map/Reduce.
CS-4513 Distributed Computing Systems Hugh C. Lauer
Map-Reduce framework -By Jagadish Rouniyar.
CS 345A Data Mining MapReduce This presentation has been altered.
Introduction to MapReduce
MapReduce: Simplified Data Processing on Large Clusters
5/7/2019 Map Reduce Map reduce.
COS 518: Distributed Systems Lecture 11 Mike Freedman
MapReduce: Simplified Data Processing on Large Clusters
Presentation transcript:

Cloud Computing MapReduce, Batch Processing Eva Kalyvianaki ek264@cam.ac.uk

Contents Batch processing: processing large amounts of data at- once, in one-go to deliver a result according to a query on the data. Material is from the paper: “MapReduce: Simplified Data Processing on Large Clusters”, By Jeffrey Dean and Sanjay Ghemawat from Google published in Usenix OSDI conference, 2004 2

Motivation: Processing Large-sets of Data Need for many computations over large/huge sets of data: Input data: crawled documents, web request logs Output data: inverted indices, summary of pages crawled per host, the set of the most frequent queries in a given day, … Most of these computation are relatively straight-forward To speedup computation and shorten processing time, we can distribute data across 100s of machines and process them in parallel But, parallel computations are difficult and complex to manage: Race conditions, debugging, data distribution, fault-tolerance, load balancing, etc Ideally, we would like to process data in parallel but not deal with the complexity of parallelisation and data distribution 3

MapReduce “A new abstraction that allows us to express the simple computations we were trying to perform but hides the messy details of parallelization, fault-tolerance, data distribution and load balancing in a library.” Programming model: Provides abstraction to express computation Library: To take care the runtime parallelisation of the computation. Managing of Parallelization, Fault Tolerance, Data Distribution and Load Balancing is invisible to the user and comes free Motivation: primarily meant for Google’s web indexing Once the documents are crawled Several mapreduce operations are run in sequence to index documents From the MapReduce paper notes presentation 4

Example: Counting the number of occurrences of each work in the text below from Wikipedia “Cloud computing is a recently evolved computing terminology or metaphor based on utility and consumption of computing resources. Cloud computing involves deploying groups of remote servers and software networks that allow centralized data storage and online access to computer services or resources. Cloud can be classified as public, private or hybrid.” Word: Number of Occurrences Cloud 1 computing 1 is 1 a 1 recently 1 evolved 1 computing 1? terminology 1 2 5

Programming Model Input: a set of key/value pairs Output: a set of key/value pairs Computation is expressed using the two functions: Map task: a single pair  a list of intermediate pairs map(input-key, input-value)  list(out-key, intermediate-value) <ki, vi>  { < kint, vint > } Reduce task: all intermediate pairs with the same kint  a list of values reduce(out-key, list(intermediate-value))  list(out-values) < kint, {vint} >  < ko, vo > 6

Example: Counting the number of occurrences of each work in a collection of documents map(String input_key, String input_value): // input_key: document name // input_value: document contents for each word w in input_value: EmitIntermediate(w, "1");   reduce(String output_key, Iterator intermediate_values): // output_key: a word // output_values: a list of counts int result = 0; for each v in intermediate_values: result += ParseInt(v); Emit(AsString(result)); 7

MapReduce Example Applications The MapReduce model can be applied to many applications: Distributed grep: map: emits a line, if line matched the pattern reduce: identity function Count of URL access Frequency Reverse Web-Link Graph Inverted Index Distributed Sort …. 8

MapReduce Implementation MapReduce implementation presented in the paper matched Google infrastructure at-the-time: Large cluster of commodity PCs connected via switched Ethernet Machines are typically dual-processor x86, running Linux, 2-4GB of mem! (slow machines for today’s standards) A cluster of machines, so failures are anticipated Storage with (GFS) Google File System (2003) on IDE disks attached to PCs. GFS is a distributed file system, uses replication for availability and reliability. Scheduling system: Users submit jobs Each job consists of tasks; scheduler assigns tasks to machines 9

Google File System (GFS) File is divided into several chunks of predefined size; Typically, 16-64 MB The system replicates each chunk by a number: Usually three replicas To achieve fault-tolerance, availability and reliability 10

Parallel Execution User specifies: Map: Reduce: Typical setting: M: number of map tasks R: number of reduce tasks Map: MapReduce library splits the input file into M pieces Typically 16-64MB per piece Map tasks are distributed across the machines Reduce: Partitioning the intermediate key space into R pieces hash(intermediate_key) mod R Typical setting: 2,000 machines M = 200,000 R = 5,000 11

Execution Flow 12 Best-effort round robin Hard-requirement earliest deadline first 12

Master Data Structures For each map/reduce task: State status {idle, in-progress, completed} Identity of the worker machine (for non-idle tasks) The location of intermediate file regions is passed from maps to reducers tasks through the master. This information is pushed incrementally (as map tasks finish) to workers that have in-progress reduce tasks. 13

Fault-Tolerance Two types of failures: worker failures: Identified by sending heartbeat messages by the master. If no response within a certain amount of time, then the worker is dead. In-progress and completed map tasks are re-scheduled  idle In-progress reduce tasks are re-scheduled  idle Workers executing reduce tasks affected from failed map/workers are notified of re-scheduling Question: Why completed tasks have to be re-scheduler? Answer: Map output is stored on local fs, while reduce output is stored on GFS master failure: Rare Can be recovered from checkpoints Solution: aborts the MapReduce computation and starts again Map tasks write their outputs on temporary files 14

Disk Locality Network bandwidth is a relatively scarce resource and also increases latency The goal is to save network bandwidth Use of GFS that stores typically three copies of the data block on different machines Map tasks are scheduled “close” to data On nodes that have input data (local disk) If not, on nodes that are nearer to input data (e.g., same switch) 15

Task Granularity Number of map tasks > number of worker nodes Better load balancing Better recovery But, this, increases load on the master More scheduling More states to be saved M could be chosen with respect to the block size of the file system For locality properties R is usually specified by users Each reduce tasks produces one output file 16

Stragglers Slow workers delay overall completion time  stragglers Bad disks with soft errors Other tasks using up resources Machine configuration problems, etc Very close to end of MapReduce operation, master schedules backup execution of the remaining in-progress tasks. A task is marked as complete whenever either the primary or the backup execution completes. Example: sort operation takes 44% longer to complete when the backup task mechanism is disabled. 17

Refinements: Partitioning Function Partitioning function identifies the reduce task Users specify the desired output files they want, R But, there may be more keys than R Uses the intermediate key and R Default: hash(key) mod R Important to choose well-balanced partitioning functions: hash(hostname(urlkey)) mod R For output keys that are URLs 18

Refinements: Combiner Function Introduce a mini-reduce phase before intermediate data is sent to reduce When there is significant repetition of intermediate keys Merge values of intermediate keys before sending to reduce tasks Example: word count, many records of the form <word_name, 1>. Merge records with the same word_name Similar to reduce function Saves network bandwidth 19

Evaluation - Setup Evaluation on two programs running on a large cluster and processing 1 TB of data: grep: search over 1010 100-byte records looking for a rare 3-character pattern sort: sorts 1010 100-byte records Cluster configuration: 1,800 machines Each machine has 2 GHz Intel Xeon proc., 4GB mem, 2 160GB IDE disks Gigabit Ethernet link Hosted in the same facility 20

Grep M = 15,000 of 64MB each split R = 1 Entire computation finishes at 150s Startup overhead ~60s Propagation of program to workers Delays to interact with GFS to open 1,000 files … Picks at 30GB/s with 1,764 workers 21

Sort M = 15,000 splits, 64MB each R = 4,000 files Workers = 1,700 Evaluated on three executions: With backup tasks Without backup tasks With machine failures 22

Sort Results a 5% increase over normal execution time Top: rate at which input is read Middle: rate at which data is sent from mappers to reducers Bottom: rate at which sorted data is written to output file by reducers Top: rate at which input is read Without backup tasks, 5 reduce tasks stragglers, 44% increase With machine failures, 200 out of 1746 workers, a 5% increase over normal execution time Normal execution with backup 23

Implementation First MapReduce library in 02/2003 Use cases (back then): Large-scale machine learning problems Clustering problems for the Google News Extraction of data for reports Google zeitgeist Large-scale graph computations MapReduce jobs run in 8/2004 24

Summary MapReduce is a very powerful and expressive model Performance depends a lot on implementation details Material is from the paper: “MapReduce: Simplified Data Processing on Large Clusters”, By Jeffrey Dean and Sanjay Ghemawat from Google published in Usenix OSDI conference, 2004 25