Skip to main content

Running Benchmarks

The applications take the input graph as input as well as an optional flag "-s" to indicate a symmetric graph. Symmetric graphs should be called with the "-s" flag for better performance. For example:

# For Bazel:
$ bazel run //benchmarks/BFS/NonDeterministicBFS:BFS_main -- -s -src 10 ~/gbbs/inputs/rMatGraph_J_5_100
$ bazel run //benchmarks/IntegralWeightSSSP/JulienneDBS17:wBFS_main -- -s -w -src 15 ~/gbbs/inputs/rMatGraph_WJ_5_100
# For Make:
$ ./BFS -s -src 10 ../../../inputs/rMatGraph_J_5_100
$ ./wBFS -s -w -src 15 ../../../inputs/rMatGraph_WJ_5_100

Note that the codes that compute single-source shortest paths (or centrality) take an extra -src flag. The benchmark is run four times by default, and can be changed by passing the -rounds flag followed by an integer indicating the number of runs.

On NUMA machines, adding the command "numactl -i all " when running the program may improve performance for large graphs. For example:

$ numactl -i all bazel run [...]

Running code on compressed graphs#

We make use of the bytePDA format in our benchmark, which is similar to the parallelByte format of Ligra+, extended with additional functionality. We have provided a converter utility which takes as input an uncompressed graph and outputs a bytePDA graph. The converter can be used as follows:

# For Bazel:
bazel run //utils:compressor -- -s -o ~/gbbs/inputs/rMatGraph_J_5_100.bytepda ~/gbbs/inputs/rMatGraph_J_5_100
bazel run //utils:compressor -- -s -w -o ~/gbbs/inputs/rMatGraph_WJ_5_100.bytepda ~/gbbs/inputs/rMatGraph_WJ_5_100
# For Make:
./compressor -s -o ../inputs/rMatGraph_J_5_100.bytepda ../inputs/rMatGraph_J_5_100
./compressor -s -w -o ../inputs/rMatGraph_WJ_5_100.bytepda ../inputs/rMatGraph_WJ_5_100

After an uncompressed graph has been converted to the bytepda format, applications can be run on it by passing in the usual command-line flags, with an additional -c flag.

# For Bazel:
$ bazel run //benchmarks/BFS/NonDeterministicBFS:BFS_main -- -s -c -src 10 ~/gbbs/inputs/rMatGraph_J_5_100.bytepda
# For Make:
$ ./BFS -s -c -src 10 ../../../inputs/rMatGraph_J_5_100.bytepda
$ ./wBFS -s -w -c -src 15 ../../../inputs/rMatGraph_WJ_5_100.bytepda

When processing large compressed graphs, using the -m command-line flag can help if the file is already in the page cache, since the compressed graph data can be mmap'd. Application performance will be affected if the file is not already in the page-cache. We have found that using -m when the compressed graph is backed by SSD results in a slow first-run, followed by fast subsequent runs.

Running code on binary-encoded graphs#

We make use of a binary-graph format in our benchmark. The binary representation stores the representation we use for in-memory processing (compressed sparse row) directly on disk, which enables applications to avoid string-conversion overheads associated with the adjacency graph format described below. We have provided a converter utility which takes as input an uncompressed graph (e.g., in adjacency graph format) and outputs this graph in the binary format. The converter can be used as follows:

# For Bazel:
bazel run //utils:compressor -- -s -o ~/gbbs/inputs/rMatGraph_J_5_100.binary ~/gbbs/inputs/rMatGraph_J_5_100
# For Make:
./compressor -s -o ../inputs/rMatGraph_J_5_100.binary ../inputs/rMatGraph_J_5_100

After an uncompressed graph has been converted to the binary format, applications can be run on it by passing in the usual command-line flags, with an additional -b flag. Note that the application will always load the binary file using mmap.

# For Bazel:
$ bazel run //benchmarks/BFS/NonDeterministicBFS:BFS_main -- -s -b -src 10 ~/gbbs/inputs/rMatGraph_J_5_100.binary
# For Make:
$ ./BFS -s -b -src 10 ../../../inputs/rMatGraph_J_5_100.binary

Note that application performance will be affected if the file is not already in the page-cache. We have found that using -m when the binary graph is backed by SSD or disk results in a slow first-run, followed by fast subsequent runs.