A comprehensive benchmark suite comparing CongraphDB v0.2.1 against industry-standard graph and vector databases.
๐ Live Results โข Quick Start โข Documentation โข v0.2.1 Features
| Metric | Description | What It Measures |
|---|---|---|
| โก Ingestion Rate | Nodes/edges per second | Write throughput & data loading performance |
| ๐ Query Latency | k-hop traversal (1-5 hops) | Graph navigation speed at varying depths |
| ๐งฎ Algorithmic Throughput | PageRank execution time | Graph algorithm performance |
| ๐พ Memory Footprint | Peak RSS during operations | Memory efficiency & resource usage |
| ๐ Cold vs. Warm Start | First query vs. cached | Startup overhead & caching effectiveness |
| Scale | Nodes | Edges | Use Case |
|---|---|---|---|
| ๐น Small | 10K | 50K | Quick testing & development |
| ๐ธ Medium | 100K | 1M | Standard production workload |
| ๐บ Large | 1M | 10M | Enterprise-scale scenarios |
New in v0.2.1: Extended benchmarks for CongraphDB's hybrid engine, including parallel HNSW ingestion, batch vector search, and Graph RAG algorithms:
| Benchmark | Description | Metrics |
|---|---|---|
| ๐ค Vector Search | Parallel HNSW ingestion & batch similarity search | inserts/sec, search_latency_ms, recall |
| ๐ง Graph RAG | Fact/Entity retrieval & Graph algorithms | ops/sec, traversal_depth, memory_rss |
| ๐ Transactions | WAL durability & OCC concurrency overhead | latency_ms, throughput_tps, recovery_time |
| ๐๏ธ Query Engine | UNWIND & Parameterized query performance | queries/sec, planning_time_ms |
| ๐ Algorithms | PageRank, Leiden, Closeness, Louvain | algorithm_time_ms, scaling_factor |
| Category | Algorithms |
|---|---|
| Centrality | PageRank, Betweenness, Closeness, Degree |
| Community Detection | Louvain, Leiden, Spectral, SLPA, Infomap, Label Propagation |
| Traversal | BFS, DFS, Dijkstra |
| Analytics | Triangle Count, Connected Components, SCC |
# Run all v0.1.13 benchmarks
npm run benchmark:v0113
# Run specific v0.1.13 benchmark
npm run benchmark:dml # DML operations
npm run benchmark:api # API comparison
npm run benchmark:vector # Vector search (v0.1.x path)
# Run v0.2.1 Graph RAG benchmarks
npm run benchmark:v021 # All v0.2.1 benchmarks
npm run benchmark:rag # Graph RAG specifically| Option | Description | Default |
|---|---|---|
--v021 |
Enable v0.2.1 benchmarks | false |
--v021-benchmarks <list> |
Comma-separated v0.2.1 benchmarks: graph-rag | all |
| Option | Description | Default |
|---|---|---|
--v0113 |
Enable v0.1.13 benchmarks | false |
--v0113-benchmarks <list> |
Comma-separated v0.1.13 benchmarks | all |
This benchmark validates CongraphDB's performance advantages as an Embedded Graph Database for Node.js applications.
| Database | Type | Language | Architecture |
|---|---|---|---|
| CongraphDB | ๐ Target | TypeScript | Embedded Graph DB |
| Neo4j | Industry Standard | Java | Client-Server Graph DB |
| Kรนzu | Embedded Graph | C++ | Embedded Graph DB |
| Graphology | In-Memory | JavaScript | Pure-JS Graph Library |
| LevelGraph | RDF Store | JavaScript | JS RDF Triple Store |
| Better-SQLite3 | Relational | C | Embedded SQL Database |
# Install dependencies
npm install
# Run medium-scale benchmark with default engines
npm run benchmark
# Run specific scale
npm run benchmark:small # 10k nodes / 50k edges
npm run benchmark:medium # 100k nodes / 1M edges
npm run benchmark:large # 1M nodes / 10M edges
# Run specific engines
node dist/cli.js run --engines congraph,neo4j,sqlite
# View help
node dist/cli.js run --helpTo benchmark against Neo4j, you need a running Neo4j instance:
# Using Docker
docker run -d \
--name neo4j \
-p 7687:7687 -p 7474:7474 \
-e NEO4J_AUTH=neo4j/your_password \
neo4j:5.26-communityThen create a .env file:
NEO4J_URI=bolt://localhost:7687
NEO4J_USER=neo4j
NEO4J_PASSWORD=your_passwordTo benchmark against Kรนzu, install the Node.js bindings:
# Follow https://github.com/kuzudb/kuzu for installation instructions
npm install kuzuView interactive benchmark results with charts and visualizations
โจ Features:
- ๐ Interactive charts for all metrics
- ๐ Performance leaderboard
- โ๏ธ Engine comparisons
- ๐ Historical trends
# Serve documentation locally
npm run docs:serve
# Build documentation
npm run docs:build
# Deploy to GitHub Pages
npm run docs:deployBenchmark results are also saved to the results/ directory:
benchmark-*.json- Full results in JSON formatbenchmark-*.csv- Summary results in CSV format
Results from the latest benchmark run
๐ก Tip: Run
npm run benchmarkto generate fresh results!
| Engine | Scale | โก Ingestion | ๐ 1-hop | ๐ 3-hop | ๐ 5-hop | ๐งฎ PageRank | ๐พ Memory |
|---|---|---|---|---|---|---|---|
| CongraphDB | Small | 45,200/s | 0.4ms | 2.1ms | 8.4ms | 120ms | 115MB |
| Neo4j | Small | 12,800/s | 1.2ms | 5.4ms | 24.1ms | 450ms | 1.2GB |
| SQLite | Small | 8,500/s | 0.8ms | 8.2ms | 45.3ms | 1.8s | 45MB |
| Kรนzu | Small | 38,400/s | 0.5ms | 2.5ms | 10.2ms | 180ms | 180MB |
Results for 100,000 vectors (1536-dim) on a 16-core workstation:
| Operation | Complexity | CongraphDB (v0.2.1) | Improvement |
|---|---|---|---|
| HNSW Ingestion | Parallel | 14,850 nodes/s | 5.2x vs v0.1.x |
| Similarity Search | k=10, ef=50 | 1.2ms | 12x vs Cypher-only |
| Batch Search | 100 queries | 48ms | 8.5x vs Sequential |
| Graph RAG Search | Dual-Level | 12.4ms | New Feature |
| Context Retrieval | 3-hop Paths | 8.2ms | Optimized Pathing |
congraphdb-benchmark/
โโโ bin/ # CLI entry point
โโโ src/
โ โโโ engines/ # Database adapters
โ โ โโโ congraph.ts # CongraphDB adapter
โ โ โโโ neo4j.ts # Neo4j adapter
โ โ โโโ kuzu.ts # Kรนzu adapter
โ โ โโโ sqlite.ts # Better-SQLite3 adapter
โ โ โโโ graphology.ts # Graphology adapter
โ โ โโโ levelgraph.ts # LevelGraph adapter
โ โโโ benchmarks/ # v0.1.10 specialized benchmarks
โ โ โโโ api-comparison.ts # Cypher vs JavaScript API
โ โ โโโ dml-operations.ts # DML operations tests
โ โ โโโ persistence.ts # Storage mode tests
โ โ โโโ statistics.ts # Query statistics overhead
โ โ โโโ vector-search.ts # HNSW vector search benchmarks (NEW)
โ โ โโโ optimizer.ts # Query optimizer benchmarks (NEW)
โ โโโ core/
โ โ โโโ suite.ts # Test suite executor
โ โ โโโ recorder.ts # Metrics & export
โ โโโ data/
โ โโโ academic.ts # Synthetic data generator
โโโ docs/ # Interactive documentation
โ โโโ index.md # Landing page
โ โโโ results/ # Results pages with charts
โ โโโ engines/ # Engine comparisons
โ โโโ methodology/ # Testing methodology
โโโ data/ # Benchmark data for docs
โ โโโ latest.json # Latest results
โ โโโ history.json # Historical trends
โโโ results/ # Benchmark output
โโโ scripts/ # Documentation generation
โโโ overrides/ # Custom styles/charts
โโโ .github/workflows/ # CI automation
The benchmark uses a Synthetic Academic Citation Network resembling the Cora/PubMed datasets:
- Nodes: Papers with metadata (title, category, year, authors, venue)
- Edges: Citation relationships with preferential attachment
- Categories: AI, ML, DB, IR, CV, NLP
When adding new engines or benchmarks:
- Implement the
EngineAdapterinterface insrc/engines/ - Add the engine to the CLI parser in
src/cli.ts - Update this README with your results
MIT
Last updated: 2026-04-17 (v0.1.13)