stingergraph / StingerGraphs.jl

Julialang bindings to the STINGER graph database
http://www.stingergraph.com
Other
5 stars 3 forks source link

Bfs benchmarks #13

Closed rohitvarkey closed 7 years ago

rohitvarkey commented 7 years ago

This adds tests and benchmarks for serial BFS. Will close #7.

rohitvarkey commented 7 years ago

Not running get_nv almost halved the time on my local machine. These results are for kronecker graphs with scale 10 and edgefactor 16.

With get_nv

BenchmarkTools.Trial:
  samples:          4
  evals/sample:     1
  time tolerance:   5.00%
  memory tolerance: 1.00%
  memory estimate:  141.99 mb
  allocs estimate:  627213
  minimum time:     2.27 s (0.64% GC)
  median time:      2.33 s (0.52% GC)
  mean time:        2.38 s (0.49% GC)
  maximum time:     2.57 s (0.55% GC)

Without get_nv

BenchmarkTools.Trial:
  samples:          6
  evals/sample:     1
  time tolerance:   5.00%
  memory tolerance: 1.00%
  memory estimate:  144.15 mb
  allocs estimate:  634244
  minimum time:     1.11 s (0.95% GC)
  median time:      1.15 s (0.94% GC)
  mean time:        1.16 s (0.97% GC)
  maximum time:     1.26 s (1.17% GC)

However on the JINX server, I still get around 8s (down from 13.6s).

jpfairbanks commented 7 years ago

This is the @ehein6 benchmark https://github.com/stingergraph/stinger/pull/165/commits/5b7e64008df3789afe4c5b20d296cfb74f24b7a6.

julia> trials = [bench(i, 16) for i in 10:20]
INFO: Running BFS benchmark
INFO: Running BFS benchmark
INFO: Running BFS benchmark
INFO: Running BFS benchmark
INFO: Running BFS benchmark
INFO: Running BFS benchmark
INFO: Running BFS benchmark
INFO: Running BFS benchmark
INFO: Running BFS benchmark
INFO: Running BFS benchmark
INFO: Running BFS benchmark
11-element Array{BenchmarkTools.Trial,1}:
 BenchmarkTools.Trial:
  memory estimate:  141.25 mb
  allocs estimate:  625519
  --------------
  minimum time:     1.586 s (0.51% GC)
  median time:      1.610 s (0.52% GC)
  mean time:        1.612 s (0.54% GC)
  maximum time:     1.639 s (0.51% GC)
  --------------
  samples:          7
  evals/sample:     1
  time tolerance:   5.00%
  memory tolerance: 1.00%
 BenchmarkTools.Trial:
  memory estimate:  273.86 mb
  allocs estimate:  1157201
  --------------
  minimum time:     3.073 s (0.53% GC)
  median time:      3.127 s (0.55% GC)
  mean time:        3.127 s (0.55% GC)
  maximum time:     3.181 s (0.57% GC)
  --------------
  samples:          4
  evals/sample:     1
  time tolerance:   5.00%
  memory tolerance: 1.00%
 BenchmarkTools.Trial:
  memory estimate:  539.48 mb
  allocs estimate:  2143428
  --------------
  minimum time:     6.256 s (0.54% GC)
  median time:      6.327 s (0.53% GC)
  mean time:        6.327 s (0.53% GC)
  maximum time:     6.398 s (0.53% GC)
  --------------
  samples:          2
  evals/sample:     1
  time tolerance:   5.00%
  memory tolerance: 1.00%
 BenchmarkTools.Trial:
  memory estimate:  1018.62 mb
  allocs estimate:  3843251
  --------------
  minimum time:     13.059 s (0.51% GC)
  median time:      13.059 s (0.51% GC)
  mean time:        13.059 s (0.51% GC)
  maximum time:     13.059 s (0.51% GC)
  --------------
  samples:          1
  evals/sample:     1
  time tolerance:   5.00%
  memory tolerance: 1.00%
 BenchmarkTools.Trial:
  memory estimate:  1.99 gb
  allocs estimate:  7381876
  --------------
  minimum time:     28.129 s (0.43% GC)
  median time:      28.129 s (0.43% GC)
  mean time:        28.129 s (0.43% GC)
  maximum time:     28.129 s (0.43% GC)
  --------------
  samples:          1
  evals/sample:     1
  time tolerance:   5.00%
  memory tolerance: 1.00%
 BenchmarkTools.Trial:
  memory estimate:  3.82 gb
  allocs estimate:  13378715
  --------------
  minimum time:     55.993 s (0.43% GC)
  median time:      55.993 s (0.43% GC)
  mean time:        55.993 s (0.43% GC)
  maximum time:     55.993 s (0.43% GC)
  --------------
  samples:          1
  evals/sample:     1
  time tolerance:   5.00%
  memory tolerance: 1.00%
 BenchmarkTools.Trial:
  memory estimate:  7.43 gb
  allocs estimate:  25042636
  --------------
  minimum time:     110.894 s (0.47% GC)
  median time:      110.894 s (0.47% GC)
  mean time:        110.894 s (0.47% GC)
  maximum time:     110.894 s (0.47% GC)
  --------------
  samples:          1
  evals/sample:     1
  time tolerance:   5.00%
  memory tolerance: 1.00%
 BenchmarkTools.Trial:
  memory estimate:  14.39 gb
  allocs estimate:  46595507
  --------------
  minimum time:     221.210 s (0.40% GC)
  median time:      221.210 s (0.40% GC)
  mean time:        221.210 s (0.40% GC)
  maximum time:     221.210 s (0.40% GC)
  --------------
  samples:          1
  evals/sample:     1
  time tolerance:   5.00%
  memory tolerance: 1.00%
 BenchmarkTools.Trial:
  memory estimate:  27.33 gb
  allocs estimate:  83678387
  --------------
  minimum time:     442.722 s (0.39% GC)
  median time:      442.722 s (0.39% GC)
  mean time:        442.722 s (0.39% GC)
  maximum time:     442.722 s (0.39% GC)
  --------------
  samples:          1
  evals/sample:     1
  time tolerance:   5.00%
  memory tolerance: 1.00%
 BenchmarkTools.Trial:
  memory estimate:  53.65 gb
  allocs estimate:  158554306
  --------------
  minimum time:     868.489 s (0.94% GC)
  median time:      868.489 s (0.94% GC)
  mean time:        868.489 s (0.94% GC)
  maximum time:     868.489 s (0.94% GC)
  --------------
  samples:          1
  evals/sample:     1
  time tolerance:   5.00%
  memory tolerance: 1.00%
 BenchmarkTools.Trial:
  memory estimate:  100.68 gb
  allocs estimate:  284060995
  --------------
  minimum time:     1661.592 s (0.90% GC)
  median time:      1661.592 s (0.90% GC)
  mean time:        1661.592 s (0.90% GC)
  maximum time:     1661.592 s (0.90% GC)
  --------------
  samples:          1
  evals/sample:     1
  time tolerance:   5.00%
  memory tolerance: 1.00%
rohitvarkey commented 7 years ago

This is the @ehein6 benchmark stingergraph/stinger@5b7e640.

Aren't these the StingerWrapper.jl benchmarks?

These look good right? Linear scaling all the way! I'll go ahead and merge this?

jpfairbanks commented 7 years ago

I meant that the link is stinger benchmarks, the numbers are for stingerwrapper. Yeah I think this is ready to merge.