kickstarter: fast and accurate computations on streaming...

44
KickStarter: Fast and Accurate Computations on Streaming Graphs via Trimmed Approximations Keval Vora, Rajiv Gupta and Guoqing Xu

Upload: others

Post on 13-Jul-2020

14 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: KickStarter: Fast and Accurate Computations on Streaming ...keval/contents/talks/KickStarter-ASPLOS17.pdf · KickStarter: Fast and Accurate Computations on Streaming Graphs via Trimmed

KickStarter: Fast and Accurate Computations on Streaming Graphs via Trimmed Approximations

Keval Vora, Rajiv Gupta and Guoqing Xu

Page 2: KickStarter: Fast and Accurate Computations on Streaming ...keval/contents/talks/KickStarter-ASPLOS17.pdf · KickStarter: Fast and Accurate Computations on Streaming Graphs via Trimmed

Streaming Graph Processing

•  Graph changes rapidly as computation proceeds •  Incremental processing

•  Maintain “profitable” approximation

Shao, Xiaogang Shi Bin Cui Yingxia, and Yunhai Tong, "Tornado: A System For Real-Time Iterative Analysis Over Evolving Data.”, SIGMOD 2016.

.  .  .   .  .  .  Δ4  

Δ2  Δ3  

Δ1  

Query  Branch  Loop  

Convergence  

Edge    Additions  &    Deletions  

02

Page 3: KickStarter: Fast and Accurate Computations on Streaming ...keval/contents/talks/KickStarter-ASPLOS17.pdf · KickStarter: Fast and Accurate Computations on Streaming Graphs via Trimmed

The Good, the Bad and the Ugly

•  Correctness & performance

03

Page 4: KickStarter: Fast and Accurate Computations on Streaming ...keval/contents/talks/KickStarter-ASPLOS17.pdf · KickStarter: Fast and Accurate Computations on Streaming Graphs via Trimmed

The Good Scenario

SSWP  

A B C D E F G

∞ 5 10 20 7 15 5

5

15

A  

04

Page 5: KickStarter: Fast and Accurate Computations on Streaming ...keval/contents/talks/KickStarter-ASPLOS17.pdf · KickStarter: Fast and Accurate Computations on Streaming Graphs via Trimmed

The Good Scenario

SSWP  

A B C D E F G

∞ 5 10 20 7 15 5

Add D B 5

15

A B C D E F G

∞ 5 10 20 7 15 5

A  

04

Page 6: KickStarter: Fast and Accurate Computations on Streaming ...keval/contents/talks/KickStarter-ASPLOS17.pdf · KickStarter: Fast and Accurate Computations on Streaming Graphs via Trimmed

The Good Scenario

SSWP  

A B C D E F G

∞ 5 10 20 7 15 5

Add D B 5

15

A  

04

Page 7: KickStarter: Fast and Accurate Computations on Streaming ...keval/contents/talks/KickStarter-ASPLOS17.pdf · KickStarter: Fast and Accurate Computations on Streaming Graphs via Trimmed

A B C D E F G

∞ 5 10 20 7 15 5

Add D B

∞ 20 10 20 7 15 5

∞ 20 10 20 7 15 20

The Good Scenario

SSWP  

A B C D E F G

∞ 5 10 20 7 15 5

Add D B 5

15

A  

04

Page 8: KickStarter: Fast and Accurate Computations on Streaming ...keval/contents/talks/KickStarter-ASPLOS17.pdf · KickStarter: Fast and Accurate Computations on Streaming Graphs via Trimmed

The Bad Scenario

A B C D E F G

∞ 20 10 20 7 7 20

Delete A D

SSWP  

5

A B C D E F G

A  

05

Page 9: KickStarter: Fast and Accurate Computations on Streaming ...keval/contents/talks/KickStarter-ASPLOS17.pdf · KickStarter: Fast and Accurate Computations on Streaming Graphs via Trimmed

The Bad Scenario

A B C D E F G

∞ 20 10 20 7 7 20

Delete A D

SSWP  

5 A  

05

Page 10: KickStarter: Fast and Accurate Computations on Streaming ...keval/contents/talks/KickStarter-ASPLOS17.pdf · KickStarter: Fast and Accurate Computations on Streaming Graphs via Trimmed

The Bad Scenario

A B C D E F G

∞ 20 10 20 7 7 20

Delete A D …

∞ 20

SSWP  

5

A B C D E F G

∞ 20 10 20 7 7 20

Delete A D A  

05

Page 11: KickStarter: Fast and Accurate Computations on Streaming ...keval/contents/talks/KickStarter-ASPLOS17.pdf · KickStarter: Fast and Accurate Computations on Streaming Graphs via Trimmed

The Bad Scenario

A B C D E F G

∞ 20 10 20 7 7 20

Delete A D …

∞ 20 20 20

SSWP  

5 A  

∞ 20 20 20

05

Page 12: KickStarter: Fast and Accurate Computations on Streaming ...keval/contents/talks/KickStarter-ASPLOS17.pdf · KickStarter: Fast and Accurate Computations on Streaming Graphs via Trimmed

The Bad Scenario

A B C D E F G

∞ 20 10 20 7 7 20

Delete A D …

∞ 20 10 20 7 7 20

SSWP  

5 A  

05

Page 13: KickStarter: Fast and Accurate Computations on Streaming ...keval/contents/talks/KickStarter-ASPLOS17.pdf · KickStarter: Fast and Accurate Computations on Streaming Graphs via Trimmed

A B C D

0 5 6 8

Delete B C

The Ugly Scenario

SSSP  

B  

C  

D  A  

1

2

5

5

06

Page 14: KickStarter: Fast and Accurate Computations on Streaming ...keval/contents/talks/KickStarter-ASPLOS17.pdf · KickStarter: Fast and Accurate Computations on Streaming Graphs via Trimmed

A B C D

0 5 6 8

Delete B C

0 5 6 8

0 5 13 8

0 5 13 15

0 5 20 15 0 … … …

0 5 MAX MAX

The Ugly Scenario

SSSP  

B  

C  

D  A  

1

2

5

5 A B C D

0 5 6 8

Delete B C

06

Page 15: KickStarter: Fast and Accurate Computations on Streaming ...keval/contents/talks/KickStarter-ASPLOS17.pdf · KickStarter: Fast and Accurate Computations on Streaming Graphs via Trimmed

The Good, the Bad and the Ugly

•  Correctness & performance

Edge Deletions

07

Page 16: KickStarter: Fast and Accurate Computations on Streaming ...keval/contents/talks/KickStarter-ASPLOS17.pdf · KickStarter: Fast and Accurate Computations on Streaming Graphs via Trimmed

KickStarter

•  Maintain value dependences during computation •  a b iff b’s value resulted from a LT

Active  Value    Dependence  Tracking

Trimming  Approximation

08

Page 17: KickStarter: Fast and Accurate Computations on Streaming ...keval/contents/talks/KickStarter-ASPLOS17.pdf · KickStarter: Fast and Accurate Computations on Streaming Graphs via Trimmed

KickStarter

•  Maintain value dependences during computation •  a b iff b’s value resulted from a LT

Active  Value    Dependence  Tracking

Trimming  Approximation

08

Page 18: KickStarter: Fast and Accurate Computations on Streaming ...keval/contents/talks/KickStarter-ASPLOS17.pdf · KickStarter: Fast and Accurate Computations on Streaming Graphs via Trimmed

Trimming via Value Dependence

•  Maintain value dependences during computation •  a b iff b’s value resulted from a LT

A  =  ∞  

C  =  10   D  =  20  

F  =  7   E  =  7   B  =  20  

G  =  20  

A B C D E F G

∞ 20 10 20 7 7 20

SSWP  

09

Page 19: KickStarter: Fast and Accurate Computations on Streaming ...keval/contents/talks/KickStarter-ASPLOS17.pdf · KickStarter: Fast and Accurate Computations on Streaming Graphs via Trimmed

Trimming via Value Dependence

•  Compute safe approximations •  Can be done using the same vertex function

A  =  ∞  

C  =  10   D  =  20  

F  =  7   E  =  7   B  =  20  

G  =  20  

A B C D E F G

∞ 20 10 20 7 7 20

Delete A D

SSWP  

09

Page 20: KickStarter: Fast and Accurate Computations on Streaming ...keval/contents/talks/KickStarter-ASPLOS17.pdf · KickStarter: Fast and Accurate Computations on Streaming Graphs via Trimmed

Trimming via Value Dependence

•  Compute safe approximations •  Can be done using the same vertex function

A  =  ∞  

C  =  10   D  =  20  

F  =  7   E  =  7   B  =  20  

G  =  20  

A B C D E F G

∞ 20 10 20 7 7 20

Delete A D

SSWP  

09

Page 21: KickStarter: Fast and Accurate Computations on Streaming ...keval/contents/talks/KickStarter-ASPLOS17.pdf · KickStarter: Fast and Accurate Computations on Streaming Graphs via Trimmed

Trimming via Value Dependence

•  Compute safe approximations •  Can be done using the same vertex function

A  =  ∞  

C  =  10   D  =  20  

F  =  7   E  =  7   B  =  20  

G  =  20  

A B C D E F G

∞ 20 10 20 7 7 20

Delete A D

SSWP  

09

Page 22: KickStarter: Fast and Accurate Computations on Streaming ...keval/contents/talks/KickStarter-ASPLOS17.pdf · KickStarter: Fast and Accurate Computations on Streaming Graphs via Trimmed

Trimming via Value Dependence

•  Compute safe approximations •  Can be done using the same vertex function

A  =  ∞  

C  =  10   D  =  20  

F  =  7   E  =  7   B  =  20  

G  =  20  

A B C D E F G

∞ 20 10 20 7 7 20

Delete A D

SSWP  

09

Page 23: KickStarter: Fast and Accurate Computations on Streaming ...keval/contents/talks/KickStarter-ASPLOS17.pdf · KickStarter: Fast and Accurate Computations on Streaming Graphs via Trimmed

Trimming via Value Dependence

•  Compute safe approximations •  Can be done using the same vertex function

A  =  ∞  

C  =  10  

F  =  7  

D  =  0  

E  =  7   B  =  20  

G  =  20  

A B C D E F G

∞ 20 10 20 7 7 20

Delete A D

∞ 20 10 0 7 7 20

SSWP  

09

Page 24: KickStarter: Fast and Accurate Computations on Streaming ...keval/contents/talks/KickStarter-ASPLOS17.pdf · KickStarter: Fast and Accurate Computations on Streaming Graphs via Trimmed

Trimming via Value Dependence

•  Compute safe approximations •  Can be done using the same vertex function

A  =  ∞  

C  =  10  

F  =  7  

D  =  0  

E  =  7   B  =  20  

G  =  20  

A B C D E F G

∞ 20 10 20 7 7 20

Delete A D

∞ 20 10 0 7 7 20

SSWP  

09

Page 25: KickStarter: Fast and Accurate Computations on Streaming ...keval/contents/talks/KickStarter-ASPLOS17.pdf · KickStarter: Fast and Accurate Computations on Streaming Graphs via Trimmed

Trimming via Value Dependence

•  Compute safe approximations •  Can be done using the same vertex function

A  =  ∞  

C  =  10  

F  =  7  

D  =  0  

B  =  5  

G  =  20  

A B C D E F G

∞ 20 10 20 7 7 20

Delete A D

∞ 20 10 0 7 7 20

∞ 5 10 0 5 7 20

E  =  5  

SSWP  

09

Page 26: KickStarter: Fast and Accurate Computations on Streaming ...keval/contents/talks/KickStarter-ASPLOS17.pdf · KickStarter: Fast and Accurate Computations on Streaming Graphs via Trimmed

Trimming via Value Dependence

•  Compute safe approximations •  Can be done using the same vertex function

A  =  ∞  

C  =  10  

F  =  7  

D  =  0  

B  =  5  

G  =  20  

A B C D E F G

∞ 20 10 20 7 7 20

Delete A D

∞ 20 10 0 7 7 20

∞ 5 10 0 5 7 20

E  =  5  

SSWP  

09

Page 27: KickStarter: Fast and Accurate Computations on Streaming ...keval/contents/talks/KickStarter-ASPLOS17.pdf · KickStarter: Fast and Accurate Computations on Streaming Graphs via Trimmed

Trimming via Value Dependence

•  Compute safe approximations •  Can be done using the same vertex function

A  =  ∞  

C  =  10  

F  =  7  

D  =  0  

B  =  5  

G  =  5  

A B C D E F G

∞ 20 10 20 7 7 20

Delete A D

∞ 20 10 0 7 7 20

∞ 5 10 0 5 7 20

∞ 5 10 0 5 7 5

Trimming Complete

E  =  5  

09

Page 28: KickStarter: Fast and Accurate Computations on Streaming ...keval/contents/talks/KickStarter-ASPLOS17.pdf · KickStarter: Fast and Accurate Computations on Streaming Graphs via Trimmed

Trimming via Value Dependence

•  Compute safe approximations •  Can be done using the same vertex function

A  =  ∞  

C  =  10  

F  =  7  

D  =  0  

B  =  5  

G  =  5  

A B C D E F G

∞ 20 10 20 7 7 20

Delete A D

∞ 20 10 0 7 7 20

∞ 5 10 0 5 7 20

∞ 5 10 0 5 7 5

Trimming Complete

E  =  5  

09

Page 29: KickStarter: Fast and Accurate Computations on Streaming ...keval/contents/talks/KickStarter-ASPLOS17.pdf · KickStarter: Fast and Accurate Computations on Streaming Graphs via Trimmed

Trimming via Value Dependence

•  Compute safe approximations •  Can be done using the same vertex function

A  =  ∞  

C  =  10  

F  =  7  

D  =  5  

B  =  5  

G  =  5  

A B C D E F G

∞ 20 10 20 7 7 20

Delete A D

∞ 20 10 0 7 7 20

∞ 5 10 0 5 7 20

∞ 5 10 0 5 7 5

Trimming Complete

∞ 5 10 5 5 7 5

E  =  5  

09

Page 30: KickStarter: Fast and Accurate Computations on Streaming ...keval/contents/talks/KickStarter-ASPLOS17.pdf · KickStarter: Fast and Accurate Computations on Streaming Graphs via Trimmed

Safety

SSWP  

10

Page 31: KickStarter: Fast and Accurate Computations on Streaming ...keval/contents/talks/KickStarter-ASPLOS17.pdf · KickStarter: Fast and Accurate Computations on Streaming Graphs via Trimmed

Safety

SSWP  

10

Page 32: KickStarter: Fast and Accurate Computations on Streaming ...keval/contents/talks/KickStarter-ASPLOS17.pdf · KickStarter: Fast and Accurate Computations on Streaming Graphs via Trimmed

Safety

SSWP  

10

Page 33: KickStarter: Fast and Accurate Computations on Streaming ...keval/contents/talks/KickStarter-ASPLOS17.pdf · KickStarter: Fast and Accurate Computations on Streaming Graphs via Trimmed

Safety

SSWP  

10

Page 34: KickStarter: Fast and Accurate Computations on Streaming ...keval/contents/talks/KickStarter-ASPLOS17.pdf · KickStarter: Fast and Accurate Computations on Streaming Graphs via Trimmed

Monotonic Graph Algorithms

•  Vertex values exhibit increasing/decreasing values

- WidestPaths (SSWP)

11

Page 35: KickStarter: Fast and Accurate Computations on Streaming ...keval/contents/talks/KickStarter-ASPLOS17.pdf · KickStarter: Fast and Accurate Computations on Streaming Graphs via Trimmed

Monotonic Graph Algorithms

•  Vertex values exhibit increasing/decreasing values

- ShortestPaths (SSSP) - WidestPaths (SSWP)

11

Page 36: KickStarter: Fast and Accurate Computations on Streaming ...keval/contents/talks/KickStarter-ASPLOS17.pdf · KickStarter: Fast and Accurate Computations on Streaming Graphs via Trimmed

Monotonic Graph Algorithms

•  Vertex values exhibit increasing/decreasing values

- ShortestPaths (SSSP) - ConnectedComponents - MinimumSpanningTree

- BreadFirstSearch - FacilityLocation

- WidestPaths (SSWP) - Reachability

11

Page 37: KickStarter: Fast and Accurate Computations on Streaming ...keval/contents/talks/KickStarter-ASPLOS17.pdf · KickStarter: Fast and Accurate Computations on Streaming Graphs via Trimmed

Experimental Setup

•  16-node EC2 cluster: 8-core/16GB nodes •  Monotonic algorithms

Bad Scenario SingleSourceWidestPaths (SSWP)

ConnectedComponents (CC)

Ugly Scenario SingleSourceShortestPaths (SSSP)

BreadthFirstSearch (BFS)

12

Page 38: KickStarter: Fast and Accurate Computations on Streaming ...keval/contents/talks/KickStarter-ASPLOS17.pdf · KickStarter: Fast and Accurate Computations on Streaming Graphs via Trimmed

Experimental Setup

•  Streaming graph datasets constructed using [SIGMOD’16] •  Fixed point achieved at 50% edges •  Remaining edges treated as edge additions •  Edge deletions sampled from loaded graph

•  Rate of update stream (100K-1M updates per query) •  Edge deletion ratio (10-50%)

Graphs #Edges #Vertices

Friendster (FT) 2.5B 68.3M

Twitter (TT) 2.0B 52.6M

Twitter (TTW) 1.5B 41.7M

UKDomain (UK) 1.0B 39.5M

13

Page 39: KickStarter: Fast and Accurate Computations on Streaming ...keval/contents/talks/KickStarter-ASPLOS17.pdf · KickStarter: Fast and Accurate Computations on Streaming Graphs via Trimmed

0

0.5

1

1.5

2

SSWP CC SSWP CC SSWP CC SSWP CC

UK TTW TT FT

Nor

mal

ized

Exe

cuti

onT

ime

RST TAG VAD

Trimming for Safety

RST:  Reset  all  vertex  values

SSWP CC

RST/VAD

17.7x 10x

TAG/VAD

6.2x 13.7x

1.5  min  

1.2  sec  

1.7  min  

27  sec  

2.9  min  

1.2  min   8.1  min  

2.3  min  

Ø  100K updates per query Ø  30% deletion rate

14

Page 40: KickStarter: Fast and Accurate Computations on Streaming ...keval/contents/talks/KickStarter-ASPLOS17.pdf · KickStarter: Fast and Accurate Computations on Streaming Graphs via Trimmed

0

20

40

60

80

100

SSWP CC SSWP CC SSWP CC SSWP CC

UK TTW TT FT

%R

eset

Ver

tice

s

TAG VAD

Trimming for Safety

RST:  Reset  all  vertex  values

SSWP CC

RST/VAD

17.7x 10x

TAG/VAD

6.2x 13.7x

0

0.5

1

1.5

2

SSWP CC SSWP CC SSWP CC SSWP CC

UK TTW TT FT

Nor

mal

ized

Exe

cuti

onT

ime

RST TAG VAD1.5  min  

1.2  sec  

1.7  min  

27  sec  

2.9  min  

1.2  min   8.1  min  

2.3  min  

Ø  100K updates per query Ø  30% deletion rate

14

Page 41: KickStarter: Fast and Accurate Computations on Streaming ...keval/contents/talks/KickStarter-ASPLOS17.pdf · KickStarter: Fast and Accurate Computations on Streaming Graphs via Trimmed

0

0.25

0.5

0.75

1

SSSP BFS SSSP BFS SSSP BFS SSSP BFS

UK TTW TT FT

Nor

mal

ized

Exe

cuti

onT

ime

INC TAG VAD

0

0.5

1

1.5

2

2.5

SSSP BFS SSSP BFS SSSP BFS SSSP BFS

UK TTW TT FT

%R

eset

Ver

tice

s

TAG VAD

Trimming for Performance

INC:  Incremental  processing    (no  resets)

SSSP BFS

INC/VAD

23.7x 8.5x

TAG/VAD

1.5x 1.7x

24.9  sec  

1.4  sec  

1.8  min  

30.2    sec  

3.1  min  

44.1    sec  

2.7  min  

1.6    min  

Ø  100K updates per query Ø  30% deletion rate

15

Page 42: KickStarter: Fast and Accurate Computations on Streaming ...keval/contents/talks/KickStarter-ASPLOS17.pdf · KickStarter: Fast and Accurate Computations on Streaming Graphs via Trimmed

More Results

•  Individual query performance •  Trimming v/s computation time

•  Effectiveness of trimming over resetting •  Varying update rate •  Varying edge deletion ratio •  Dependence tracking overhead

16

Page 43: KickStarter: Fast and Accurate Computations on Streaming ...keval/contents/talks/KickStarter-ASPLOS17.pdf · KickStarter: Fast and Accurate Computations on Streaming Graphs via Trimmed

Summary

•  Incremental processing in presence of edge deletions •  Trimming approximation

•  Reuse safe and profitable values

•  Active dependence tracking based trimming •  Up to 8.5-23.7x speedups

Page 44: KickStarter: Fast and Accurate Computations on Streaming ...keval/contents/talks/KickStarter-ASPLOS17.pdf · KickStarter: Fast and Accurate Computations on Streaming Graphs via Trimmed

Thanks