際際滷

際際滷Share a Scribd company logo
2GP: A Two-Phase Graph Partitioner
Hadi Sinaee
Supervisor: Margo Seltzer
2GP: A Two-Phase Graph Partitioner
Hadi Sinaee
Supervisor: Margo Seltzer
2GP: A Two-Phase Graph Partitioner
Hadi Sinaee
Supervisor: Margo Seltzer
2GP: A Two-Phase Graph
Partitioner
Hadi Sinaee
Supervisor: Margo Seltzer
2GP: A Two-Phase Graph Partitioner
Hadi Sinaee
Supervisor: Margo Seltzer
We Use Graphs To Model
Relationships
6
7
10 1
1
1
1
1
1
1
2
4
2
3
2
2 2
2
3
3
3
3
3
3
2
4
4
Degree
Freq.
Degree
Freq.
Common Algorithms We Use On
Graphs!
8
9
PageRan
k
*all images are taken from Wikipedia
Community Detection BFS & DFS
We Frequently Need to Traverse
Neighbors!
What Is the Problem?
10
What is the problem?
11
- They may not fit into a single machine!
- Algorithms get slow!
12
Break Them Apart and Process in
Parallel!
2GP: A Two-Phase Graph Partitioner
Hadi Sinaee
Supervisor: Margo Seltzer
Graph Sub
graph
Sub
graph
.
.
.
Sub
graph
Part-2
Part-3
Part-K
Sub
graph
Part-1
 A Graph
 K Units of Computation
14
.
.
.
How to Measure the Partitioning
Quality?
15
16
Balanced Partitions # Edge-Cuts
Communication Volume
(CV)
#Nodes Per Partition,
or
#Edges Per Partition
Edge-Cuts: 2
Edge-Cuts: 3
1
1
0
0
2
CV: 1 + 1 + 2 = 4
CV: 1 + 1 + 1 + 1 +2 =
6
1
1
1
1
2
17
There are different partitioning algorithms!
In-Memory v.s. Streaming
18
In-Memory Streaming
DRA
M
DRA
M
Input
Graph
1
1: Load
2
2: Partition
Input
Graph
2
2: Partition
1
1: Load
DRA
M
Low quality partitions!
Fast partitioning!
Low memory demand!
High quality partitions!
Slow partitioning!
High memory demand!
19
High
Low
Slow
Fast
In-Memory Partitioners
Streaming
Partitioners
Partition Quality
(# edge-cuts or communication volume)
Time
Can we combine the best of both worlds?
a partitioner with the partition quality of in-memory
and the speed of streaming
20
Streaming partitioners are fast but lack neighborhood information of
nodes!
21
22
As Much as We Can!
In-Memory Partitioner
Streaming Partitioner
Input Graph
2GP: A Two-Phase Graph
Partitioner
Hadi Sinaee
Supervisor: Margo Seltzer
2GP
24
In-Memory Partitioner
Streaming Partitioner
Segment Graph
METIS
25
In-Memory
METIS
26
In-Memory
- Smaller graphs are easier to
partition
- It has three phases:
- Coarsening
- Partitioning
- Un-coarsening
METIS produces high quality partitions!
But it gets really slow and cannot handle
large graphs!
FENNEL
27
Streamin
g
FENNEL
28
Streaming
- FENNEL is a vertex-based partitioner.
- Input format is an adjacency list and we place only the source vertex for each list.
- Calculate a score for each partition
- Scores are based on the number of available neighbors in each partition
29
2GP
In-Memory Partitioner
Streaming Partitioner
METI
S
In-Memory
FENNEL
Streaming
Lets put 2GP Into Test!
30
Lets pass the most information to streaming partitioner!
31
Lets go with higher degrees!
Communication Volume (CV)
High-Degree Ordering
32
- See the effect of CV for different number of partitions!
- We choose Twitter graph with 41M nodes and 1.2B edges
Why Did It FAIL?
33
HDO tends to create highly connected graphs!
Partitioning highly connected graphs are harder!
Communication Volume (CV)
Low-Degree Ordering (LDO)
34
Lesson 1:
LDO ordering is better than HDO ordering when using 2GP!
Observation!
35
There many nodes with less than 50% of their neighbours
partitioned!
36
Delay partitioning of any high-degree node that less than 50% of its neighbors are
partitioned!
(Average node degree in the graph) *
FIXED_FACTOR
FENNEL
- DelayPart
Streamin
g
Communication Volume (CV)
Lowest-Degree Ordering with Delayed Partitioning
37
Lesson 2:
Delaying high-degree nodes for partitioning later makes CV
better!
38
2GP
In-Memory Partitioner
Streaming Partitioner
METI
S
In-Memory
FENNEL-DelayPart
Streaming
Experiments
39
Environment
- 28 CPUs; 2 Threads per core; 14 Cores
- Intel(R) Xeon(R) W-2275 CPU @ 3.30GHz
- 130GB DRAM
Datasets
- Dblp-cite (12K, 49K)
- Dimacs9-USA (23M, 28M)
- Twitter (41M, 1.2B)
Baselines
- METIS (in-memory)
- FENNEL (streaming)
Metrics
Measuring the following across different #partitions:
- Communication Volume (CV)
- Partitioning Time
Communication Volume
(CV)
40
(8.4K,
6.8K)
41
Dblp-cite (12K, 49K)
42
Dblp-cite (12K, 49K)
43
Dimacs9-USA (23M, 28M)
44
Twitter (41M, 1.2B)
2GP produces better partitions than Fennel even
with a small % of input graph given to it!
Partitioning Time
45
46
Dblp-cite (12K, 49K)
47
Dimacs9-USA (23M, 28M)
48
Twitter (41M, 1.2B)
2GP is faster than Fennel for small % of input
graph!
The overhead comes from the repartition part which can be mitigated by adjusting
how we choose high-degree nodes.
Performance
49
- Won Quality
- Won Time
- Won Quality
- Won Time
51
Dblp-cite (12K, 49K)
52
Dimacs9-USA (23M, 28M) Twitter (41M, 1.2B)
1. There is a trade-off between CV and Time!
2. Skewed degree dist are harder to optimize
for!
Conclusion
53
- We can leverage the best-of-both worlds of in-memory
and streaming partitioners.
- 2GP can be used as the alternative to FENNEL when
partitioning large graphs
- Achieving up to 70% improvement for some
datasets.
- Delayed re-partitioning policy helps to produce better
communication volume.
- Lowest-degree ordering helps to partition higher degree
nodes better when using a streaming partitioner.
Collaboration

More Related Content

Master Thesis - UBC.pptx

Editor's Notes

  • #2: OK, Thanks for coming to todays talk! I want to present Applic . It was published last yeat at SIGMOD. I find it interesting bec I sort of had a similar idea which these guys implemented! Well, for this talk, first ill start with the graph partitioning itself I briefly talk about How people usually do partitioning? And how we decide which partitioning strategy is a good one? After that, Ill add a missing part to this scenario which is the application: How having a knowledge about the application could change partitioning?
  • #3: OK, Thanks for coming to todays talk! I want to present Applic . It was published last yeat at SIGMOD. I find it interesting bec I sort of had a similar idea which these guys implemented! Well, for this talk, first ill start with the graph partitioning itself I briefly talk about How people usually do partitioning? And how we decide which partitioning strategy is a good one? After that, Ill add a missing part to this scenario which is the application: How having a knowledge about the application could change partitioning?
  • #4: OK, Thanks for coming to todays talk! I want to present Applic . It was published last yeat at SIGMOD. I find it interesting bec I sort of had a similar idea which these guys implemented! Well, for this talk, first ill start with the graph partitioning itself I briefly talk about How people usually do partitioning? And how we decide which partitioning strategy is a good one? After that, Ill add a missing part to this scenario which is the application: How having a knowledge about the application could change partitioning?
  • #5: OK, Thanks for coming to todays talk! I want to present Applic . It was published last yeat at SIGMOD. I find it interesting bec I sort of had a similar idea which these guys implemented! Well, for this talk, first ill start with the graph partitioning itself I briefly talk about How people usually do partitioning? And how we decide which partitioning strategy is a good one? After that, Ill add a missing part to this scenario which is the application: How having a knowledge about the application could change partitioning?
  • #6: OK, Thanks for coming to todays talk! I want to present Applic . It was published last yeat at SIGMOD. I find it interesting bec I sort of had a similar idea which these guys implemented! Well, for this talk, first ill start with the graph partitioning itself I briefly talk about How people usually do partitioning? And how we decide which partitioning strategy is a good one? After that, Ill add a missing part to this scenario which is the application: How having a knowledge about the application could change partitioning?
  • #14: OK, Thanks for coming to todays talk! I want to present Applic . It was published last yeat at SIGMOD. I find it interesting bec I sort of had a similar idea which these guys implemented! Well, for this talk, first ill start with the graph partitioning itself I briefly talk about How people usually do partitioning? And how we decide which partitioning strategy is a good one? After that, Ill add a missing part to this scenario which is the application: How having a knowledge about the application could change partitioning?
  • #15: Usually we have a graph and an environment which has k units of computation. The goal here is to utilize all these resources. Why? Besides the fact weve paid for that, we want to increase the parallelism! So, we take a graph and create a set of sub-graphs and call them partition. Next, we run our algorithm on each them. For example, we could assign each of theses partitions to a cpu to run our algorithm. Or, we could assign it to different nodes in a cluster network! Now! The questions here are that how do we do the partitionin? And which partitioning is considered a good one!
  • #24: OK, Thanks for coming to todays talk! I want to present Applic . It was published last yeat at SIGMOD. I find it interesting bec I sort of had a similar idea which these guys implemented! Well, for this talk, first ill start with the graph partitioning itself I briefly talk about How people usually do partitioning? And how we decide which partitioning strategy is a good one? After that, Ill add a missing part to this scenario which is the application: How having a knowledge about the application could change partitioning?