Skip to main content

Grafio In-Memory Provider Performance

· 4 min read
Founder Grafio

We're excited to share comprehensive benchmark results for Grafio's in-memory storage provider. These numbers represent real-world performance on production-grade hardware, demonstrating the capabilities of our high-performance graph database.

Test Environment

Our benchmarks were conducted on a modern high-performance workstation:

ComponentDetails
CPUIntel Core Ultra 9 185H (16C/22T) @ 2.3 GHz
RAM32 GB DDR5
StorageHigh-speed NVMe SSD
Node.jsv24.x with --expose-gc flag

We tested across three scales to understand Grafio's performance characteristics:

  • Small: 10,000 nodes / 30,020 edges
  • Medium: 50,000 nodes / 150,014 edges
  • Large: 100,000 nodes / 300,142 edges

Write Performance

Grafio's in-memory provider delivers exceptional write throughput:

Operation10K Scale50K Scale100K Scale
Graph Construction1.1K ops/sec628 ops/sec1.7K ops/sec
addNode (single)137K ops/sec122K ops/sec141K ops/sec
addEdge (single)147K ops/sec154K ops/sec186K ops/sec

Single node and edge operations achieve 140,000+ operations per second, making Grafio ideal for high-throughput data ingestion workloads.

Read Performance

Grafio provides sub-millisecond response times for ID-based lookups:

Operation10K Scale50K Scale100K Scale
Get Node by ID (parameterised)35.2K ops/sec34.5K ops/sec32.5K ops/sec
Get nodes by id26.5K ops/sec28.4K ops/sec22.8K ops/sec
Get all Nodes26.3K ops/sec38.7K ops/sec22.5K ops/sec

Type and property-based queries scale linearly:

Operation10K Scale50K Scale100K Scale
Get nodes by type4.09 ms19.88 ms40.57 ms
Get nodes by property18.87 ms94.09 ms318.86 ms

Edge navigation operations maintain consistent throughput across all scales:

Operation10K Scale50K Scale100K Scale
Get Edges from node13.5K ops/sec12.9K ops/sec9.3K ops/sec
Get Edges to node16.2K ops/sec8.7K ops/sec9.1K ops/sec
Get edges between nodes10.6K ops/sec9.9K ops/sec8.3K ops/sec

Traversal Performance

Grafio's traversal engine excels at path finding with type filters:

Operation10K Scale50K Scale100K Scale
Var-length traversal (1..5)3.02 ms2.90 ms9.79 ms
Traversal with types0.086 ms0.109 ms1.02 ms
Traversal wildcard with types0.313 ms0.246 ms0.433 ms

Typed traversals achieve sub-millisecond performance, enabling real-time graph analytics.

Aggregation Performance

Complex graph aggregations are handled efficiently:

Operation10K Scale50K Scale100K Scale
Aggregate by type0.950 ms2.04 ms8.40 ms
Aggregate across joined nodes7.43 ms32.56 ms119.21 ms

Memory Efficiency

Grafio maintains a small memory footprint while handling large graphs:

ScaleHeap FootprintRSS
10K nodes19.9 MB329.4 MB
50K nodes95.1 MB564.4 MB
100K nodes190.0 MB1.1 GB

The memory-to-node ratio is approximately 2 bytes per node, demonstrating excellent efficiency for in-memory graph storage.

Performance Visualization

Write Operations Performance

Read Operations Performance

Navigation Operations Performance

Traversal Operations Performance

Aggregation Operations Performance

Key Takeaways

  1. Write Throughput: 140,000+ ops/sec for single node/edge operations
  2. ID-Based Reads: Sub-millisecond response times, 30,000+ ops/sec
  3. Typed Traversals: Sub-millisecond performance enables real-time analytics
  4. Memory Efficiency: ~190MB for 100K nodes with edges (~2 bytes/node)
  5. Linear Scaling: Performance degrades gracefully as dataset grows

Production Recommendations

For optimal performance in production environments:

  • Use ID-based lookups for latency-critical paths
  • Leverage typed traversals for graph pattern matching
  • Consider indexed storage providers (Redis) for property-heavy workloads
  • Batch writes when importing large datasets

Next Steps

Want to run these benchmarks on your own hardware? Check out our performance testing guide to replicate these results and test against your specific use case.

Grafio's in-memory provider delivers the performance characteristics needed for real-time graph applications, from social network analysis to fraud detection systems.