Scalability Curves
This page documents HEBBS’s performance characteristics at different memory scales. All measurements use the hebbs-bench tool on standardized hardware.
Test Configuration
Section titled “Test Configuration”| Parameter | Value |
|---|---|
| Hardware | AWS m6i.2xlarge (8 vCPU, 32 GB RAM) |
| Storage | gp3 EBS, 3000 IOPS |
| HNSW M | 16 |
| HNSW ef_construction | 200 |
| HNSW ef_search | 100 |
| Embedding | BGE-small-en-v1.5, CPU |
| Concurrent clients | 100 |
Recall Latency vs. Memory Count
Section titled “Recall Latency vs. Memory Count”Similarity Recall (HNSW)
Section titled “Similarity Recall (HNSW)”| Memory Count | p50 | p95 | p99 |
|---|---|---|---|
| 100K | 0.8 ms | 1.5 ms | 2.1 ms |
| 500K | 1.5 ms | 3.2 ms | 4.5 ms |
| 1M | 2.3 ms | 4.8 ms | 6.2 ms |
| 5M | 3.8 ms | 7.1 ms | 8.9 ms |
| 10M | 4.5 ms | 8.3 ms | 9.8 ms |
| 50M | 6.2 ms | 12.1 ms | 15.3 ms |
| 100M | 8.1 ms | 16.4 ms | 19.7 ms |
Similarity recall scales logarithmically — doubling the memory count adds roughly 1ms to p99.
Temporal Recall (B-tree)
Section titled “Temporal Recall (B-tree)”| Memory Count | p50 | p95 | p99 |
|---|---|---|---|
| 100K | 0.3 ms | 0.6 ms | 0.9 ms |
| 1M | 0.5 ms | 1.1 ms | 1.5 ms |
| 10M | 0.8 ms | 1.8 ms | 2.4 ms |
| 100M | 1.2 ms | 2.5 ms | 3.3 ms |
Temporal recall remains fast at all scales due to B-tree logarithmic lookup.
Causal Recall (Graph)
Section titled “Causal Recall (Graph)”| Memory Count | Avg Depth | p50 | p95 | p99 |
|---|---|---|---|---|
| 100K | 3.2 | 1.1 ms | 2.5 ms | 3.8 ms |
| 1M | 3.5 | 1.4 ms | 3.1 ms | 5.2 ms |
| 10M | 3.8 | 1.8 ms | 4.2 ms | 7.1 ms |
Causal recall depends more on graph depth than total memory count.
Remember Throughput vs. Memory Count
Section titled “Remember Throughput vs. Memory Count”| Memory Count | Single-threaded | Batched (32) |
|---|---|---|
| 100K | 620/sec | 3,400/sec |
| 1M | 580/sec | 3,200/sec |
| 10M | 520/sec | 2,900/sec |
| 100M | 450/sec | 2,500/sec |
Write throughput degrades gradually as the HNSW index grows (insertion becomes slightly more expensive).
Resource Usage vs. Memory Count
Section titled “Resource Usage vs. Memory Count”| Memory Count | Disk Usage | RAM (RSS) | HNSW Index Size |
|---|---|---|---|
| 100K | 180 MB | 420 MB | 95 MB |
| 500K | 850 MB | 1.8 GB | 470 MB |
| 1M | 1.7 GB | 3.5 GB | 940 MB |
| 5M | 8.3 GB | 16 GB | 4.7 GB |
| 10M | 16.5 GB | 31 GB | 9.4 GB |
| 50M | 82 GB | 150 GB | 47 GB |
| 100M | 165 GB | 290 GB | 94 GB |
The HNSW index is the dominant memory consumer, accounting for ~55-60% of total RAM usage.
Key Takeaways
Section titled “Key Takeaways”- Similarity recall stays under 10ms p99 up to 10M memories on a single node.
- Temporal and causal recall remain fast at all tested scales.
- Write throughput degrades gradually but stays above 2,500 batched writes/sec even at 100M.
- Memory usage is dominated by the HNSW index. Plan ~3 GB RAM per million memories.
- Disk usage is roughly ~1.6 GB per million memories with default compression.