The DryadLINQ Approach to Distributed Data-Parallel Computing

Slides:



Advertisements
Similar presentations
Distributed Data-Parallel Programming using Dryad Andrew Birrell, Mihai Budiu, Dennis Fetterly, Michael Isard, Yuan Yu Microsoft Research Silicon Valley.
Advertisements

Cluster Computing with Dryad Mihai Budiu, MSR-SVC LiveLabs, March 2008.
MAP REDUCE PROGRAMMING Dr G Sudha Sadasivam. Map - reduce sort/merge based distributed processing Best for batch- oriented processing Sort/merge is primitive.
Introduction to Data Center Computing Derek Murray October 2010.
Machine Learning in DryadLINQ Kannan Achan Mihai Budiu MSR-SVC, 1/30/
Distributed Data-Parallel Computing Using a High-Level Programming Language Yuan Yu Michael Isard Joint work with: Andrew Birrell, Mihai Budiu, Jon Currey,
MapReduce.
epiC: an Extensible and Scalable System for Processing Big Data
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.
C# and LINQ Yuan Yu Microsoft Research Silicon Valley.
Parallel Computing MapReduce Examples Parallel Efficiency Assignment
UC Berkeley Spark Cluster Computing with Working Sets Matei Zaharia, Mosharaf Chowdhury, Michael Franklin, Scott Shenker, Ion Stoica.
Spark: Cluster Computing with Working Sets
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.
Data-Intensive Computing with MapReduce/Pig Pramod Bhatotia MPI-SWS Distributed Systems – Winter Semester 2014.
DryadLINQ A System for General-Purpose Distributed Data-Parallel Computing Yuan Yu, Michael Isard, Dennis Fetterly, Mihai Budiu, Úlfar Erlingsson, Pradeep.
Shark Cliff Engle, Antonio Lupher, Reynold Xin, Matei Zaharia, Michael Franklin, Ion Stoica, Scott Shenker Hive on Spark.
Optimus: A Dynamic Rewriting Framework for Data-Parallel Execution Plans Qifa Ke, Michael Isard, Yuan Yu Microsoft Research Silicon Valley EuroSys 2013.
DryadLINQ A System for General-Purpose Distributed Data-Parallel Computing Yuan Yu, Michael Isard, Dennis Fetterly, Mihai Budiu, Úlfar Erlingsson, Pradeep.
Monitoring and Debugging Dryad(LINQ) Applications with Daphne Vilas Jagannath, Zuoning Yin, Mihai Budiu University of Illinois, Microsoft Research SVC.
Distributed Computations
Distributed computing using Dryad Michael Isard Microsoft Research Silicon Valley.
Dryad / DryadLINQ Slides adapted from those of Yuan Yu and Michael Isard.
Map-Reduce and Parallel Computing for Large-Scale Media Processing Youjie Zhou.
Distributed Computations MapReduce
7/14/2015EECS 584, Fall MapReduce: Simplied Data Processing on Large Clusters Yunxing Dai, Huan Feng.
Take An Internal Look at Hadoop Hairong Kuang Grid Team, Yahoo! Inc
Applying Twister to Scientific Applications CloudCom 2010 Indianapolis, Indiana, USA Nov 30 – Dec 3, 2010.
Dryad and DryadLINQ Theophilus Benson CS Distributed Data-Parallel Programming using Dryad By Andrew Birrell, Mihai Budiu, Dennis Fetterly, Michael.
Microsoft DryadLINQ --Jinling Li. What’s DryadLINQ? A System for General-Purpose Distributed Data-Parallel Computing Using a High-Level Language. [1]
Image Processing Image Processing Windows HPC Server 2008 HPC Job Scheduler Dryad DryadLINQ Machine Learning Graph Analysis Graph Analysis Data Mining.NET.
MapReduce April 2012 Extract from various presentations: Sudarshan, Chungnam, Teradata Aster, …
Programming clusters with DryadLINQ Mihai Budiu Microsoft Research, Silicon Valley Association of C and C++ Users (ACCU) Mountain View, CA, April 13, 2011.
Cloud Computing Other High-level parallel processing languages Keke Chen.
Training Kinect Mihai Budiu Microsoft Research, Silicon Valley UCSD CNS 2012 RESEARCH REVIEW February 8, 2012.
1 Dryad Distributed Data-Parallel Programs from Sequential Building Blocks Michael Isard, Mihai Budiu, Yuan Yu, Andrew Birrell, Dennis Fetterly of Microsoft.
SALSASALSASALSASALSA Design Pattern for Scientific Applications in DryadLINQ CTP DataCloud-SC11 Hui Li Yang Ruan, Yuduo Zhou Judy Qiu, Geoffrey Fox.
Harp: Collective Communication on Hadoop Bingjing Zhang, Yang Ruan, Judy Qiu.
MATRIX MULTIPLY WITH DRYAD B649 Course Project Introduction.
MapReduce Kristof Bamps Wouter Deroey. Outline Problem overview MapReduce o overview o implementation o refinements o conclusion.
Grid Computing at Yahoo! Sameer Paranjpye Mahadev Konar Yahoo!
Hung-chih Yang 1, Ali Dasdan 1 Ruey-Lung Hsiao 2, D. Stott Parker 2
Dryad and DryaLINQ. Dryad and DryadLINQ Dryad provides automatic distributed execution DryadLINQ provides automatic query plan generation Dryad provides.
Chapter 5 Ranking with Indexes 1. 2 More Indexing Techniques n Indexing techniques:  Inverted files - best choice for most applications  Suffix trees.
MATRIX MULTIPLY WITH DRYAD B649 Course Project Introduction.
Definition DryadLINQ is a simple, powerful, and elegant programming environment for writing large-scale data parallel applications running on large PC.
Parallel Applications And Tools For Cloud Computing Environments CloudCom 2010 Indianapolis, Indiana, USA Nov 30 – Dec 3, 2010.
Large-scale Machine Learning using DryadLINQ Mihai Budiu Microsoft Research, Silicon Valley Ambient Intelligence: From Sensor Networks to Smart Environments.
REX: RECURSIVE, DELTA-BASED DATA-CENTRIC COMPUTATION Yavuz MESTER Svilen R. Mihaylov, Zachary G. Ives, Sudipto Guha University of Pennsylvania.
Implementation of Classifier Tool in Twister Magesh khanna Vadivelu Shivaraman Janakiraman.
EpiC: an Extensible and Scalable System for Processing Big Data Dawei Jiang, Gang Chen, Beng Chin Ooi, Kian Lee Tan, Sai Wu School of Computing, National.
Image taken from: slideshare
CS239-Lecture 3 DryadLINQ Madan Musuvathi Visiting Professor, UCLA
Some slides adapted from those of Yuan Yu and Michael Isard
Hadoop.
Distributed Programming in “Big Data” Systems Pramod Bhatotia wp
CSCI5570 Large Scale Data Processing Systems
Spark Presentation.
Abstract Major Cloud computing companies have started to integrate frameworks for parallel data processing in their product portfolio, making it easy for.
Introduction to MapReduce and Hadoop
MapReduce Computing Paradigm Basics Fall 2013 Elke A. Rundensteiner
Applying Twister to Scientific Applications
Overview of big data tools
MAPREDUCE TYPES, FORMATS AND FEATURES
DryadInc: Reusing work in large-scale computations
Fast, Interactive, Language-Integrated Cluster Computing
Server & Tools Business
Map Reduce, Types, Formats and Features
Presentation transcript:

The DryadLINQ Approach to Distributed Data-Parallel Computing Yuan Yu Microsoft Research Silicon Valley

Distributed Data-Parallel Computing Dryad talk: the execution layer How to reliably and efficiently execute distributed data-parallel programs on a compute cluster? This talk: the programming model How to write distributed data-parallel programs for a compute cluster?

The Programming Model Sequential, single machine programming abstraction Same program runs on single-core, multi-core, or cluster Preserve the existing programming environments Modern programming languages (C# and Java) are very good Expressive language and data model Strong static typing, GC, generics, … Modern IDEs (Visual Studio and Eclipse) are very good Great debugging and library support Legacy code could be easily reused

Dryad and DryadLINQ DryadLINQ provides automatic query plan generation Dryad provides automatic distributed execution

Outline Programming model DryadLINQ Applications Discussions and conclusion

LINQ Microsoft’s Language INtegrated Query Available in .NET3.5 and Visual Studio 2008 A set of operators to manipulate datasets in .NET Support traditional relational operators Select, Join, GroupBy, Aggregate, etc. Integrated into .NET programming languages Programs can invoke operators Operators can invoke arbitrary .NET functions Data model Data elements are strongly typed .NET objects Much more expressive than relational tables For example, nested data structures

LINQ provider interface LINQ Framework PLINQ Local machine .Net program (C#, VB, F#, etc) Execution engines Query Objects LINQ-to-SQL DryadLINQ LINQ-to-Obj LINQ provider interface Scalability Single-core Multi-core Cluster

A Simple LINQ Query IEnumerable<BabyInfo> babies = ...; var results = from baby in babies where baby.Name == queryName && baby.State == queryState && baby.Year >= yearStart && baby.Year <= yearEnd orderby baby.Year ascending select baby;

A Simple PLINQ Query IEnumerable<BabyInfo> babies = ...; var results = from baby in babies.AsParallel() where baby.Name == queryName && baby.State == queryState && baby.Year >= yearStart && baby.Year <= yearEnd orderby baby.Year ascending select baby;

A Simple DryadLINQ Query PartitionedTable<BabyInfo> babies = PartitionedTable.Get<BabyInfo>(“BabyInfo.pt”); var results = from baby in babies where baby.Name == queryName && baby.State == queryState && baby.Year >= yearStart && baby.Year <= yearEnd orderby baby.Year ascending select baby;

DryadLINQ Data Model .Net objects Partition Partitioned Table Partitioned table exposes metadata information type, partition, compression scheme, serialization, etc.

Demo It is just programming The same familiar programming languages, development tools, libraries, etc.

K-means Execution Graph ac cc C1 ac ac P1 P2 ac cc C2 P3 ac ac ac cc C3 ac ac

K-means in DryadLINQ public class Vector { public double[] entries; [Associative] public static Vector operator +(Vector v1, Vector v2) { … } public static Vector operator -(Vector v1, Vector v2) { … } public double Norm2() { …} } public static Vector NearestCenter(Vector v, IEnumerable<Vector> centers) { return centers.Aggregate((r, c) => (r - v).Norm2() < (c - v).Norm2() ? r : c); } public static IQueryable<Vector> Step(IQueryable<Vector> vectors, IQueryable<Vector> centers) { return vectors.GroupBy(v => NearestCenter(v, centers)) .Select(group => group.Aggregate((x,y) => x + y) / group.Count()); var vectors = PartitionedTable.Get<Vector>("dfs://vectors.pt"); var centers = vectors.Take(100); for (int i = 0; i < 10; i++) { centers = Step(vectors, centers); centers.ToPartitionedTable<Vector>(“dfs://centers.pt”); K-means clustering.

PageRank Execution Graph cc N01 ae D N11 cc ae D N12 N02 ae D cc N13 N03 cc E1 ae D N21 cc ae D N22 E2 ae D cc N23 E3 cc ae D N31 cc ae D N32 ae D cc N33

PageRank in DryadLINQ public static IQueryable<Rank> Step(IQueryable<Page> pages, IQueryable<Rank> ranks) { // join pages with ranks, and disperse updates var updates = from page in pages join rank in ranks on page.name equals rank.name select page.Disperse(rank); // re-accumulate. return from list in updates from rank in list group rank.rank by rank.name into g select new Rank(g.Key, g.Sum()); } public struct Page { public UInt64 name; public Int64 degree; public UInt64[] links; public Page(UInt64 n, Int64 d, UInt64[] l) { name = n; degree = d; links = l; } public Rank[] Disperse(Rank rank) { Rank[] ranks = new Rank[links.Length]; double score = rank.rank / this.degree; for (int i = 0; i < ranks.Length; i++) { ranks[i] = new Rank(this.links[i], score); } return ranks; public struct Rank { public double rank; public Rank(UInt64 n, double r) { name = n; rank = r; } var pages = PartitionedTable.Get<Page>(“dfs://pages.pt”); var ranks = pages.Select(page => new Rank(page.name, 1.0)); // repeat the iterative computation several times for (int iter = 0; iter < n; iter++) { ranks = Step(pages, ranks); } ranks.ToPartitionedTable<Rank>(“dfs://ranks.pt”);

MapReduce in DryadLINQ MapReduce(source, // sequence of Ts mapper, // T -> Ms keySelector, // M -> K reducer) // (K, Ms) -> Rs { var map = source.SelectMany(mapper); var group = map.GroupBy(keySelector); var result = group.SelectMany(reducer); return result; // sequence of Rs } // Ex: Count the frequencies of words in a book MapReduce(book, line => line.Split(' '), w => w.ToLower(), g => g.Count())

DryadLINQ System Architecture Client machine Cluster DryadLINQ Dryad .NET program Distributed query plan Query Expr Invoke Query plan Vertex code Input Tables LINQ query Dryad Execution Output Table .Net Objects Results foreach (11) Output Tables

DryadLINQ Distributed execution plan generation Vertex runtime Static optimizations: pipelining, eager aggregation, etc. Dynamic optimizations: data-dependent partitioning, dynamic aggregation, etc. Vertex runtime Single machine (multi-core) implementation of LINQ Vertex code that runs on vertices Data serialization code Callback code for runtime dynamic optimizations Automatically distributed to cluster machines

A Simple Example Count the frequencies of words in a book var map = book.SelectMany(line => line.Split(' ')); var group = map.GroupBy(w => w.ToLower()); var result = group.Select(g => g.Count());

Naïve Execution Plan ..... … line.Split(' ') M M M D D D g.Count() G G Map M M M map D D D Distribute Merge MG MG MG g.Count() G G … G GroupBy reduce R R R Reduce X X X Consumer

Execution Plan Using Partial Aggregation M M M Map g.Count() G1 G1 G1 GroupBy map IR IR IR InitialReduce D D D Distribute g.Sum() Merge MG MG GroupBy G2 G2 aggregation tree Combine C C Merge MG MG GroupBy G3 G3 g.Sum() reduce FinalReduce F F X X Consumer

Challenge: Program Analysis Support The main sources of difficulty Complicated data model User-defined functions all over the places Requires sophisticated static program analysis at byte-code level Mainly some form of flow analysis Possible with modern programming languages and runtimes, such as C#/CLR

Inferring Dataset Property Useful for query optimizations Hash(y => y.a+y.b) Select(x => new { A=x.a+x.b, B=f(x.c) } Hash(z => z.A) GroupBy(x => x.A) No data partitioning at GroupBy

Inferring Dataset Property Useful for query optimizations Hash(y => y.a+y.b) Select(x => Foo(x) } Hash(x => x.A)? Need IL-level data-flow analysis of Foo GroupBy(x => x.A)

Caching Query Results A cluster-wide caching service to support Reuse of common subqueries Incremental computations Cache: [Key  Value] Key is <q, d>, Value is the result of q(d) Key requires a pretty good reachability analysis For correctness, Key must include “everything” reachable from q For performance, Key should only contain things q depends on

More Static Analysis Purity checking Metadata validity checking All the functions called in DryadLINQ queries must be side-effect free DryadLINQ (and PLINQ) doesn’t enforce it Metadata validity checking Partitioned table’s metadata contains the record type, partition scheme, serialization functions, … Need to determine if the metadata is valid DryadLINQ doesn’t fully enforce it Static enforcement of program properties for security and privacy mechanisms

Examples of DryadLINQ Applications Data mining Analysis of service logs for network security Analysis of Windows Watson/SQM data Cluster monitoring and performance analysis Graph analysis Accelerated Page-Rank computation Road network shortest-path preprocessing Image processing Image indexing Decision tree training Epitome computation Simulation light flow simulations for next-generation display research Monte-Carlo simulations for mobile data eScience Machine learning platform for health solutions Astrophysics simulation

Decision Tree Training Mihai Budiu, Jamie Shotton et al Learn a decision tree to classify pixels in a large set of images label image Decision Tree Machine learning 1M images x 10,000 pixels x 2,000 features x 221 tree nodes Complexity >1020 objects

Sample Execution plan Initial empty tree Image inputs, partitioned Read, preprocess Redistribute Histogram Regroup histograms on node Compute new tree layer Compute new tree Broadcast new tree Final tree

Application Details Workflow = 37 DryadLINQ jobs 12 hours running time on 235 machines More than 100,000 processes More than 100 days of CPU time Recovers from several failures daily 34,000 lines of .NET code

Windows SQM Data Analysis Michal Strehovsky, Sivarudrappa Mahesh et al

The Language Integration Approach Single unified programming environment Unified data model and programming language Direct access to IDE and libraries Different from SQL, HIVE, Pig Latin Multiple layers of languages and data models Works out very well, but requires good programming language supports LINQ extensibility: custom operators/providers .NET reflection, dynamic code generation, …

Combining with PLINQ Query subquery DryadLINQ subquery PLINQ The combination of PLINQ and DryadLINQ delivers computation to every core in the cluster

Acyclic Dataflow Graph Acyclic dataflow graph provides a very powerful computation model Easy target for higher-level programming abstractions such as DryadLINQ Easy expression of many data-parallel optimizations We designed Dryad to be general and flexible Programmability is less of a concern Used primarily to support higher-level programming abstractions No major changes made to Dryad in order to support DryadLINQ

Expectation Maximization (Gaussians) Generated by DryadLINQ 3 iterations shown

Decoupling of Dryad and DryadLINQ Separation of concerns Dryad layer concerns scheduling and fault-tolerance DryadLINQ layer concerns the programming model and the parallelization of programs Result: powerful and expressive execution engine and programming model Different from the MapReduce/Hadoop approach A single abstraction for both programming model and execution engine Result: very simple, but very restricted execution engine and language

Cluster Services (Azure, HPC, or Cosmos) Software Stack …… Machine Learning Image Processing Graph Analysis Data Mining eScience Applications DryadLINQ Dryad CIFS/NTFS SQL Servers Azure DFS Cosmos DFS Cluster Services (Azure, HPC, or Cosmos) Windows Server Windows Server Windows Server Windows Server

Conclusion Single unified programming environment Unified data model and programming language Direct access to IDE and libraries An open and extensible system Many LINQ providers out there Existing ones: LINQ-to-XML, LINQ-to-SQL, PLINQ, … Very easy to write one for your app domain Dryad/DryadLINQ scales out all of them!

Availability Freely available for academic use http://connect.microsoft.com/DryadLINQ DryadLINQ source, Dryad binaries, documentation, samples, blog, discussion group, etc. Will be available soon for commercial use Free, but no product support