-
Notifications
You must be signed in to change notification settings - Fork 2
Benchmark Suite
Abdullah edited this page Feb 8, 2026
·
28 revisions
The GraphBrew Benchmark Suite provides automated tools for running comprehensive experiments across multiple graphs, algorithms, and benchmarks.
scripts/
├── graphbrew_experiment.py # ⭐ MAIN: One-click unified pipeline
│ # Downloads, builds, benchmarks, analyzes
├── requirements.txt # Python dependencies
├── lib/ # 📦 Core modules (all functionality)
│ ├── download.py # Graph downloading
│ ├── benchmark.py # Benchmark execution
│ ├── cache.py # Cache simulation
│ ├── weights.py # Weight management
│ ├── training.py # ML training
│ ├── features.py # Graph feature extraction
│ └── ... # Other modules
└── weights/ # Auto-clustered type weights
├── active/ # C++ reads from here
├── merged/ # Accumulated weights
└── runs/ # Historical snapshots
The unified script handles everything automatically:
# Full pipeline: download → build → benchmark → analyze → train
python3 scripts/graphbrew_experiment.py --full --size small
# Just run benchmarks on existing graphs
python3 scripts/graphbrew_experiment.py --phase benchmark
# Quick test with key algorithms
python3 scripts/graphbrew_experiment.py --size small --quick
# Skip cache simulations (faster)
python3 scripts/graphbrew_experiment.py --phase all --skip-cache
# Run brute-force validation
python3 scripts/graphbrew_experiment.py --brute-force
# Complete training pipeline: reorder → benchmark → cache sim → update weights
python3 scripts/graphbrew_experiment.py --train --size small --max-graphs 5| Size | Graphs | Total Size | Use Case |
|---|---|---|---|
SMALL |
16 | ~62 MB | Quick testing |
MEDIUM |
28 | ~1.1 GB | Standard experiments |
LARGE |
37 | ~25 GB | Full evaluation |
XLARGE |
6 | ~63 GB | Massive-scale testing |
ALL |
87 | ~89 GB | Complete benchmark |
The graph catalog includes diverse graph types:
| Category | Examples | Count |
|---|---|---|
| Mesh | mesh networks, finite element | 16 |
| Web | uk-2002, webbase-2001, web-Google | 15 |
| Collaboration | hollywood-2009, com-DBLP, ca-AstroPh | 11 |
| Social | soc-LiveJournal, com-Orkut | 10 |
| Synthetic | RMAT, uniform random | 8 |
| Road | roadNet-CA, europe-osm, USA-road-d | 7 |
| Citation | cit-Patents, cit-HepPh | 5 |
| Commerce | amazon0601, com-Amazon | 5 |
| P2P | p2p-Gnutella24/25/30/31 | 4 |
| Communication | email-Enron, wiki-Talk | 3 |
| Infrastructure | as-Skitter | 3 |
All results are saved to ./results/:
-
reorder_*.json- Reordering times -
benchmark_*.json- Execution times -
cache_*.json- Cache miss rates (L1/L2/L3) -
mappings/- Pre-generated label maps for consistent reordering -
graph_properties_cache.json- Cached graph properties for type detection
Auto-clustered weights are saved to ./scripts/weights/active/:
-
type_registry.json- Maps graph names to type IDs + cluster centroids -
type_N.json- Per-cluster trained ML weights (type_0.json, type_1.json, etc.)
If you prefer more control, you can use specific phases of the unified script:
# List available graphs
python3 scripts/graphbrew_experiment.py --download-only --size small
# Download specific size category
python3 scripts/graphbrew_experiment.py --download-only --size medium
# Force re-download
python3 scripts/graphbrew_experiment.py --download-only --force-download# Pre-generate label maps for all algorithms
python3 scripts/graphbrew_experiment.py --generate-maps --size small# Just reordering phase (measure reorder times)
python3 scripts/graphbrew_experiment.py --phase reorder --size small
# Just benchmarks (skip cache simulation)
python3 scripts/graphbrew_experiment.py --phase benchmark --size small --skip-cache
# Just cache simulation
python3 scripts/graphbrew_experiment.py --phase cache --size small
# Just weight generation (from existing results)
python3 scripts/graphbrew_experiment.py --phase weights# Specify graph size range
python3 scripts/graphbrew_experiment.py --min-mb 10 --max-mb 500
# Limit number of graphs
python3 scripts/graphbrew_experiment.py --max-graphs 10
# Custom trials
python3 scripts/graphbrew_experiment.py --trials 10
# Key algorithms only (faster)
python3 scripts/graphbrew_experiment.py --quick[
{
"graph": "email-Enron",
"algorithm": "LeidenCSR",
"algorithm_id": 17,
"benchmark": "pr",
"time_seconds": 0.0234,
"reorder_time": 0.0,
"trials": 2,
"success": true,
"error": "",
"extra": {}
}
][
{
"graph": "email-Enron",
"algorithm_id": 17,
"algorithm_name": "LeidenCSR",
"benchmark": "pr",
"l1_hit_rate": 85.2,
"l2_hit_rate": 92.1,
"l3_hit_rate": 98.5,
"l1_misses": 0,
"l2_misses": 0,
"l3_misses": 0,
"success": true,
"error": ""
}
][
{
"graph": "email-Enron",
"algorithm_id": 17,
"algorithm_name": "LeidenCSR",
"time_seconds": 0.145,
"mapping_file": "results/mappings/email-Enron/LeidenCSR.lo",
"success": true,
"error": ""
}
]{
"LeidenCSR": {
"bias": 0.85,
"w_modularity": 0.25,
"w_log_nodes": 0.1,
"w_log_edges": 0.1,
"w_density": -0.05,
"w_avg_degree": 0.15,
"w_degree_variance": 0.15,
"w_hub_concentration": 0.25,
"cache_l1_impact": 0.1,
"cache_l2_impact": 0.05,
"cache_l3_impact": 0.02,
"cache_dram_penalty": -0.1,
"w_reorder_time": -0.0001,
"_metadata": {
"win_rate": 0.85,
"avg_speedup": 2.34,
"times_best": 42,
"sample_count": 50,
"avg_reorder_time": 1.234,
"avg_l1_hit_rate": 85.2,
"avg_l2_hit_rate": 92.1,
"avg_l3_hit_rate": 98.5
}
}
}Analyze how reordering affects PageRank convergence.
Run PageRank directly via the binary with verbose output:
# Run PR with verbose convergence output
./bench/bin/pr -f graph.mtx -s -o 7 -n 5Or include in the experiment pipeline:
# Run benchmarks (includes convergence data in results)
python3 scripts/graphbrew_experiment.py --phase benchmark --size smallPageRank convergence varies by reordering algorithm:
Graph: facebook.el
┌────────────────────┬────────────┬──────────────┐
│ Algorithm │ Iterations │ Final Error │
├────────────────────┼────────────┼──────────────┤
│ ORIGINAL (0) │ 18 │ 9.2e-7 │
│ HUBCLUSTERDBG (7) │ 16 │ 8.8e-7 │
│ LeidenOrder (15) │ 15 │ 9.1e-7 │
│ LeidenCSR (17) │ 14 │ 8.5e-7 │
└────────────────────┴────────────┴──────────────┘
# One-click full experiment
python3 scripts/graphbrew_experiment.py --full --size mediumThis automatically:
- Downloads graphs from SuiteSparse
- Builds binaries
- Generates label maps for consistent reordering
- Runs all benchmarks with all algorithms
- Runs cache simulations
- Trains perceptron weights with cache + reorder time features
#!/bin/bash
# Custom experiment workflow
cd GraphBrew
# 1. Download specific size graphs
python3 scripts/graphbrew_experiment.py --download-only --size medium
# 2. Generate label maps once
python3 scripts/graphbrew_experiment.py --generate-maps --size medium
# 3. Run benchmarks using pre-generated maps
python3 scripts/graphbrew_experiment.py --use-maps --phase benchmark --size medium --trials 10
# 4. Run cache simulations
python3 scripts/graphbrew_experiment.py --use-maps --phase cache --size medium
# 5. Generate perceptron weights
python3 scripts/graphbrew_experiment.py --phase weights
# 6. Run brute-force validation
python3 scripts/graphbrew_experiment.py --brute-force --size medium# Control OpenMP threads
export OMP_NUM_THREADS=8
python3 scripts/graphbrew_experiment.py --full --size small# Skip slow algorithms on large graphs
python3 scripts/graphbrew_experiment.py --skip-slow --size large
# Skip expensive cache simulations (BC, SSSP)
python3 scripts/graphbrew_experiment.py --skip-expensive --phase cache# Check downloaded graphs
ls results/graphs/
# Re-download with force flag
python3 scripts/graphbrew_experiment.py --download-only --force-download# Increase timeouts
python3 scripts/graphbrew_experiment.py \
--timeout-reorder 86400 \
--timeout-benchmark 7200 \
--timeout-sim 14400# Use smaller graphs
python3 scripts/graphbrew_experiment.py --size small
# Skip large graphs
python3 scripts/graphbrew_experiment.py --max-mb 500# Clean results only (keep graphs)
python3 scripts/graphbrew_experiment.py --clean
# Full reset (remove everything including downloaded graphs)
python3 scripts/graphbrew_experiment.py --clean-all- Correlation-Analysis - Analyze benchmark results
- AdaptiveOrder-ML - Train the perceptron
- Running-Benchmarks - Manual benchmark commands
- Python-Scripts - Full script documentation