Dryad and DryadLINQ Presented by Yin Zhu April 22, 2013 Slides taken from DryadLINQ project page: projects/dryadlinq/default.aspx.

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.
Introduction to Data Center Computing Derek Murray October 2010.
The DryadLINQ Approach to Distributed Data-Parallel Computing
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
MapReduce Online Created by: Rajesh Gadipuuri Modified by: Ying Lu.
C# and LINQ Yuan Yu Microsoft Research Silicon Valley.
Spark: Cluster Computing with Working Sets
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.
Nectar: Efficient Management of Computation and Data in Data Centers Lenin Ravindranath Pradeep Kumar Gunda, Chandu Thekkath, Yuan Yu, Li Zhuang.
Optimus: A Dynamic Rewriting Framework for Data-Parallel Execution Plans Qifa Ke, Michael Isard, Yuan Yu Microsoft Research Silicon Valley EuroSys 2013.
DryadLINQ: Computer Vision (among other things) on a cluster ECCV AC workshop 14 th June, 2008 Michael Isard Microsoft Research, Silicon Valley.
DryadLINQ A System for General-Purpose Distributed Data-Parallel Computing Yuan Yu, Michael Isard, Dennis Fetterly, Mihai Budiu, Úlfar Erlingsson, Pradeep.
Distributed Computations
From LINQ to DryadLINQ Michael Isard Workshop on Data-Intensive Scientific Computing Using DryadLINQ.
Distributed computing using Dryad Michael Isard Microsoft Research Silicon Valley.
Large Scale Data Processing with DryadLINQ Dennis Fetterly Microsoft Research, Silicon Valley Workshop on Data-Intensive Scientific Computing Using DryadLINQ.
Dryad / DryadLINQ Slides adapted from those of Yuan Yu and Michael Isard.
Cluster Computing with DryadLINQ Mihai Budiu, MSR-SVC PARC, May
MapReduce : Simplified Data Processing on Large Clusters Hongwei Wang & Sihuizi Jin & Yajing Zhang
SIDDHARTH MEHTA PURSUING MASTERS IN COMPUTER SCIENCE (FALL 2008) INTERESTS: SYSTEMS, WEB.
MapReduce.
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.
Map Reduce for data-intensive computing (Some of the content is adapted from the original authors’ talk at OSDI 04)
Cloud Computing Other High-level parallel processing languages Keke Chen.
Ex-MATE: Data-Intensive Computing with Large Reduction Objects and Its Application to Graph Mining Wei Jiang and Gagan Agrawal.
MapReduce: Simplified Data Processing on Large Clusters Jeffrey Dean and Sanjay Ghemawat.
Dryad and DryadLINQ Aditya Akella CS 838: Lecture 6.
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.
MapReduce M/R slides adapted from those of Jeff Dean’s.
The Limitation of MapReduce: A Probing Case and a Lightweight Solution Zhiqiang Ma Lin Gu Department of Computer Science and Engineering The Hong Kong.
SALSASALSASALSASALSA Design Pattern for Scientific Applications in DryadLINQ CTP DataCloud-SC11 Hui Li Yang Ruan, Yuduo Zhou Judy Qiu, Geoffrey Fox.
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.
CS 347Notes101 CS 347 Parallel and Distributed Data Processing Distributed Information Retrieval Hector Garcia-Molina Zoltan Gyongyi.
Hung-chih Yang 1, Ali Dasdan 1 Ruey-Lung Hsiao 2, D. Stott Parker 2
4 5 6 var logentries = from line in logs where !line.StartsWith("#") select new LogEntry(line); var user = from access in logentries where
Distributed Computations MapReduce/Dryad M/R slides adapted from those of Jeff Dean’s Dryad slides adapted from those of Michael Isard.
Dryad and DryaLINQ. Dryad and DryadLINQ Dryad provides automatic distributed execution DryadLINQ provides automatic query plan generation Dryad provides.
By Jeff Dean & Sanjay Ghemawat Google Inc. OSDI 2004 Presented by : Mohit Deopujari.
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.
A N I N - MEMORY F RAMEWORK FOR E XTENDED M AP R EDUCE 2011 Third IEEE International Conference on Coud Computing Technology and Science.
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.
Next Generation of Apache Hadoop MapReduce Owen
WHO WILL BENEFIT FROM THIS TALK TOPICS WHAT YOU’LL LEAVE WITH Developers looking to build applications that analyze big data. Developers building applications.
COMP7330/7336 Advanced Parallel and Distributed Computing MapReduce - Introduction Dr. Xiao Qin Auburn University
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.
CS239-Lecture 3 DryadLINQ Madan Musuvathi Visiting Professor, UCLA
Some slides adapted from those of Yuan Yu and Michael Isard
Majd F. Sakr, Suhail Rehman and
Distributed Programming in “Big Data” Systems Pramod Bhatotia wp
CSCI5570 Large Scale Data Processing Systems
Distributed Computations MapReduce/Dryad
Abstract Major Cloud computing companies have started to integrate frameworks for parallel data processing in their product portfolio, making it easy for.
Parallel Computing with Dryad
MapReduce Computing Paradigm Basics Fall 2013 Elke A. Rundensteiner
湖南大学-信息科学与工程学院-计算机与科学系
DryadInc: Reusing work in large-scale computations
5/7/2019 Map Reduce Map reduce.
COS 518: Distributed Systems Lecture 11 Mike Freedman
MapReduce: Simplified Data Processing on Large Clusters
Presentation transcript:

Dryad and DryadLINQ Presented by Yin Zhu April 22, 2013 Slides taken from DryadLINQ project page: projects/dryadlinq/default.aspx

Distributed Data-Parallel Programming using Dryad, EuroSys’07 Andrew Birrell, Mihai Budiu, Dennis Fetterly, Michael Isard, Yuan Yu Microsoft Research Silicon Valley

Dryad goals General-purpose execution environment for distributed, data-parallel applications –Concentrates on throughput not latency –Assumes private data center Automatic management of scheduling, distribution, fault tolerance, etc.

Talk outline Computational model Dryad architecture Some case studies DryadLINQ overview Summary

A typical data-intensive query var logentries = from line in logs where !line.StartsWith("#") select new LogEntry(line); var user = from access in logentries where select access; var accesses = from access in user group access by access.page into pages select new UserPageCount("ulfar", pages.Key, pages.Count()); var htmAccesses = from access in accesses where access.page.EndsWith(".htm") orderby access.count descending select access; Ulfar’s most frequently visited web pages

Steps in the query var logentries = from line in logs where !line.StartsWith("#") select new LogEntry(line); var user = from access in logentries where select access; var accesses = from access in user group access by access.page into pages select new UserPageCount("ulfar", pages.Key, pages.Count()); var htmAccesses = from access in accesses where access.page.EndsWith(".htm") orderby access.count descending select access; Go through logs and keep only lines that are not comments. Parse each line into a LogEntry object. Go through logentries and keep only entries that are accesses by ulfar. Group ulfar ’s accesses according to what page they correspond to. For each page, count the occurrences. Sort the pages ulfar has accessed according to access frequency.

Serial execution var logentries = from line in logs where !line.StartsWith("#") select new LogEntry(line); var user = from access in logentries where select access; var accesses = from access in user group access by access.page into pages select new UserPageCount("ulfar", pages.Key, pages.Count()); var htmAccesses = from access in accesses where access.page.EndsWith(".htm") orderby access.count descending select access; For each line in logs, do… For each entry in logentries, do.. Sort entries in user by page. Then iterate over sorted list, counting the occurrences of each page as you go. Re-sort entries in access by page frequency.

Parallel execution var logentries = from line in logs where !line.StartsWith("#") select new LogEntry(line); var user = from access in logentries where select access; var accesses = from access in user group access by access.page into pages select new UserPageCount("ulfar", pages.Key, pages.Count()); var htmAccesses = from access in accesses where access.page.EndsWith(".htm") orderby access.count descending select access;

How does Dryad fit in? Many programs can be represented as a distributed execution graph –The programmer may not have to know this “SQL-like” queries: LINQ –Spark (OSDI’12) utilizes the same idea. Dryad will run them for you

Talk outline Computational model Dryad architecture Some case studies DryadLINQ overview Summary

Runtime Services –Name Server –Daemon Job Manager –Centralized coordinating process –User application to construct graph –Linked with Dryad libraries for scheduling vertices Vertex executable –Dryad libraries to communicate with JM –User application sees channels in/out –Arbitrary application code, can use local FS

Job = Directed Acyclic Graph Processing vertices Channels (file, pipe, shared memory) Inputs Outputs

What’s wrong with MapReduce? Literally Map then Reduce and that’s it… –Reducers write to replicated storage Complex jobs pipeline multiple stages –No fault tolerance between stages Map assumes its data is always available: simple! Output of Reduce: 2 network copies, 3 disks –In Dryad this collapses inside a single process –Big jobs can be more efficient with Dryad

What’s wrong with Map+Reduce? Join combines inputs of different types “Split” produces outputs of different types –Parse a document, output text and references Can be done with Map+Reduce –Ugly to program –Hard to avoid performance penalty –Some merge joins very expensive Need to materialize entire cross product to disk

How about Map+Reduce+Join+…? “Uniform” stages aren’t really uniform

How about Map+Reduce+Join+…? “Uniform” stages aren’t really uniform

Graph complexity composes Non-trees common E.g. data-dependent re-partitioning –Combine this with merge trees etc. Distribute to equal-sized ranges Sample to estimate histogram Randomly partitioned inputs

Scheduler state machine Scheduling is independent of semantics –Vertex can run anywhere once all its inputs are ready Constraints/hints place it near its inputs –Fault tolerance If A fails, run it again If A’s inputs are gone, run upstream vertices again (recursively) If A is slow, run another copy elsewhere and use output from whichever finishes first

Dryad DAG architecture Simplicity depends on generality –Front ends only see graph data-structures –Generic scheduler state machine Software engineering: clean abstraction Restricting set of operations would pollute scheduling logic with execution semantics Optimizations all “above the fold” –Dryad exports callbacks so applications can react to state machine transitions

Talk outline Computational model Dryad architecture Some case studies DryadLINQ overview Summary

SkyServer DB Query 3-way join to find gravitational lens effect Table U: (objId, color) 11.8GB Table N: (objId, neighborId) 41.8GB Find neighboring stars with similar colors: –Join U+N to find T = U.color,N.neighborId where U.objId = N.objId –Join U+T to find U.objId where U.objId = T.neighborID and U.color ≈ T.color

Took SQL plan Manually coded in Dryad Manually partitioned data SkyServer DB query u: objid, color n: objid, neighborobjid [partition by objid] select u.color,n.neighborobjid from u join n where u.objid = n.objid (u.color,n.neighborobjid) [re-partition by n.neighborobjid] [order by n.neighborobjid] [distinct] [merge outputs] select u.objid from u join where u.objid =.neighborobjid and |u.color -.color| < d

Optimization D M S Y X M S M S M S UN U

D M S Y X M S M S M S UN U

Number of Computers Speed-up Dryad In-Memory Dryad Two-pass SQLServer 2005

Query histogram computation Input: log file (n partitions) Extract queries from log partitions Re-partition by hash of query (k buckets) Compute histogram within each bucket

Naïve histogram topology Pparse lines D hash distribute S quicksort C count occurrences MSmerge sort

Efficient histogram topology Pparse lines D hash distribute S quicksort C count occurrences MSmerge sort M non-deterministic merge Q' is:Each R is: Each MS C M P C S Q' RR k T k n T is: Each MS D C

RR T Q’ MS►C►D M►P►S►C MS►C Pparse linesDhash distribute SquicksortMSmerge sort Ccount occurrencesMnon-deterministic merge R

MS►C►D M►P►S►C MS►C Pparse linesDhash distribute SquicksortMSmerge sort Ccount occurrencesMnon-deterministic merge RR T R Q’

MS►C►D M►P►S►C MS►C Pparse linesDhash distribute SquicksortMSmerge sort Ccount occurrencesMnon-deterministic merge RR T R Q’ T

MS►C►D M►P►S►C MS►C Pparse linesDhash distribute SquicksortMSmerge sort Ccount occurrencesMnon-deterministic merge RR T R Q’ T

Pparse linesDhash distribute SquicksortMSmerge sort Ccount occurrencesMnon-deterministic merge MS►C►D M►P►S►C MS►C RR T R Q’ T

Pparse linesDhash distribute SquicksortMSmerge sort Ccount occurrencesMnon-deterministic merge MS►C►D M►P►S►C MS►C RR T R Q’ T

Final histogram refinement 1,800 computers 43,171 vertices 11,072 processes 11.5 minutes

Optimizing Dryad applications General-purpose refinement rules Processes formed from subgraphs –Re-arrange computations, change I/O type Application code not modified –System at liberty to make optimization choices High-level front ends hide this from user –SQL query planner, etc.

Talk outline Computational model Dryad architecture Some case studies DryadLINQ overview Summary

DryadLINQ (Yuan Yu et. al, OSDI’08) LINQ: Relational queries integrated in C# More general than distributed SQL –Inherits flexible C# type system and libraries –Data-clustering, EM, inference, … Uniform data-parallel programming model –From SMP to clusters

LINQ System Architecture Parallel LINQ 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

DryadLINQ System Architecture 40 DryadLINQ Client machine (11) Distributed query plan.NET program Query Expr Data center Output Tables Result s Input Tables Invoke Query Output DryadTable Dryad Executio n.Net Objects JM ToTable foreach Vertex code

An Example: PageRank Ranks web pages by propagating scores along hyperlink structure Each iteration as an SQL query: 1.Join edges with ranks 2.Distribute ranks on edges 3.GroupBy edge destination 4.Aggregate into ranks 5.Repeat

One PageRank Step in DryadLINQ // one step of pagerank: dispersing and re-accumulating rank public static IQueryable PRStep(IQueryable pages, IQueryable 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()); }

The Complete PageRank Program var pages = DryadLinq.GetTable (“file://pages.txt”); var ranks = pages.Select(page => new Rank(page.name, 1.0)); // repeat the iterative computation several times for (int iter = 0; iter < iterations; iter++) { ranks = PRStep(pages, ranks); } ranks.ToDryadTable (“outputranks.txt”); 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 UInt64 name; public double rank; public Rank(UInt64 n, double r) { name = n; rank = r; } } public static IQueryable PRStep(IQueryable pages, IQueryable 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()); }

One Iteration PageRank J S G C D M G R J S G C D M G R J S G C D Join pages and ranks Disperse page’s rank Group rank by page Accumulate ranks, partially Hash distribute Merge the data Group rank by page Accumulate ranks M G R … … Dynamic aggregation

Multi-Iteration PageRank pagesranks Iteration 1 Iteration 2 Iteration 3 Memory FIFO

Expectation Maximization 190 lines 3 iterations shown

Understanding Botnet Traffic using EM 3 GB data 15 clusters 60 computers 50 iterations 9000 processes 50 minutes

Image Processing Cosmos DFSSQL Servers Software Stack 48 Windows Server Cluster Services Azure Platform Dryad DryadLINQ Windows Server Other Languages CIFS/NTFS Machine Learning Graph Analysis Data Mining Applications … Other Applications

Lessons Deep language integration worked out well –Easy expression of massive parallelism –Elegant, unified data model based on.NET objects –Multiple language support: C#, VB, F#, … –Visual Studio and.NET libraries –Interoperate with PLINQ, LINQ-to-SQL, LINQ-to- Object, … Key enablers –Language side LINQ extensibility: custom operators/providers.NET reflection, dynamic code generation, … –System side Dryad generality: DAG model, runtime callback Clean separation of Dryad and DryadLINQ

Future Directions Goal: Use a cluster as if it is a single computer –Dryad/DryadLINQ represent a modest step On-going research –What can we write with DryadLINQ? Where and how to generalize the programming model? –Performance, usability, etc. How to debug/profile/analyze DryadLINQ apps? –Job scheduling How to schedule/execute N concurrent jobs? –Caching and incremental computation How to reuse previously computed results? –Static program checking A very compelling case for program analysis? Better catch bugs statically than fighting them in the cloud?

Summary General-purpose platform for scalable distributed data-processing of all sorts Very flexible –Optimizations can get more sophisticated Designed to be used as middleware –Slot different programming models on top –LINQ is very powerful

Related work inside MSR Dryad, EuroSys’07. DryadLINQ, OSDI’08. Steno: automatic optimization of declarative queries, PLDI’11. MadLINQ, largescale matrix computation. EuroSys’12 Best Paper. Optimus: A Dynamic Rewriting Framework for Data-Parallel Execution Plans. EuroSys’13. More: