Lecture 29: Distributed Systems

Slides:



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

UC Berkeley a Spark in the cloud iterative and interactive cluster computing Matei Zaharia, Mosharaf Chowdhury, Michael Franklin, Scott Shenker, Ion Stoica.
MapReduce Online Created by: Rajesh Gadipuuri Modified by: Ying Lu.
Matei Zaharia University of California, Berkeley Spark in Action Fast Big Data Analytics using Scala UC BERKELEY.
Comp6611 Course Lecture Big data applications Yang PENG Network and System Lab CSE, HKUST Monday, March 11, 2013 Material adapted from.
UC Berkeley Spark Cluster Computing with Working Sets Matei Zaharia, Mosharaf Chowdhury, Michael Franklin, Scott Shenker, Ion Stoica.
Spark: Cluster Computing with Working Sets
Spark Fast, Interactive, Language-Integrated Cluster Computing Wen Zhiguang
Matei Zaharia, Mosharaf Chowdhury, Tathagata Das, Ankur Dave, Justin Ma, Murphy McCauley, Michael Franklin, Scott Shenker, Ion Stoica Spark Fast, Interactive,
Spark Fast, Interactive, Language-Integrated Cluster Computing.
Matei Zaharia, Mosharaf Chowdhury, Tathagata Das, Ankur Dave, Justin Ma, Murphy McCauley, Michael Franklin, Scott Shenker, Ion Stoica Spark Fast, Interactive,
Distributed Computations
Mesos A Platform for Fine-Grained Resource Sharing in Data Centers Benjamin Hindman, Andy Konwinski, Matei Zaharia, Ali Ghodsi, Anthony D. Joseph, Randy.
Matei Zaharia, Mosharaf Chowdhury, Tathagata Das, Ankur Dave, Justin Ma, Murphy McCauley, Michael Franklin, Scott Shenker, Ion Stoica Spark Fast, Interactive,
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.
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.
MapReduce. Web data sets can be very large – Tens to hundreds of terabytes Cannot mine on a single server Standard architecture emerging: – Cluster of.
Map Reduce for data-intensive computing (Some of the content is adapted from the original authors’ talk at OSDI 04)
MapReduce: Simplified Data Processing on Large Clusters Jeffrey Dean and Sanjay Ghemawat.
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.
MapReduce M/R slides adapted from those of Jeff Dean’s.
MapReduce Kristof Bamps Wouter Deroey. Outline Problem overview MapReduce o overview o implementation o refinements o conclusion.
Spark. Spark ideas expressive computing system, not limited to map-reduce model facilitate system memory – avoid saving intermediate results to disk –
By Jeff Dean & Sanjay Ghemawat Google Inc. OSDI 2004 Presented by : Mohit Deopujari.
Resilient Distributed Datasets: A Fault- Tolerant Abstraction for In-Memory Cluster Computing Matei Zaharia, Mosharaf Chowdhury, Tathagata Das, Ankur Dave,
Lecture 7: Practical Computing with Large Data Sets cont. CS 6071 Big Data Engineering, Architecture, and Security Fall 2015, Dr. Rozier Special thanks.
Data Engineering How MapReduce Works
C-Store: MapReduce Jianlin Feng School of Software SUN YAT-SEN UNIVERSITY May. 22, 2009.
Other Map-Reduce (ish) Frameworks: Spark William Cohen 1.
Big Data Infrastructure Week 3: From MapReduce to Spark (2/2) This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0.
Resilient Distributed Datasets A Fault-Tolerant Abstraction for In-Memory Cluster Computing Matei Zaharia, Mosharaf Chowdhury, Tathagata Das, Ankur Dave,
Lecture 3 – MapReduce: Implementation CSE 490h – Introduction to Distributed Computing, Spring 2009 Except as otherwise noted, the content of this presentation.
Spark: Cluster Computing with Working Sets
Fast, Interactive, Language-Integrated Cluster Computing
About Hadoop Hadoop was one of the first popular open source big data technologies. It is a scalable fault-tolerant system for processing large datasets.
SparkBWA: Speeding Up the Alignment of High-Throughput DNA Sequencing Data - Aditi Thuse.
Spark.
Distributed Programming in “Big Data” Systems Pramod Bhatotia wp
Hadoop MapReduce Framework
Spark Presentation.
Apache Spark Resilient Distributed Datasets: A Fault-Tolerant Abstraction for In-Memory Cluster Computing Aditya Waghaye October 3, 2016 CS848 – University.
MapReduce Computing Paradigm Basics Fall 2013 Elke A. Rundensteiner
Introduction to Spark.
COS 518: Distributed Systems Lecture 10 Andrew Or, Mike Freedman
MapReduce Simplied Data Processing on Large Clusters
COS 418: Distributed Systems Lecture 1 Mike Freedman
湖南大学-信息科学与工程学院-计算机与科学系
February 26th – Map/Reduce
Cse 344 May 4th – Map/Reduce.
CS110: Discussion about Spark
Apache Spark Lecture by: Faria Kalim (lead TA) CS425, UIUC
Discretized Streams: A Fault-Tolerant Model for Scalable Stream Processing Zaharia, et al (2012)
Apache Spark Lecture by: Faria Kalim (lead TA) CS425 Fall 2018 UIUC
Introduction to MapReduce
Introduction to Spark.
CS639: Data Management for Data Science
5/7/2019 Map Reduce Map reduce.
Apache Hadoop and Spark
Fast, Interactive, Language-Integrated Cluster Computing
COS 518: Distributed Systems Lecture 11 Mike Freedman
MapReduce: Simplified Data Processing on Large Clusters
CS639: Data Management for Data Science
Presentation transcript:

Lecture 29: Distributed Systems CS 105 May 8, 2019 Slides drawn heavily from Vitaly's CS 5450, Fall 2018 https://pages.github.coecis.cornell.edu/cs5450/website/schedule.html

Conventional HPC System Compute nodes High-end processors Lots of RAM Network Specialized Very high performance Storage server RAID disk array

Conventional HPC Programming Model Programs described at a very low level detailed control of processing and scheduling Rely on a small number of software packages written by specialists limits problems and solutions methods

Typical HPC Operation Characteristics: Strengths Weaknesses long-lived processes make use of special locality hold all data in memory high-bandwidth communication Strengths High utilitization of resources Effective for many scientific applications Weaknesses Requires careful tuning of applications to resources Intolerant of any variability

HPC Fault Tolerance Checkpoint Restore after failure Periodically store state of all processes Significant I/O traffic Restore after failure Reset state to last checkpoint All intervening computation wasted Performance scaling Very sensitive to the number of failing components Wasted

Datacenters

Ideal Cluster Programming MOdel Applications written in terms of high-level operations on the data Runtime system controls scheduling, load balancing

MapReduce

MapReduce Programming Model Map computation across many data objects Aggregate results in many different ways System deals with resource allocation and availability

Example: Word Count In parallel, each worker computes word counts from individual files Collect results, wait until all finished Merge intermediate output Compute word count on merged intermediates

Parallel Map Process pieces of the dataset to generate (key, value) pairs in parallel Welcome everyone Hello everyone Welcome 1 everyone 1 Hello 1 Map Task 1 Map Task 2

Reduce Merge all intermediate values per key Welcome 1 everyone 1 Hello 1 everyone 2 Welcome 1 Hello 1

Partition Merge all intermediate values in parallel: partition keys, assign each key to one reduce task

MapReduce API

WordCount with MapReduce

WordCount with MapReduce

MapReduce Execution

Fault Tolerance in MapReduce Map worker writes intermediate output to local disk, separated by partitioning; once completed, tells master node Reduce worker told of location of map task outputs, pulls their partition’s data from each mapper, executes function across data Note: “All-to-all” shuffle between mappers and reducers Written to disk (“materialized”) before each stage

Fault Tolerance in MapReduce Master node monitors state of system If master fails, job aborts Map worker failure In-progress and completed tasks marked as idle Reduce workers notified when map task is re-executed on another map worker Reducer worker failure In-progress tasks are reset and re-executed Completed tasks had been written to global file system

Stragglers a straggler is task that takes long time to execute Bugs, flaky hardware, poor partitioning For slow map tasks, execute in parallel on second “map” worker as backup, race to complete task When done with most tasks, reschedule any remaining executing tasks Keep track of redundant executions Significantly reduces overall run time

Modern Data Processing

Apache Spark Goal 1: Extend the MapReduce model to better support two common classes of analytics apps Iterative algorithms (machine learning, graphs) Interactive data mining Goal 2: Enhance programmability Integrate into Scala programming language Allow interactive use from Scala interpreter Also support for Java, Python...

Data Flow Models Most current cluster programming models are based on acyclic data flow from stable storage to stable storage Example: MapReduce these models inefficient for applications that repeatedly reuse a working set of data Iterative algorithms (machine learning, graphs) Interactive data mining (R, Excel, Python) Map Map Map Map Map

Resilient Distributed Datasets (RDDs) Resilient distributed datasets (RDDs) are immutable, partitioned collections of objects spread across a cluster, stored in RAM or on disk Created through parallel transformations (map, filter, groupBy, join, ...) on data in stable storage Allow apps to cache working sets in memory for efficient reuse Retain the attractive properties of MapReduce Fault tolerance, data locality, scalability Actions on RDDs support many applications Count, reduce, collect, save...

Spark Operations Transformations: define a new RDD map, flatMap, filter, sample, groupByKey, sortByKey, union, join, etc. Actions: return a result to the driver program collect, reduce, count, lookupKey, save

Example: WordCount

Example: Logistic Regression Goal: find best line separating two sets of points val rdd = spark.textFile(...).map(readPoint) val data = rdd.cache() var w = Vector.random(D) for (i <- 1 to ITERATIONS) { val gradient = data.map(p => (1 / (1 + exp(-p.y*(w dot p.x))) - 1) * p.y * p.x ).reduce(_ + _) w -= gradient } println("Final w: " + w) random line best-fit line

Example: Logisitic Regression

Spark Scheduler creates DAG of stages Pipelines functions within a stage Cache-aware work reuse & locality Partitioning-aware to avoid shuffles

RDD Fault Tolerance RDD maintains lineage information that can be used to reconstruct lost partitions val rdd = spark.textFile(...).map(readPoint).filter(...) File Mapped RDD Filtered RDD

Distributed Systems Summary Machines Fail If you have lots of machines, machines will fail frequently Goals: Reliability, Consistency, Scalability, Transparency Abstractions are good, as long as they don’t cost you too much

So what's the take away…