SlideShare a Scribd company logo
1 of 74
Download to read offline
GraphLab: A New Framework For Parallel Machine
Learning
Amir H. Payberah
amir@sics.se
Amirkabir University of Technology
(Tehran Polytechnic)
Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 1 / 42
Reminder
Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 2 / 42
Data-Parallel Model for Large-Scale Graph Processing
The platforms that have worked well for developing parallel applica-
tions are not necessarily effective for large-scale graph problems.
Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 3 / 42
Graph-Parallel Processing
Restricts the types of computation.
New techniques to partition and distribute graphs.
Exploit graph structure.
Executes graph algorithms orders-of-magnitude faster than more
general data-parallel systems.
Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 4 / 42
Data-Parallel vs. Graph-Parallel Computation
Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 5 / 42
Pregel
Vertex-centric
Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 6 / 42
Pregel
Vertex-centric
Bulk Synchronous Parallel (BSP)
Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 6 / 42
Pregel
Vertex-centric
Bulk Synchronous Parallel (BSP)
Runs in sequence of iterations (supersteps)
Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 6 / 42
Pregel
Vertex-centric
Bulk Synchronous Parallel (BSP)
Runs in sequence of iterations (supersteps)
A vertex in superstep S can:
• reads messages sent to it in superstep S-1.
• sends messages to other vertices: receiving at superstep S+1.
• modifies its state.
Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 6 / 42
Pregel Limitations
Inefficient if different regions of the graph converge at different
speed.
Can suffer if one task is more expensive than the others.
Runtime of each phase is determined by the slowest machine.
Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 7 / 42
Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 8 / 42
Data Model
A directed graph that stores the program state, called data graph.
Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 9 / 42
Vertex Scope
The scope of vertex v is the data stored in vertex v, in all adjacent
vertices and adjacent edges.
Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 10 / 42
Programming Model (1/3)
Rather than adopting a message passing as in Pregel, GraphLab
allows the user defined function of a vertex to read and modify any
of the data in its scope.
Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 11 / 42
Programming Model (2/3)
Update function: user-defined function similar to Compute in Pregel.
Can read and modify the data within the scope of a vertex.
Schedules the future execution of other update functions.
Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 12 / 42
Programming Model (3/3)
Sync function: similar to aggregate in Pregel.
Maintains global aggregates.
Performs periodically in the background.
Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 13 / 42
Execution Model
Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 14 / 42
Execution Model
Each task in the set of tasks T , is a tuple (f, v) consisting of an
update function f and a vertex v.
Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 14 / 42
Execution Model
Each task in the set of tasks T , is a tuple (f, v) consisting of an
update function f and a vertex v.
After executing an update function (f, g, · · ·) the modified scope
data in Sv is written back to the data graph.
Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 14 / 42
Example: PageRank
GraphLab_PageRank(i)
// compute sum over neighbors
total = 0
foreach(j in in_neighbors(i)):
total = total + R[j] * wji
// update the PageRank
R[i] = 0.15 + total
// trigger neighbors to run again
foreach(j in out_neighbors(i)):
signal vertex-program on j
R[i] = 0.15 +
j∈Nbrs(i)
wjiR[j]
Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 15 / 42
Data Consistency (1/3)
Overlapped scopes: race-condition in simultaneous execution of two
update functions.
Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 16 / 42
Data Consistency (1/3)
Overlapped scopes: race-condition in simultaneous execution of two
update functions.
Full consistency: during the execution f(v), no other function reads
or modifies data within the v scope.
Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 16 / 42
Data Consistency (2/3)
Edge consistency: during the execution f(v), no other function
reads or modifies any of the data on v or any of the edges adja-
cent to v.
Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 17 / 42
Data Consistency (3/3)
Vertex consistency: during the execution f(v), no other function
will be applied to v.
Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 18 / 42
Sequential Consistency (1/2)
Proving the correctness of a parallel algorithm: sequential consistency
Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 19 / 42
Sequential Consistency (1/2)
Proving the correctness of a parallel algorithm: sequential consistency
Sequential consistency: if for every parallel execution, there exists a
sequential execution of update functions that produces an equivalent
result.
Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 19 / 42
Sequential Consistency (2/2)
A simple method to achieve serializability is to ensure that the scopes
of concurrently executing update functions do not overlap.
Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 20 / 42
Sequential Consistency (2/2)
A simple method to achieve serializability is to ensure that the scopes
of concurrently executing update functions do not overlap.
• The full consistency model is used.
Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 20 / 42
Sequential Consistency (2/2)
A simple method to achieve serializability is to ensure that the scopes
of concurrently executing update functions do not overlap.
• The full consistency model is used.
• The edge consistency model is used and update functions do not modify
data in adjacent vertices.
Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 20 / 42
Sequential Consistency (2/2)
A simple method to achieve serializability is to ensure that the scopes
of concurrently executing update functions do not overlap.
• The full consistency model is used.
• The edge consistency model is used and update functions do not modify
data in adjacent vertices.
• The vertex consistency model is used and update functions only access
local vertex data.
Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 20 / 42
Consistency vs. Parallelism
Consistency vs. Parallelism
[Low, Y., GraphLab: A Distributed Abstraction for Large Scale Machine Learning (Doctoral dissertation, University of
California), 2013.]
Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 21 / 42
GraphLab Implementation
Shared memory implementation
Distributed implementation
Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 22 / 42
GraphLab Implementation
Shared memory implementation
Distributed implementation
Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 22 / 42
Tasks Schedulers (1/2)
In what order should the tasks (vertex-update function pairs) be
called?
Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 23 / 42
Tasks Schedulers (1/2)
In what order should the tasks (vertex-update function pairs) be
called?
• A collection of base schedules, e.g., round-robin, and synchronous.
• Set scheduler: enables users to compose custom update schedules.
Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 23 / 42
Tasks Schedulers (2/2)
How to add new task in the queue?
Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 24 / 42
Tasks Schedulers (2/2)
How to add new task in the queue?
• FIFO: only permits task creation but do not permit task reordering.
• Prioritized: permits task reordering at the cost of increased overhead.
Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 24 / 42
Consistency
Implemented in C++ using PThreads for parallelism.
Consistency: read-write lock
Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 25 / 42
Consistency
Implemented in C++ using PThreads for parallelism.
Consistency: read-write lock
Vertex consistency
• Central vertex (write-lock)
Edge consistency
• Central vertex (write-lock)
• Adjacent vertices (read-locks)
Full consistency
• Central vertex (write-locks)
• Adjacent vertices (write-locks)
Deadlocks are avoided by acquiring locks sequentially following a
canonical order.
Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 25 / 42
GraphLab Implementation
Shared memory implementation
Distributed implementation
Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 26 / 42
Distributed Implementation
Graph partitioning
• How to efficiently load, partition and distribute the data graph across
machines?
Consistency
• How to achieve consistency in the distributed setting?
Fault tolerance
Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 27 / 42
Graph Partitioning
Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 28 / 42
Graph Partitioning - Phase 1 (1/2)
Two-phase partitioning.
Partitioning the data graph into k parts, called atom.
• k number of machines
Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 29 / 42
Graph Partitioning - Phase 1 (1/2)
Two-phase partitioning.
Partitioning the data graph into k parts, called atom.
• k number of machines
meta-graph: the graph of atoms (one vertex for each atom).
Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 29 / 42
Graph Partitioning - Phase 1 (1/2)
Two-phase partitioning.
Partitioning the data graph into k parts, called atom.
• k number of machines
meta-graph: the graph of atoms (one vertex for each atom).
Atom weight: the amount of data it stores.
Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 29 / 42
Graph Partitioning - Phase 1 (1/2)
Two-phase partitioning.
Partitioning the data graph into k parts, called atom.
• k number of machines
meta-graph: the graph of atoms (one vertex for each atom).
Atom weight: the amount of data it stores.
Edge weight: the number of edges crossing the atoms.
Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 29 / 42
Graph Partitioning - Phase 1 (2/2)
Each atom is stored as a separate file on a distributed storage system,
e.g., HDFS.
Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 30 / 42
Graph Partitioning - Phase 1 (2/2)
Each atom is stored as a separate file on a distributed storage system,
e.g., HDFS.
Each atom file is a simple binary that stores interior and the ghosts
of the partition information.
Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 30 / 42
Graph Partitioning - Phase 1 (2/2)
Each atom is stored as a separate file on a distributed storage system,
e.g., HDFS.
Each atom file is a simple binary that stores interior and the ghosts
of the partition information.
Ghost: set of vertices and edges adjacent to the partition boundary.
Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 30 / 42
Graph Partitioning - Phase 2
Meta-graph is very small.
A fast balanced partition of the meta-graph over the physical ma-
chines.
Assigning graph atoms to machines.
Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 31 / 42
Consistency
Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 32 / 42
Consistency
To achieve a serializable parallel execution of a set of dependent
tasks.
• Chromatic engine
• Distributed locking engine
Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 33 / 42
Consistency - Chromatic Engine
Construct a vertex coloring: assigns a color to each vertex such that
no adjacent vertices share the same color.
Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 34 / 42
Consistency - Chromatic Engine
Construct a vertex coloring: assigns a color to each vertex such that
no adjacent vertices share the same color.
Edge consistency: executing, synchronously, all update tasks asso-
ciated with vertices of the same color before proceeding to the next
color.
Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 34 / 42
Consistency - Chromatic Engine
Construct a vertex coloring: assigns a color to each vertex such that
no adjacent vertices share the same color.
Edge consistency: executing, synchronously, all update tasks asso-
ciated with vertices of the same color before proceeding to the next
color.
Full consistency: no vertex shares the same color as any of its dis-
tance two neighbors.
Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 34 / 42
Consistency - Chromatic Engine
Construct a vertex coloring: assigns a color to each vertex such that
no adjacent vertices share the same color.
Edge consistency: executing, synchronously, all update tasks asso-
ciated with vertices of the same color before proceeding to the next
color.
Full consistency: no vertex shares the same color as any of its dis-
tance two neighbors.
Vertex consistency: assigning all vertices the same color.
Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 34 / 42
Consistency - Distributed Locking Engine
Associating a readers-writer lock with each vertex.
Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 35 / 42
Consistency - Distributed Locking Engine
Associating a readers-writer lock with each vertex.
Vertex consistency
• Central vertex (write-lock)
Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 35 / 42
Consistency - Distributed Locking Engine
Associating a readers-writer lock with each vertex.
Vertex consistency
• Central vertex (write-lock)
Edge consistency
• Central vertex (write-lock), Adjacent vertices (read-locks)
Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 35 / 42
Consistency - Distributed Locking Engine
Associating a readers-writer lock with each vertex.
Vertex consistency
• Central vertex (write-lock)
Edge consistency
• Central vertex (write-lock), Adjacent vertices (read-locks)
Full consistency
• Central vertex (write-locks), Adjacent vertices (write-locks)
Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 35 / 42
Consistency - Distributed Locking Engine
Associating a readers-writer lock with each vertex.
Vertex consistency
• Central vertex (write-lock)
Edge consistency
• Central vertex (write-lock), Adjacent vertices (read-locks)
Full consistency
• Central vertex (write-locks), Adjacent vertices (write-locks)
Deadlocks are avoided by acquiring locks sequentially following a
canonical order.
Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 35 / 42
Fault Tolerance
Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 36 / 42
Fault Tolerance - Synchronous
The systems periodically signals all computation activity to halt.
Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 37 / 42
Fault Tolerance - Synchronous
The systems periodically signals all computation activity to halt.
Then synchronizes all caches (ghosts) and saves to disk all data
which has been modified since the last snapshot.
Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 37 / 42
Fault Tolerance - Synchronous
The systems periodically signals all computation activity to halt.
Then synchronizes all caches (ghosts) and saves to disk all data
which has been modified since the last snapshot.
Simple, but eliminates the systems advantage of asynchronous com-
putation.
Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 37 / 42
Fault Tolerance - Asynchronous
Based on the Chandy-Lamport algorithm.
Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 38 / 42
Fault Tolerance - Asynchronous
Based on the Chandy-Lamport algorithm.
The snapshot function is implemented as an update function in
vertices.
Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 38 / 42
Fault Tolerance - Asynchronous
Based on the Chandy-Lamport algorithm.
The snapshot function is implemented as an update function in
vertices.
The snapshot update takes priority over all other update functions.
Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 38 / 42
Fault Tolerance - Asynchronous
Based on the Chandy-Lamport algorithm.
The snapshot function is implemented as an update function in
vertices.
The snapshot update takes priority over all other update functions.
Edge Consistency is used on all update functions.
Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 38 / 42
Fault Tolerance - Asynchronous
Based on the Chandy-Lamport algorithm.
The snapshot function is implemented as an update function in
vertices.
The snapshot update takes priority over all other update functions.
Edge Consistency is used on all update functions.
Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 38 / 42
Summary
Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 39 / 42
GraphLab Summary
Asynchronous model
Vertex-centric
Communication: distributed shared memory
Three consistency levels: full, edge-level, and vertex-level
Partitioning: two-phase partitioning
Consistency: chromatic engine (graph coloring), distributed lock
engine (reader-writer lock)
Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 40 / 42
GraphLab Limitations
Poor performance on Natural graphs.
Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 41 / 42
Questions?
Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 42 / 42

More Related Content

What's hot

AHF_IDETC_2011_Jie
AHF_IDETC_2011_JieAHF_IDETC_2011_Jie
AHF_IDETC_2011_Jie
MDO_Lab
 
[Capella Day 2019] Model execution and system simulation in Capella
[Capella Day 2019] Model execution and system simulation in Capella[Capella Day 2019] Model execution and system simulation in Capella
[Capella Day 2019] Model execution and system simulation in Capella
Obeo
 
M.G.Goman, A.V.Khramtsovsky (2008) - Computational framework for investigatio...
M.G.Goman, A.V.Khramtsovsky (2008) - Computational framework for investigatio...M.G.Goman, A.V.Khramtsovsky (2008) - Computational framework for investigatio...
M.G.Goman, A.V.Khramtsovsky (2008) - Computational framework for investigatio...
Project KRIT
 
Component Based Control System Design
Component Based Control System DesignComponent Based Control System Design
Component Based Control System Design
M Reza Rahmati
 
(8) modeling of transfer function characteristic of rlc circuit
(8) modeling of transfer function characteristic of rlc circuit(8) modeling of transfer function characteristic of rlc circuit
(8) modeling of transfer function characteristic of rlc circuit
Al Al
 
Pid output fuzzified water level control in mimo coupled tank system
Pid output fuzzified water level control in mimo coupled tank systemPid output fuzzified water level control in mimo coupled tank system
Pid output fuzzified water level control in mimo coupled tank system
IAEME Publication
 

What's hot (20)

Aws100 ch06 thermal
Aws100 ch06 thermalAws100 ch06 thermal
Aws100 ch06 thermal
 
FEA- Introduction
FEA- IntroductionFEA- Introduction
FEA- Introduction
 
Design and Implementation of Single Precision Pipelined Floating Point Co-Pro...
Design and Implementation of Single Precision Pipelined Floating Point Co-Pro...Design and Implementation of Single Precision Pipelined Floating Point Co-Pro...
Design and Implementation of Single Precision Pipelined Floating Point Co-Pro...
 
Advanced property tracking Industrial Modeling Framework
Advanced property tracking Industrial Modeling FrameworkAdvanced property tracking Industrial Modeling Framework
Advanced property tracking Industrial Modeling Framework
 
Learning ANSYS Fluent R19 using modeling a Fluidized Bed with nano particles
Learning ANSYS Fluent R19 using modeling a Fluidized Bed with nano particles Learning ANSYS Fluent R19 using modeling a Fluidized Bed with nano particles
Learning ANSYS Fluent R19 using modeling a Fluidized Bed with nano particles
 
AHF_IDETC_2011_Jie
AHF_IDETC_2011_JieAHF_IDETC_2011_Jie
AHF_IDETC_2011_Jie
 
Novel high functionality fault tolerant ALU
Novel high functionality fault tolerant ALUNovel high functionality fault tolerant ALU
Novel high functionality fault tolerant ALU
 
J045075661
J045075661J045075661
J045075661
 
Comparative analysis of cascade h-bridge multilevel Voltage source inverter
Comparative analysis of cascade h-bridge multilevel  Voltage source inverterComparative analysis of cascade h-bridge multilevel  Voltage source inverter
Comparative analysis of cascade h-bridge multilevel Voltage source inverter
 
Advanced Data Science with Apache Spark-(Reza Zadeh, Stanford)
Advanced Data Science with Apache Spark-(Reza Zadeh, Stanford)Advanced Data Science with Apache Spark-(Reza Zadeh, Stanford)
Advanced Data Science with Apache Spark-(Reza Zadeh, Stanford)
 
[Capella Day 2019] Model execution and system simulation in Capella
[Capella Day 2019] Model execution and system simulation in Capella[Capella Day 2019] Model execution and system simulation in Capella
[Capella Day 2019] Model execution and system simulation in Capella
 
M.G.Goman, A.V.Khramtsovsky (2008) - Computational framework for investigatio...
M.G.Goman, A.V.Khramtsovsky (2008) - Computational framework for investigatio...M.G.Goman, A.V.Khramtsovsky (2008) - Computational framework for investigatio...
M.G.Goman, A.V.Khramtsovsky (2008) - Computational framework for investigatio...
 
ACES_Journal_February_2012_Paper_07
ACES_Journal_February_2012_Paper_07ACES_Journal_February_2012_Paper_07
ACES_Journal_February_2012_Paper_07
 
Estimation of Base Drag On Supersonic Cruise Missile
Estimation of Base Drag On Supersonic Cruise MissileEstimation of Base Drag On Supersonic Cruise Missile
Estimation of Base Drag On Supersonic Cruise Missile
 
CFD & ANSYS FLUENT
CFD & ANSYS FLUENTCFD & ANSYS FLUENT
CFD & ANSYS FLUENT
 
Iaetsd 128-bit area
Iaetsd 128-bit areaIaetsd 128-bit area
Iaetsd 128-bit area
 
Component Based Control System Design
Component Based Control System DesignComponent Based Control System Design
Component Based Control System Design
 
(8) modeling of transfer function characteristic of rlc circuit
(8) modeling of transfer function characteristic of rlc circuit(8) modeling of transfer function characteristic of rlc circuit
(8) modeling of transfer function characteristic of rlc circuit
 
Pid output fuzzified water level control in mimo coupled tank system
Pid output fuzzified water level control in mimo coupled tank systemPid output fuzzified water level control in mimo coupled tank system
Pid output fuzzified water level control in mimo coupled tank system
 
IRJET- A Study on Algorithms for FFT Computations
IRJET- A Study on Algorithms for FFT ComputationsIRJET- A Study on Algorithms for FFT Computations
IRJET- A Study on Algorithms for FFT Computations
 

Viewers also liked

Viewers also liked (20)

MapReduce
MapReduceMapReduce
MapReduce
 
Introduction to stream processing
Introduction to stream processingIntroduction to stream processing
Introduction to stream processing
 
Process Management - Part3
Process Management - Part3Process Management - Part3
Process Management - Part3
 
Linux Module Programming
Linux Module ProgrammingLinux Module Programming
Linux Module Programming
 
Process Management - Part1
Process Management - Part1Process Management - Part1
Process Management - Part1
 
MegaStore and Spanner
MegaStore and SpannerMegaStore and Spanner
MegaStore and Spanner
 
Introduction to Operating Systems - Part3
Introduction to Operating Systems - Part3Introduction to Operating Systems - Part3
Introduction to Operating Systems - Part3
 
Threads
ThreadsThreads
Threads
 
Mesos and YARN
Mesos and YARNMesos and YARN
Mesos and YARN
 
IO Systems
IO SystemsIO Systems
IO Systems
 
Main Memory - Part2
Main Memory - Part2Main Memory - Part2
Main Memory - Part2
 
Process Management - Part2
Process Management - Part2Process Management - Part2
Process Management - Part2
 
Introduction to Operating Systems - Part2
Introduction to Operating Systems - Part2Introduction to Operating Systems - Part2
Introduction to Operating Systems - Part2
 
Cloud Computing
Cloud ComputingCloud Computing
Cloud Computing
 
Security
SecuritySecurity
Security
 
Protection
ProtectionProtection
Protection
 
Storage
StorageStorage
Storage
 
CPU Scheduling - Part2
CPU Scheduling - Part2CPU Scheduling - Part2
CPU Scheduling - Part2
 
The Stratosphere Big Data Analytics Platform
The Stratosphere Big Data Analytics PlatformThe Stratosphere Big Data Analytics Platform
The Stratosphere Big Data Analytics Platform
 
Process Synchronization - Part2
Process Synchronization -  Part2Process Synchronization -  Part2
Process Synchronization - Part2
 

Similar to Graph processing - Graphlab

Raminder kaur presentation_two
Raminder kaur presentation_twoRaminder kaur presentation_two
Raminder kaur presentation_two
ramikaurraminder
 
Parallelization of Graceful Labeling Using Open MP
Parallelization of Graceful Labeling Using Open MPParallelization of Graceful Labeling Using Open MP
Parallelization of Graceful Labeling Using Open MP
IJSRED
 
Apache Hadoop India Summit 2011 Keynote talk "Programming Abstractions for Sm...
Apache Hadoop India Summit 2011 Keynote talk "Programming Abstractions for Sm...Apache Hadoop India Summit 2011 Keynote talk "Programming Abstractions for Sm...
Apache Hadoop India Summit 2011 Keynote talk "Programming Abstractions for Sm...
Yahoo Developer Network
 
Hardware and Software parallelism
Hardware and Software parallelismHardware and Software parallelism
Hardware and Software parallelism
prashantdahake
 

Similar to Graph processing - Graphlab (20)

Raminder kaur presentation_two
Raminder kaur presentation_twoRaminder kaur presentation_two
Raminder kaur presentation_two
 
GRAPH MATCHING ALGORITHM FOR TASK ASSIGNMENT PROBLEM
GRAPH MATCHING ALGORITHM FOR TASK ASSIGNMENT PROBLEMGRAPH MATCHING ALGORITHM FOR TASK ASSIGNMENT PROBLEM
GRAPH MATCHING ALGORITHM FOR TASK ASSIGNMENT PROBLEM
 
Data Parallel and Object Oriented Model
Data Parallel and Object Oriented ModelData Parallel and Object Oriented Model
Data Parallel and Object Oriented Model
 
Report_Altair
Report_AltairReport_Altair
Report_Altair
 
Concurrent Matrix Multiplication on Multi-core Processors
Concurrent Matrix Multiplication on Multi-core ProcessorsConcurrent Matrix Multiplication on Multi-core Processors
Concurrent Matrix Multiplication on Multi-core Processors
 
Spark
SparkSpark
Spark
 
HIGH-LEVEL LANGUAGE EXTENSIONS FOR FAST EXECUTION OF PIPELINE-PARALLELIZED CO...
HIGH-LEVEL LANGUAGE EXTENSIONS FOR FAST EXECUTION OF PIPELINE-PARALLELIZED CO...HIGH-LEVEL LANGUAGE EXTENSIONS FOR FAST EXECUTION OF PIPELINE-PARALLELIZED CO...
HIGH-LEVEL LANGUAGE EXTENSIONS FOR FAST EXECUTION OF PIPELINE-PARALLELIZED CO...
 
Parallelization of Graceful Labeling Using Open MP
Parallelization of Graceful Labeling Using Open MPParallelization of Graceful Labeling Using Open MP
Parallelization of Graceful Labeling Using Open MP
 
A new reverse engineering approach to
A new reverse engineering approach toA new reverse engineering approach to
A new reverse engineering approach to
 
Performance comparison of row per slave and rows set
Performance comparison of row per slave and rows setPerformance comparison of row per slave and rows set
Performance comparison of row per slave and rows set
 
Performance comparison of row per slave and rows set per slave method in pvm ...
Performance comparison of row per slave and rows set per slave method in pvm ...Performance comparison of row per slave and rows set per slave method in pvm ...
Performance comparison of row per slave and rows set per slave method in pvm ...
 
Apache Hadoop India Summit 2011 Keynote talk "Programming Abstractions for Sm...
Apache Hadoop India Summit 2011 Keynote talk "Programming Abstractions for Sm...Apache Hadoop India Summit 2011 Keynote talk "Programming Abstractions for Sm...
Apache Hadoop India Summit 2011 Keynote talk "Programming Abstractions for Sm...
 
Hb2412611268
Hb2412611268Hb2412611268
Hb2412611268
 
Analysis of Impact of Graph Theory in Computer Application
Analysis of Impact of Graph Theory in Computer ApplicationAnalysis of Impact of Graph Theory in Computer Application
Analysis of Impact of Graph Theory in Computer Application
 
Automatic Compilation Of MATLAB Programs For Synergistic Execution On Heterog...
Automatic Compilation Of MATLAB Programs For Synergistic Execution On Heterog...Automatic Compilation Of MATLAB Programs For Synergistic Execution On Heterog...
Automatic Compilation Of MATLAB Programs For Synergistic Execution On Heterog...
 
Performance Analysis of Parallel Algorithms on Multi-core System using OpenMP
Performance Analysis of Parallel Algorithms on Multi-core System using OpenMP Performance Analysis of Parallel Algorithms on Multi-core System using OpenMP
Performance Analysis of Parallel Algorithms on Multi-core System using OpenMP
 
Hypergraph for consensus optimization
Hypergraph for consensus optimizationHypergraph for consensus optimization
Hypergraph for consensus optimization
 
Hardware and Software parallelism
Hardware and Software parallelismHardware and Software parallelism
Hardware and Software parallelism
 
BARRACUDA, AN OPEN SOURCE FRAMEWORK FOR PARALLELIZING DIVIDE AND CONQUER ALGO...
BARRACUDA, AN OPEN SOURCE FRAMEWORK FOR PARALLELIZING DIVIDE AND CONQUER ALGO...BARRACUDA, AN OPEN SOURCE FRAMEWORK FOR PARALLELIZING DIVIDE AND CONQUER ALGO...
BARRACUDA, AN OPEN SOURCE FRAMEWORK FOR PARALLELIZING DIVIDE AND CONQUER ALGO...
 
Swift Parallel Scripting for High-Performance Workflow
Swift Parallel Scripting for High-Performance WorkflowSwift Parallel Scripting for High-Performance Workflow
Swift Parallel Scripting for High-Performance Workflow
 

More from Amir Payberah (13)

P2P Content Distribution Network
P2P Content Distribution NetworkP2P Content Distribution Network
P2P Content Distribution Network
 
Data Intensive Computing Frameworks
Data Intensive Computing FrameworksData Intensive Computing Frameworks
Data Intensive Computing Frameworks
 
The Spark Big Data Analytics Platform
The Spark Big Data Analytics PlatformThe Spark Big Data Analytics Platform
The Spark Big Data Analytics Platform
 
File System Implementation - Part2
File System Implementation - Part2File System Implementation - Part2
File System Implementation - Part2
 
File System Implementation - Part1
File System Implementation - Part1File System Implementation - Part1
File System Implementation - Part1
 
File System Interface
File System InterfaceFile System Interface
File System Interface
 
Virtual Memory - Part2
Virtual Memory - Part2Virtual Memory - Part2
Virtual Memory - Part2
 
Virtual Memory - Part1
Virtual Memory - Part1Virtual Memory - Part1
Virtual Memory - Part1
 
Main Memory - Part1
Main Memory - Part1Main Memory - Part1
Main Memory - Part1
 
Deadlocks
DeadlocksDeadlocks
Deadlocks
 
CPU Scheduling - Part1
CPU Scheduling - Part1CPU Scheduling - Part1
CPU Scheduling - Part1
 
Process Synchronization - Part1
Process Synchronization -  Part1Process Synchronization -  Part1
Process Synchronization - Part1
 
Introduction to Operating Systems - Part1
Introduction to Operating Systems - Part1Introduction to Operating Systems - Part1
Introduction to Operating Systems - Part1
 

Recently uploaded

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Recently uploaded (20)

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 

Graph processing - Graphlab

  • 1. GraphLab: A New Framework For Parallel Machine Learning Amir H. Payberah amir@sics.se Amirkabir University of Technology (Tehran Polytechnic) Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 1 / 42
  • 2. Reminder Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 2 / 42
  • 3. Data-Parallel Model for Large-Scale Graph Processing The platforms that have worked well for developing parallel applica- tions are not necessarily effective for large-scale graph problems. Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 3 / 42
  • 4. Graph-Parallel Processing Restricts the types of computation. New techniques to partition and distribute graphs. Exploit graph structure. Executes graph algorithms orders-of-magnitude faster than more general data-parallel systems. Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 4 / 42
  • 5. Data-Parallel vs. Graph-Parallel Computation Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 5 / 42
  • 6. Pregel Vertex-centric Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 6 / 42
  • 7. Pregel Vertex-centric Bulk Synchronous Parallel (BSP) Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 6 / 42
  • 8. Pregel Vertex-centric Bulk Synchronous Parallel (BSP) Runs in sequence of iterations (supersteps) Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 6 / 42
  • 9. Pregel Vertex-centric Bulk Synchronous Parallel (BSP) Runs in sequence of iterations (supersteps) A vertex in superstep S can: • reads messages sent to it in superstep S-1. • sends messages to other vertices: receiving at superstep S+1. • modifies its state. Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 6 / 42
  • 10. Pregel Limitations Inefficient if different regions of the graph converge at different speed. Can suffer if one task is more expensive than the others. Runtime of each phase is determined by the slowest machine. Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 7 / 42
  • 11. Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 8 / 42
  • 12. Data Model A directed graph that stores the program state, called data graph. Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 9 / 42
  • 13. Vertex Scope The scope of vertex v is the data stored in vertex v, in all adjacent vertices and adjacent edges. Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 10 / 42
  • 14. Programming Model (1/3) Rather than adopting a message passing as in Pregel, GraphLab allows the user defined function of a vertex to read and modify any of the data in its scope. Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 11 / 42
  • 15. Programming Model (2/3) Update function: user-defined function similar to Compute in Pregel. Can read and modify the data within the scope of a vertex. Schedules the future execution of other update functions. Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 12 / 42
  • 16. Programming Model (3/3) Sync function: similar to aggregate in Pregel. Maintains global aggregates. Performs periodically in the background. Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 13 / 42
  • 17. Execution Model Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 14 / 42
  • 18. Execution Model Each task in the set of tasks T , is a tuple (f, v) consisting of an update function f and a vertex v. Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 14 / 42
  • 19. Execution Model Each task in the set of tasks T , is a tuple (f, v) consisting of an update function f and a vertex v. After executing an update function (f, g, · · ·) the modified scope data in Sv is written back to the data graph. Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 14 / 42
  • 20. Example: PageRank GraphLab_PageRank(i) // compute sum over neighbors total = 0 foreach(j in in_neighbors(i)): total = total + R[j] * wji // update the PageRank R[i] = 0.15 + total // trigger neighbors to run again foreach(j in out_neighbors(i)): signal vertex-program on j R[i] = 0.15 + j∈Nbrs(i) wjiR[j] Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 15 / 42
  • 21. Data Consistency (1/3) Overlapped scopes: race-condition in simultaneous execution of two update functions. Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 16 / 42
  • 22. Data Consistency (1/3) Overlapped scopes: race-condition in simultaneous execution of two update functions. Full consistency: during the execution f(v), no other function reads or modifies data within the v scope. Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 16 / 42
  • 23. Data Consistency (2/3) Edge consistency: during the execution f(v), no other function reads or modifies any of the data on v or any of the edges adja- cent to v. Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 17 / 42
  • 24. Data Consistency (3/3) Vertex consistency: during the execution f(v), no other function will be applied to v. Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 18 / 42
  • 25. Sequential Consistency (1/2) Proving the correctness of a parallel algorithm: sequential consistency Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 19 / 42
  • 26. Sequential Consistency (1/2) Proving the correctness of a parallel algorithm: sequential consistency Sequential consistency: if for every parallel execution, there exists a sequential execution of update functions that produces an equivalent result. Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 19 / 42
  • 27. Sequential Consistency (2/2) A simple method to achieve serializability is to ensure that the scopes of concurrently executing update functions do not overlap. Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 20 / 42
  • 28. Sequential Consistency (2/2) A simple method to achieve serializability is to ensure that the scopes of concurrently executing update functions do not overlap. • The full consistency model is used. Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 20 / 42
  • 29. Sequential Consistency (2/2) A simple method to achieve serializability is to ensure that the scopes of concurrently executing update functions do not overlap. • The full consistency model is used. • The edge consistency model is used and update functions do not modify data in adjacent vertices. Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 20 / 42
  • 30. Sequential Consistency (2/2) A simple method to achieve serializability is to ensure that the scopes of concurrently executing update functions do not overlap. • The full consistency model is used. • The edge consistency model is used and update functions do not modify data in adjacent vertices. • The vertex consistency model is used and update functions only access local vertex data. Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 20 / 42
  • 31. Consistency vs. Parallelism Consistency vs. Parallelism [Low, Y., GraphLab: A Distributed Abstraction for Large Scale Machine Learning (Doctoral dissertation, University of California), 2013.] Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 21 / 42
  • 32. GraphLab Implementation Shared memory implementation Distributed implementation Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 22 / 42
  • 33. GraphLab Implementation Shared memory implementation Distributed implementation Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 22 / 42
  • 34. Tasks Schedulers (1/2) In what order should the tasks (vertex-update function pairs) be called? Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 23 / 42
  • 35. Tasks Schedulers (1/2) In what order should the tasks (vertex-update function pairs) be called? • A collection of base schedules, e.g., round-robin, and synchronous. • Set scheduler: enables users to compose custom update schedules. Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 23 / 42
  • 36. Tasks Schedulers (2/2) How to add new task in the queue? Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 24 / 42
  • 37. Tasks Schedulers (2/2) How to add new task in the queue? • FIFO: only permits task creation but do not permit task reordering. • Prioritized: permits task reordering at the cost of increased overhead. Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 24 / 42
  • 38. Consistency Implemented in C++ using PThreads for parallelism. Consistency: read-write lock Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 25 / 42
  • 39. Consistency Implemented in C++ using PThreads for parallelism. Consistency: read-write lock Vertex consistency • Central vertex (write-lock) Edge consistency • Central vertex (write-lock) • Adjacent vertices (read-locks) Full consistency • Central vertex (write-locks) • Adjacent vertices (write-locks) Deadlocks are avoided by acquiring locks sequentially following a canonical order. Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 25 / 42
  • 40. GraphLab Implementation Shared memory implementation Distributed implementation Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 26 / 42
  • 41. Distributed Implementation Graph partitioning • How to efficiently load, partition and distribute the data graph across machines? Consistency • How to achieve consistency in the distributed setting? Fault tolerance Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 27 / 42
  • 42. Graph Partitioning Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 28 / 42
  • 43. Graph Partitioning - Phase 1 (1/2) Two-phase partitioning. Partitioning the data graph into k parts, called atom. • k number of machines Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 29 / 42
  • 44. Graph Partitioning - Phase 1 (1/2) Two-phase partitioning. Partitioning the data graph into k parts, called atom. • k number of machines meta-graph: the graph of atoms (one vertex for each atom). Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 29 / 42
  • 45. Graph Partitioning - Phase 1 (1/2) Two-phase partitioning. Partitioning the data graph into k parts, called atom. • k number of machines meta-graph: the graph of atoms (one vertex for each atom). Atom weight: the amount of data it stores. Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 29 / 42
  • 46. Graph Partitioning - Phase 1 (1/2) Two-phase partitioning. Partitioning the data graph into k parts, called atom. • k number of machines meta-graph: the graph of atoms (one vertex for each atom). Atom weight: the amount of data it stores. Edge weight: the number of edges crossing the atoms. Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 29 / 42
  • 47. Graph Partitioning - Phase 1 (2/2) Each atom is stored as a separate file on a distributed storage system, e.g., HDFS. Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 30 / 42
  • 48. Graph Partitioning - Phase 1 (2/2) Each atom is stored as a separate file on a distributed storage system, e.g., HDFS. Each atom file is a simple binary that stores interior and the ghosts of the partition information. Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 30 / 42
  • 49. Graph Partitioning - Phase 1 (2/2) Each atom is stored as a separate file on a distributed storage system, e.g., HDFS. Each atom file is a simple binary that stores interior and the ghosts of the partition information. Ghost: set of vertices and edges adjacent to the partition boundary. Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 30 / 42
  • 50. Graph Partitioning - Phase 2 Meta-graph is very small. A fast balanced partition of the meta-graph over the physical ma- chines. Assigning graph atoms to machines. Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 31 / 42
  • 51. Consistency Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 32 / 42
  • 52. Consistency To achieve a serializable parallel execution of a set of dependent tasks. • Chromatic engine • Distributed locking engine Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 33 / 42
  • 53. Consistency - Chromatic Engine Construct a vertex coloring: assigns a color to each vertex such that no adjacent vertices share the same color. Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 34 / 42
  • 54. Consistency - Chromatic Engine Construct a vertex coloring: assigns a color to each vertex such that no adjacent vertices share the same color. Edge consistency: executing, synchronously, all update tasks asso- ciated with vertices of the same color before proceeding to the next color. Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 34 / 42
  • 55. Consistency - Chromatic Engine Construct a vertex coloring: assigns a color to each vertex such that no adjacent vertices share the same color. Edge consistency: executing, synchronously, all update tasks asso- ciated with vertices of the same color before proceeding to the next color. Full consistency: no vertex shares the same color as any of its dis- tance two neighbors. Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 34 / 42
  • 56. Consistency - Chromatic Engine Construct a vertex coloring: assigns a color to each vertex such that no adjacent vertices share the same color. Edge consistency: executing, synchronously, all update tasks asso- ciated with vertices of the same color before proceeding to the next color. Full consistency: no vertex shares the same color as any of its dis- tance two neighbors. Vertex consistency: assigning all vertices the same color. Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 34 / 42
  • 57. Consistency - Distributed Locking Engine Associating a readers-writer lock with each vertex. Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 35 / 42
  • 58. Consistency - Distributed Locking Engine Associating a readers-writer lock with each vertex. Vertex consistency • Central vertex (write-lock) Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 35 / 42
  • 59. Consistency - Distributed Locking Engine Associating a readers-writer lock with each vertex. Vertex consistency • Central vertex (write-lock) Edge consistency • Central vertex (write-lock), Adjacent vertices (read-locks) Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 35 / 42
  • 60. Consistency - Distributed Locking Engine Associating a readers-writer lock with each vertex. Vertex consistency • Central vertex (write-lock) Edge consistency • Central vertex (write-lock), Adjacent vertices (read-locks) Full consistency • Central vertex (write-locks), Adjacent vertices (write-locks) Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 35 / 42
  • 61. Consistency - Distributed Locking Engine Associating a readers-writer lock with each vertex. Vertex consistency • Central vertex (write-lock) Edge consistency • Central vertex (write-lock), Adjacent vertices (read-locks) Full consistency • Central vertex (write-locks), Adjacent vertices (write-locks) Deadlocks are avoided by acquiring locks sequentially following a canonical order. Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 35 / 42
  • 62. Fault Tolerance Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 36 / 42
  • 63. Fault Tolerance - Synchronous The systems periodically signals all computation activity to halt. Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 37 / 42
  • 64. Fault Tolerance - Synchronous The systems periodically signals all computation activity to halt. Then synchronizes all caches (ghosts) and saves to disk all data which has been modified since the last snapshot. Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 37 / 42
  • 65. Fault Tolerance - Synchronous The systems periodically signals all computation activity to halt. Then synchronizes all caches (ghosts) and saves to disk all data which has been modified since the last snapshot. Simple, but eliminates the systems advantage of asynchronous com- putation. Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 37 / 42
  • 66. Fault Tolerance - Asynchronous Based on the Chandy-Lamport algorithm. Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 38 / 42
  • 67. Fault Tolerance - Asynchronous Based on the Chandy-Lamport algorithm. The snapshot function is implemented as an update function in vertices. Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 38 / 42
  • 68. Fault Tolerance - Asynchronous Based on the Chandy-Lamport algorithm. The snapshot function is implemented as an update function in vertices. The snapshot update takes priority over all other update functions. Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 38 / 42
  • 69. Fault Tolerance - Asynchronous Based on the Chandy-Lamport algorithm. The snapshot function is implemented as an update function in vertices. The snapshot update takes priority over all other update functions. Edge Consistency is used on all update functions. Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 38 / 42
  • 70. Fault Tolerance - Asynchronous Based on the Chandy-Lamport algorithm. The snapshot function is implemented as an update function in vertices. The snapshot update takes priority over all other update functions. Edge Consistency is used on all update functions. Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 38 / 42
  • 71. Summary Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 39 / 42
  • 72. GraphLab Summary Asynchronous model Vertex-centric Communication: distributed shared memory Three consistency levels: full, edge-level, and vertex-level Partitioning: two-phase partitioning Consistency: chromatic engine (graph coloring), distributed lock engine (reader-writer lock) Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 40 / 42
  • 73. GraphLab Limitations Poor performance on Natural graphs. Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 41 / 42
  • 74. Questions? Amir H. Payberah (Tehran Polytechnic) GraphLab 1393/9/8 42 / 42