L22: Parallel Programming Language Features (Chapel and MapReduce) December 1, 2009.

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.
MapReduce Online Created by: Rajesh Gadipuuri Modified by: Ying Lu.
Distributed Computations
MapReduce: Simplified Data Processing on Large Clusters Cloud Computing Seminar SEECS, NUST By Dr. Zahid Anwar.
CS 345A Data Mining MapReduce. Single-node architecture Memory Disk CPU Machine Learning, Statistics “Classical” Data Mining.
Google’s Map Reduce. Commodity Clusters Web data sets can be very large – Tens to hundreds of terabytes Cannot mine on a single server Standard architecture.
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
Distributed MapReduce Team B Presented by: Christian Bryan Matthew Dailey Greg Opperman Nate Piper Brett Ponsler Samuel Song Alex Ostapenko Keilin Bickar.
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
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.
MapReduce “Divide and Conquer”.
Leroy Garcia. What is Map Reduce?  A patented programming model developed by Google Derived from LISP and other forms of functional programming  Used.
Google MapReduce Simplified Data Processing on Large Clusters Jeff Dean, Sanjay Ghemawat Google, Inc. Presented by Conroy Whitney 4 th year CS – Web Development.
Map Reduce: Simplified Data Processing On Large Clusters Jeffery Dean and Sanjay Ghemawat (Google Inc.) OSDI 2004 (Operating Systems Design and Implementation)
L23: Future Parallel Programming Languages November 30, 2010.
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,
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 and Hadoop 1 Wu-Jun Li Department of Computer Science and Engineering Shanghai Jiao Tong University Lecture 2: MapReduce and Hadoop Mining Massive.
1 The Map-Reduce Framework Compiled by Mark Silberstein, using slides from Dan Weld’s class at U. Washington, Yaniv Carmeli and some other.
MapReduce – An overview Medha Atre (May 7, 2008) Dept of Computer Science Rensselaer Polytechnic Institute.
MapReduce: Hadoop Implementation. Outline MapReduce overview Applications of MapReduce Hadoop overview.
Large-scale file systems and Map-Reduce Single-node architecture Memory Disk CPU Google example: 20+ billion web pages x 20KB = 400+ Terabyte 1 computer.
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.
Pregel: A System for Large-Scale Graph Processing Grzegorz Malewicz, Matthew H. Austern, Aart J. C. Bik, James C. Dehnert, Ilan Horn, Naty Leiser, and.
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.
CSC 660: Advanced Operating SystemsSlide #1 CSC 660: Advanced OS Concurrent Programming.
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.
By Jeff Dean & Sanjay Ghemawat Google Inc. OSDI 2004 Presented by : Mohit Deopujari.
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: Simplied Data Processing on Large Clusters Written By: Jeffrey Dean and Sanjay Ghemawat Presented By: Manoher Shatha & Naveen Kumar Ratkal.
COMP7330/7336 Advanced Parallel and Distributed Computing MapReduce - Introduction Dr. Xiao Qin Auburn University
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.
Large-scale file systems and Map-Reduce
MapReduce Simplied Data Processing on Large Clusters
湖南大学-信息科学与工程学院-计算机与科学系
February 26th – Map/Reduce
Map reduce use case Giuseppe Andronico INFN Sez. CT & Consorzio COMETA
Cse 344 May 4th – Map/Reduce.
Map-Reduce framework -By Jagadish Rouniyar.
CS 345A Data Mining MapReduce This presentation has been altered.
Cloud Computing MapReduce, Batch Processing
COS 518: Distributed Systems Lecture 11 Mike Freedman
MapReduce: Simplified Data Processing on Large Clusters
Presentation transcript:

L22: Parallel Programming Language Features (Chapel and MapReduce) December 1, 2009

Administrative Schedule for the rest of the semester -“Midterm Quiz” = long homework -Handed out over the holiday (Tuesday, Dec. 1) -Return by Dec. 15 -Projects -1 page status report on Dec. 3 –handin cs4961 pdesc -Poster session dry run (to see material) Dec. 8 -Poster details (next slide) Mailing list: 12/01/09

Poster Details I am providing: Foam core, tape, push pins, easels Plan on 2ft by 3ft or so of material (9-12 slides) Content: -Problem description and why it is important -Parallelization challenges -Parallel Algorithm -How are two programming models combined? -Performance results (speedup over sequential) 12/01/09

Outline Global View Languages Chapel Programming Language Map-Reduce (popularized by Google) Reading: Ch. 8 and 9 in textbook Sources for today’s lecture -Brad Chamberlain, Cray -John Gilbert, UCSB 12/01/09

Shifting Gears What are some important features of parallel programming languages (Ch. 9)? -Correctness -Performance -Scalability -Portability 12/01/09 And what about ease of programming?

Global View Versus Local View P-Independence -If and only if a program always produces the same output on the same input regardless of number or arrangement of processors Global view A language construct that preserves P-independence Example (today’s lecture) Local view -Does not preserve P-independent program behavior -Example from previous lecture? 12/01/09

What is a PGAS Language? PGAS = Partitioned Global Address Space -Present a global address space to the application developer -May still run on a distributed memory architecture -Examples: Co-Array Fortran, Unified Parallel C Modern parallel programming languages present a global address space abstraction -Performance? Portability? A closer look at a NEW global view language, Chapel -From DARPA High Productivity Computing Systems program -Language design initiated around Also X10 (IBM) and Fortress (Sun) 12/01/09

Chapel Domain Example: Sparse Matrices Recall sparse matrix-vector multiply computation from P1&P2 for (j=0; j<nr; j++) { for (k = rowstr[j]; k<rowstr[j+1]-1; k++) t[j] = t[j] + a[k] * x[colind[k]]; } 12/01/09

Chapel Formulation Declare a dense domain for sparse matrix const dnsDom = [1..n, 1..n]; Declare a sparse domain var spsDom: sparse subdomain(dnsDom); Var spsArr: [spsDom] real; Now you need to initialize the spsDom. As an example, spsDom = [(1,2),(2,3),(2,7),(3,6),(4,8),(5,9),(6,4),(9,8)]; Iterate over sparse domain: forall (i,j) in spsDom result[i] = result[i] + spsArr(i,j) * input[j]; 12/01/09

I. MapReduce What is MapReduce? Example computing environment How it works Fault Tolerance Debugging Performance

What is MapReduce? Parallel programming model meant for large clusters -User implements Map() and Reduce() ‏ Parallel computing framework -Libraries take care of EVERYTHING else -Parallelization -Fault Tolerance -Data Distribution -Load Balancing Useful model for many practical tasks (large data)

Map and Reduce Borrowed from functional programming languages (eg. Lisp) ‏ Map() ‏ -Process a key/value pair to generate intermediate key/value pairs Reduce() ‏ -Merge all intermediate values associated with the same key

Example: Counting Words Map() ‏ -Input -Parses file and emits pairs -eg. Reduce() ‏ -Sums values for the same key and emits -eg. =>

Example Use of MapReduce Counting words in a large set of documents map(string key, string value)‏ //key: document name //value: document contents for each word w in value EmitIntermediate(w, “1”); reduce(string key, iterator values)‏ //key: word //values: list of counts int results = 0; for each v in values result += ParseInt(v); Emit(AsString(result));

Google Computing Environment Typical Clusters contain 1000's of machines Dual-processor x86's running Linux with 2-4GB memory Commodity networking -Typically 100 Mbs or 1 Gbs IDE drives connected to individual machines -Distributed file system

How MapReduce Works User to do list: -i-indicate: -I-Input/output files -M-M: number of map tasks -R-R: number of reduce tasks -W-W: number of machines -W-Write map and reduce functions -S-Submit the job This requires no knowledge of parallel/distributed systems!!! What about everything else?

Data Distribution Input files are split into M pieces on distributed file system -Typically ~ 64 MB blocks Intermediate files created from map tasks are written to local disk Output files are written to distributed file system

Assigning Tasks Many copies of user program are started Tries to utilize data localization by running map tasks on machines with data One instance becomes the Master Master finds idle machines and assigns them tasks

Execution (map) ‏ Map workers read in contents of corresponding input partition Perform user-defined map computation to create intermediate pairs Periodically buffered output pairs written to local disk -Partitioned into R regions by a partitioning function

Partition Function Example partition function: hash(key) mod R Why do we need this? Example Scenario: -Want to do word counting on 10 documents -5 map tasks, 2 reduce tasks

Execution (reduce) ‏ Reduce workers iterate over ordered intermediate data -Each unique key encountered – values are passed to user's reduce function -eg. Output of user's reduce function is written to output file on global file system When all tasks have completed, master wakes up user program

Observations No reduce can begin until map is complete Tasks scheduled based on location of data If map worker fails any time before reduce finishes, task must be completely rerun Master must communicate locations of intermediate files MapReduce library does most of the hard work for us!

Fault Tolerance Workers are periodically pinged by master -No response = failed worker Master writes periodic checkpoints On errors, workers send “last gasp” UDP packet to master -Detect records that cause deterministic crashes and skips them

Fault Tolerance Input file blocks stored on multiple machines When computation almost done, reschedule in- progress tasks -Avoids “stragglers”

Debugging Offers human readable status info on http server -Users can see jobs completed, in-progress, processing rates, etc. Sequential implementation -Executed sequentially on a single machine -Allows use of gdb and other debugging tools

Performance Tests run on 1800 machines -4GB memory -Dual-processor # 2 GHz Xeons with Hyperthreading -Dual 160 GB IDE disks -Gigabit Ethernet per machine Run over weekend – when machines were mostly idle Benchmark: Sort -Sort 10^ byte records

Performance NormalNo Backup Tasks200 Processes Killed

MapReduce Conclusions Simplifies large-scale computations that fit this model Allows user to focus on the problem without worrying about details Computer architecture not very important -Portable model

References Jeffery Dean and Sanjay Ghemawat, MapReduce: Simplified Data Processing on Large Clusters Josh Carter, mixed.com/software/mapreduce_presentation.pdf Ralf Lammel, Google's MapReduce Programming Model – Revisited RELATED -Sawzall -Pig -Hadoop