STINGER: Multi-threaded Graph Streaming

26
STINGER: Multi-threaded Graph Streaming Jason Riedy and David Bader Georgia Institute of Technology Graph Algorithms Building Blocks (GABB), 19 May 2014

Transcript of STINGER: Multi-threaded Graph Streaming

Page 1: STINGER: Multi-threaded Graph Streaming

STINGER: Multi-threaded GraphStreamingJason Riedy and David BaderGeorgia Institute of Technology

Graph Algorithms Building Blocks (GABB), 19 May 2014

Page 2: STINGER: Multi-threaded Graph Streaming

(insert current prefix here)scale data analysis

Health care Finding outbreaks, population epidemiology

Social networks Advertising, searching, grouping

Intelligence Decisions at scale, regulating algorithms

Systems biology Understanding interactions, drug design

Power grid Disruptions, conservation

Simulation Discrete events, cracking meshes

ร‰ Data analysis runs throughout.ร‰ Many problems can be phrased through graphs.

ร‰ Any many are changing and dynamic.

Riedy, Baderโ€” STINGER: Building Blocks 19 May 2014 2 / 24

Page 3: STINGER: Multi-threaded Graph Streaming

Outline

Motivation: Graph Algorithms for Analysis

Graphs and Streaming Data

STING/STINGER Analysis Framework

Building Blocks for Streaming Graph DataPageRankTriangle CountingAgglomerative Communities

Observations

Riedy, Baderโ€” STINGER: Building Blocks 19 May 2014 3 / 24

Page 4: STINGER: Multi-threaded Graph Streaming

General approaches

ร‰ High-performance static graph analysisร‰ Develop techniques that apply to unchanging massive

graphs.ร‰ Provides useful after-the-fact information, starting points.ร‰ Serves many existing applications well: market research,

much bioinformatics, ...ร‰ Needs to be O(|E|).

ร‰ High-performance streaming graph analysisร‰ Focus on the dynamic changes within massive graphs.ร‰ Find trends or new information as they appear.ร‰ Serves upcoming applications: fault or threat detection,

trend analysis, online prediction...ร‰ Can be O(|โˆ†E|)? O(Vol(โˆ†V))? Less data โ‡’ faster, efficient

Both very important to different areas.Remaining focus is on streaming.

Note: Not CS theory streaming, but analysis of streaming data.

Riedy, Baderโ€” STINGER: Building Blocks 19 May 2014 4 / 24

Page 5: STINGER: Multi-threaded Graph Streaming

Streaming graph data

Data RatesFrom www.statisticsbrain.com:ร‰ 58M posts per day on Twitter (671 / sec)ร‰ 1M links shared per 20 minutes on Facebook

Other applications (e.g. network security) need to respondnearly at line rate, 81k-1.5M pps on gigabit ethernet.

Opportunities

ร‰ Do not need to analyze the entire graph.ร‰ Different domains: Throughput & latency

ร‰ Expose different levels of concurrencyร‰ Can achieve ridiculous โ€œspeed ups.โ€

Riedy, Baderโ€” STINGER: Building Blocks 19 May 2014 5 / 24

Page 6: STINGER: Multi-threaded Graph Streaming

Streaming Queries

Different kinds of questions

ร‰ How are individual graph metrics (e.g. clusteringcoefficients) changing?

ร‰ What are the patterns in the changes?ร‰ Are there seasonal variations?ร‰ What are responses to events?

ร‰ What are temporal anomalies in the graph?ร‰ Do key members in clusters / communities change?ร‰ Are there indicators of event responses before they are

obvious?

Riedy, Baderโ€” STINGER: Building Blocks 19 May 2014 6 / 24

Page 7: STINGER: Multi-threaded Graph Streaming

On to STING...

Motivation: Graph Algorithms for Analysis

Graphs and Streaming Data

STING/STINGER Analysis Framework

Building Blocks for Streaming Graph Data

Observations

Riedy, Baderโ€” STINGER: Building Blocks 19 May 2014 7 / 24

Page 8: STINGER: Multi-threaded Graph Streaming

STINGโ€™s focus

Source data

predictionaction

summary

Control

VizSimulation / query

ร‰ STING: Spatio-Temporal Interaction Networks and Graphsร‰ STING manages queries against changing graph data.

ร‰ Visualization and control often are application specific.ร‰ Ideal: Maintain many persistent graph analysis kernels.

ร‰ One current graph snapshot, kernels keep smaller histories.ร‰ Also (a harder goal), coordinate the kernelsโ€™ cooperation.

Riedy, Baderโ€” STINGER: Building Blocks 19 May 2014 8 / 24

Page 9: STINGER: Multi-threaded Graph Streaming

STING: High-level architecture

Slide credit: Rob McColl and David Ediger

ร‰ OpenMP + sufficiently POSIX-ishร‰ Multiple processes for resilience

Riedy, Baderโ€” STINGER: Building Blocks 19 May 2014 9 / 24

Page 10: STINGER: Multi-threaded Graph Streaming

STING Extensible Representation: Core data structure

sourcevertex

edgetype

adj. vtx weight mod. time first time

edge type index

vertexindex

Initial considerations [Bader, et al.]

ร‰ Be useful for the entire โ€œlarge graphโ€ communityร‰ Permit good performance: No single structure is optimal for all.ร‰ Assume globally addressable memory access and atomic operationsร‰ Not a graph database, but supports types, subsetsร‰ Large graph โ‡’ rare conflicts

Riedy, Baderโ€” STINGER: Building Blocks 19 May 2014 10 / 24

Page 11: STINGER: Multi-threaded Graph Streaming

Building Blocks for Streaming Graph Data

Motivation: Graph Algorithms for Analysis

Graphs and Streaming Data

STING/STINGER Analysis Framework

Building Blocks for Streaming Graph DataPageRankTriangle CountingAgglomerative Communities

Observations

Riedy, Baderโ€” STINGER: Building Blocks 19 May 2014 11 / 24

Page 12: STINGER: Multi-threaded Graph Streaming

Incremental PageRank

ร‰ PageRank: Well-understood method for ranking verticesbased on random walks (related to minimizingconductance).

ร‰ Equivalent problem, solve (Iโˆ’ ฮฑATDโˆ’1)x = (1โˆ’ ฮฑ)v giveninitial weights v.

ร‰ Goal: Use for seed set expansion, sparse v.ร‰ State-of-the-art for updating x when the graph represented

by A changes? Re-start iteration with the previous x.ร‰ Can do significantly better for low-latency needs.ร‰ Compute the change โˆ†x instead of the entire new x.

Riedy, Baderโ€” STINGER: Building Blocks 19 May 2014 12 / 24

Page 13: STINGER: Multi-threaded Graph Streaming

Incremental PageRank: Iteration

Iterative solverStep kโ†’ k + 1:

โˆ†x(k+1) = ฮฑ(A + โˆ†A)T(D + โˆ†D)โˆ’1โˆ†x(k)+

ฮฑ๏ฟฝ

(A + โˆ†A)T(D + โˆ†D)โˆ’1 โˆ’ ATDโˆ’1๏ฟฝ

x

ร‰ Additive part: Non-zero only at changes.ร‰ Operator: Pushes changes outward.

Riedy, Baderโ€” STINGER: Building Blocks 19 May 2014 13 / 24

Page 14: STINGER: Multi-threaded Graph Streaming

Incremental PageRank: Limiting Expansion

Iterative solverStep kโ†’ k + 1:

โˆ†xฬ‚(k+1) = ฮฑ(A + โˆ†A)T(D + โˆ†D)โˆ’1โˆ†xฬ‚(k)|ex + ฮฑโˆ†xฬ‚|held

ฮฑ๏ฟฝ

(A + โˆ†A)T(D + โˆ†D)โˆ’1 โˆ’ ATDโˆ’1๏ฟฝ

xฬ‚

ร‰ Additive part: Non-zero only at changes.ร‰ Operator: Pushes sufficiently large changes outward.

Riedy, Baderโ€” STINGER: Building Blocks 19 May 2014 14 / 24

Page 15: STINGER: Multi-threaded Graph Streaming

Incremental PageRank: Test Cases

ร‰ Initial, high-level implementation via sparse matrices in Julia.ร‰ Test graphs from the 10th DIMACS Implementation Challenge.ร‰ Add uniformly random edges... worst case.ร‰ Up to 100k in different batch sizes.ร‰ One sequence of edge actions per graph shared across

experiments.ร‰ Conv. & hold base threshold: 10โˆ’12

Graph |V| |E| Avg. Deg. Size (MiB)

caidaRouterLevel 192 244 609 066 3.17 5.38coPapersCiteseer 434 102 1 603 6720 36.94 124.01

coPapersDBLP 540 486 15 245 729 28.21 118.38great-britain.osm 7 733 822 8 156 517 1.05 91.73PGPgiantcompo 10 680 24 316 2.28 0.23

power 4 941 6 594 1.33 0.07

Riedy, Baderโ€” STINGER: Building Blocks 19 May 2014 15 / 24

Page 16: STINGER: Multi-threaded Graph Streaming

Incremental PageRank: Throughput v. latency

Percent of edge traversals relative to re-started iteration:1000 100 10

โ— โ— โ— โ— โ— โ— โ— โ— โ— โ—โ— โ— โ— โ— โ— โ— โ— โ— โ— โ—โ— โ— โ— โ— โ— โ— โ— โ— โ— โ—โ— โ— โ— โ— โ— โ— โ— โ— โ— โ—

โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—

โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—

โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—

โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—

โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—

โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—โ—

0%

20%

40%

60%

80%

0%

20%

40%

60%

80%

0%

20%

40%

60%

80%

0%

20%

40%

60%

80%

0%

20%

40%

60%

80%

0%

20%

40%

60%

80%

caidaRouterLevel

coPapersC

iteseercoP

apersDB

LPgreat_britain.osm

PG

Pgiantcom

popow

er

0 2500 5000 7500 10000 0 2500 5000 7500 10000 0 2500 5000 7500 10000"Time"

Fra

ctio

n of

edg

es v

. res

tart

ed P

R

Graph name โ— caidaRouterLevel coPapersCiteseer coPapersDBLP great_britain.osm PGPgiantcompo power

Held vertex threshold / 10**โˆ’12 โ— โ— โ— โ—10000.0 1000.0 100.0 10.0

Riedy, Baderโ€” STINGER: Building Blocks 19 May 2014 16 / 24

Page 17: STINGER: Multi-threaded Graph Streaming

Triangle Counting

Current version

ร‰ Count all the triangles around each graph vertex.ร‰ Used in clustering coefficients (numerator), etc.

ร‰ Up to 130 000 graph updates per second on X5570(Nehalem-EP, 2.93GHz)

ร‰ 2000ร— speed-up over static recomputationร‰ Main algorithm, for each vertex v:

ร‰ Sort its adjacency list.ร‰ For each neighbor w,

ร‰ search for wโ€™s neighbors in the sorted list.

ร‰ Could compute diag(A3), more or less...

Riedy, Baderโ€” STINGER: Building Blocks 19 May 2014 17 / 24

Page 18: STINGER: Multi-threaded Graph Streaming

Triangle Counting: Small Batches

Low-latency case

ร‰ In generall, diag(A3) is a silly option.ร‰ But A3โˆ†x, a BFS, to count around a few vertices...ร‰ Brute force (MTAAP10)

ร‰ Roughly 4ร— slower with moderate batches, andร‰ less than 2ร— slower with small batches.

ร‰ Could be reasonable for a quick hack.

Small changes (low latency) may find more applications oflinear algebra-like primitives.

Riedy, Baderโ€” STINGER: Building Blocks 19 May 2014 18 / 24

Page 19: STINGER: Multi-threaded Graph Streaming

Community Detection

What do we mean?ร‰ Partition a graphโ€™s vertices

into disjoint communities.ร‰ Locally optimize some metric,

e.g. modularity, conductanceร‰ Try to capture that vertices are

more similar within onecommunity than betweencommunities.

ร‰ Modularity: More internaledges than expected.

Jasonโ€™s network via LinkedIn Labs

Riedy, Baderโ€” STINGER: Building Blocks 19 May 2014 19 / 24

Page 20: STINGER: Multi-threaded Graph Streaming

Parallel Agglomerative Method

A

B

C

DE

FG

ร‰ Use a matching to avoid a serializingqueue.ร‰ Simple greedy algorithm.ร‰ Would require smuggling data and

communication in through elementoperators...

ร‰ Highly scalable, 5.8ร— 106 โ€“ 7ร— 106

edges/sec, 8ร— โ€“ 16ร— speed-up on80-thread E7-8870 (thanks Intel!)

ร‰ Extends to dynamic communitymaintenanceร‰ Extract vertices from communities,

re-agglomerateร‰ Matrix triple product-ish

Riedy, Baderโ€” STINGER: Building Blocks 19 May 2014 20 / 24

Page 21: STINGER: Multi-threaded Graph Streaming

Parallel Agglomerative Method

A

B

C

DE

FG

C

D

G

ร‰ Use a matching to avoid a serializingqueue.ร‰ Simple greedy algorithm.ร‰ Would require smuggling data and

communication in through elementoperators...

ร‰ Highly scalable, 5.8ร— 106 โ€“ 7ร— 106

edges/sec, 8ร— โ€“ 16ร— speed-up on80-thread E7-8870 (thanks Intel!)

ร‰ Extends to dynamic communitymaintenanceร‰ Extract vertices from communities,

re-agglomerateร‰ Matrix triple product-ish

Riedy, Baderโ€” STINGER: Building Blocks 19 May 2014 20 / 24

Page 22: STINGER: Multi-threaded Graph Streaming

Parallel Agglomerative Method

A

B

C

DE

FG

C

D

G

E

B

C

ร‰ Use a matching to avoid a serializingqueue.ร‰ Simple greedy algorithm.ร‰ Would require smuggling data and

communication in through elementoperators...

ร‰ Highly scalable, 5.8ร— 106 โ€“ 7ร— 106

edges/sec, 8ร— โ€“ 16ร— speed-up on80-thread E7-8870 (thanks Intel!)

ร‰ Extends to dynamic communitymaintenanceร‰ Extract vertices from communities,

re-agglomerateร‰ Matrix triple product-ish

Riedy, Baderโ€” STINGER: Building Blocks 19 May 2014 20 / 24

Page 23: STINGER: Multi-threaded Graph Streaming

Seed Set Expansion

Problem

ร‰ Given a small number of vertices, andร‰ find a region of interest around them.

ร‰ Start with a subset consisting of the selection.ร‰ Evaluate the change in modularity around the current

subset.ร‰ Absorb all vertices that...

ร‰ may increase modularity by a significant amount, orร‰ are within the top 10% of changes, or...

ร‰ Repeat until the set is large enough.ร‰ Step-wise guided expansion doesnโ€™t fit current primitives.

Riedy, Baderโ€” STINGER: Building Blocks 19 May 2014 21 / 24

Page 24: STINGER: Multi-threaded Graph Streaming

Observations

ร‰ Throughput / latency trade offs:ร‰ Different levels of parallelism and optimizationsร‰ Larger batches โ‡’ higher throughput, more collisionsร‰ Small batches โ‡’ lower latency, more scatteredร‰ Impact optimizations similarly to direction-optimized BFS

ร‰ Can build proposed building blocks against STINGERร‰ Many algorithms are not naturally expressed:

ร‰ Matchingร‰ Guided set expansion by changing criteriaร‰ Streaming versions of these...

ร‰ Targets for version 2?

Riedy, Baderโ€” STINGER: Building Blocks 19 May 2014 22 / 24

Page 25: STINGER: Multi-threaded Graph Streaming

STINGER: Where do you get it?

www.cc.gatech.edu/stinger/Gateway toร‰ code,ร‰ development,ร‰ documentation,ร‰ presentations...ร‰ (working on usage and

development screencasts)Remember: Still academic code, butmaturing.Users / contributors / questioners:Georgia Tech, PNNL, CMU, Berkeley,Intel, Cray, NVIDIA, IBM, FederalGovernment, Ionic Security, Citi

Riedy, Baderโ€” STINGER: Building Blocks 19 May 2014 23 / 24

Page 26: STINGER: Multi-threaded Graph Streaming

Acknowledgment of support

Riedy, Baderโ€” STINGER: Building Blocks 19 May 2014 24 / 24