Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Stress Tests

Comprehensive stress testing infrastructure for Neumann targeting 1M entity scale with extensive coverage of concurrency, data volume, and sustained load.

Quick Start

# Run all stress tests (45+ min total)
cargo test --release -p stress_tests -- --ignored --nocapture

# Run specific test suite
cargo test --release -p stress_tests --test hnsw_stress -- --ignored --nocapture

# Run with custom duration (30s instead of default)
STRESS_DURATION=30 cargo test --release -p stress_tests -- --ignored --nocapture

Test Suites

SuiteTestsDescription
HNSW Stress41M vector indexing, concurrent builds
TieredStore Stress3Hot/cold migration under load
Mixed Workload2All engines concurrent, realistic patterns
TensorStore Stress41M entities, high contention
BloomFilter Stress31M keys, bit-level concurrency
QueryRouter Stress3Concurrent queries, sustained writes
Duration Stress3Long-running stability, memory leaks

Key Performance Findings

TensorStore (DashMap)

  • 7.5M writes/sec at 1M entities
  • Sub-microsecond median latency
  • Handles 16:1 contention ratio with 2.5M ops/sec

HNSW Index

  • 3,372 vectors/sec insert rate at 1M scale
  • 0.11ms search latency (p50)
  • 99.8% recall@10 under concurrent load

BloomFilter

  • 0.88% FP rate at 1M keys (target 1%)
  • 15M+ ops/sec bit-level operations
  • Thread-safe with AtomicU64

Mixed Workloads

  • All engines can operate concurrently
  • Graph operations (5us p50) and vector ops (< 1us p50) are fastest
  • Relational engine adds ~12ms p50 overhead due to schema operations

Configuration

Environment Variables

VariableDefaultDescription
STRESS_DURATION30 (quick) / 600 (full)Test duration in seconds
STRESS_THREADS16Thread count for tests

Config Presets

#![allow(unused)]
fn main() {
// Quick mode (CI): 100K entities, 4 threads, 30s
let config = quick_config();

// Full mode (local): 1M entities, 16 threads, 10min
let config = full_config();

// Endurance mode: 500K entities, 8 threads, 1 hour
let config = endurance_config();
}

Latency Metrics

All tests report percentile latencies using HdrHistogram:

MetricDescription
p50Median latency
p9999th percentile
p99999.9th percentile
maxMaximum observed

Running in CI

For CI pipelines, use quick_config with limited duration:

- name: Run stress tests
  run: |
    STRESS_DURATION=30 cargo test --release -p stress_tests -- --ignored --nocapture
  timeout-minutes: 15