Graph Benchmarks
Graph database performance
Measured graph performance for the single-file engine. Latest run: February 4, 2026. Raw logs live in docs/benchmarks/results/.
Test Configuration
- Nodes: 10,000
- Edges: 50,000
- Iterations: 10,000
- Vector dims: 128
- Vector count: 1,000
Rust Core (single_file_raw_bench)
| Operation | p50 | p95 |
|---|---|---|
| Key lookup (random existing) | 125ns | 291ns |
| 1-hop traversal (out) | 208ns | 292ns |
| Edge exists (random) | 83ns | 125ns |
| Batch write (100 nodes) | 34.08us | 56.54us |
| Batch write (100 edges) | 40.25us | 65.58us |
| Batch write (100 edges + props) | 172.33us | 253.12us |
| get_node_vector() | 125ns | 209ns |
| has_node_vector() | 42ns | 84ns |
| Set vectors (batch 100) | 94.33us | 195.38us |
Parallel Write Scaling Notes (2026-02-05)
Multi-writer write throughput saturates quickly because commits serialize WAL ordering and delta application. For max ingest throughput: parallelize prep, funnel into 1 writer doing batched transactions.
Nodes + Edges (create_nodes_batch + add_edges_batch)
Config: --tx-per-thread 400 --batch-size 500 --edges-per-node 1 --edge-types 3 --edge-props 0 --wal-size 268435456.
| sync_mode | threads | node rate |
|---|---|---|
| Normal | 1 | 521.89K/s |
| Normal | 2 | 577.43K/s |
| Normal | 4 | 603.92K/s |
| Off | 1 | 771.18K/s |
| Off | 2 | 896.99K/s |
| Off | 4 | 805.34K/s |
Vectors (set_node_vector, dims=128)
Config: --vector-dims 128 --tx-per-thread 200 --batch-size 500 --wal-size 1610612736 --sync-mode normal --no-auto-checkpoint.
| threads | vector rate |
|---|---|
| 1 | 529.31K/s |
| 2 | 452.36K/s |
| 4 | 388.78K/s |
Python Bindings (benchmark_single_file_raw.py)
| Operation | p50 | p95 |
|---|---|---|
| Key lookup (random existing) | 208ns | 334ns |
| 1-hop traversal (out) | 458ns | 708ns |
| Edge exists (random) | 167ns | 209ns |
| Batch write (100 nodes) | 49.71us | 57.96us |
| Batch write (100 edges) | 53.96us | 64.21us |
| Batch write (100 edges + props) | 436.58us | 647.46us |
| get_node_vector() | 1.25us | 2.04us |
| has_node_vector() | 167ns | 208ns |
| Set vectors (batch 100) | 241.83us | 658.42us |
SQLite Baseline (single-file raw)
Apples-to-apples config: WAL mode, synchronous=normal,temp_store=MEMORY, locking_mode=EXCLUSIVE,cache_size=256MB, WAL autocheckpoint disabled. Edge props are stored in a separate table; edges use INSERT OR IGNORE and props use INSERT OR REPLACE. Script: docs/benchmarks/sqlite_single_file_raw_bench.py.
| Operation | p50 | p95 |
|---|---|---|
| Batch write (100 nodes) | 120.67us | 2.98ms |
Running Benchmarks
| Command | Description |
|---|---|
cargo run --release --example single_file_raw_bench --no-default-features -- --nodes 10000 --edges 50000 --iterations 10000 | Rust single-file raw benchmark |
python3 benchmark_single_file_raw.py --nodes 10000 --edges 50000 --iterations 10000 | Python single-file raw benchmark |