resp-bench

March 22, 2026 ยท View on GitHub

A multi-language benchmark suite for RESP protocol (Redis/Valkey) compatible databases and client libraries, with a matrix-based orchestration layer for multi-dimensional parameter sweeps and interactive graph generation.

๐Ÿ“ See docs/ARCHITECTURE.md for the full architecture diagram and component details.

Quick Start

Prerequisites

  • Python 3.8+, Java 21+, Maven
  • Make

1. Run a Benchmark Matrix

# See what would run (dry run)
python scripts/run_benchmark_matrix.py \
    --matrix configs/matrices/driver-comparison-high-tps.json \
    --output-dir results/my-run \
    --dry-run

# Run for real (needs a Valkey/Redis server)
make server-standalone-start
python scripts/run_benchmark_matrix.py \
    --matrix configs/matrices/driver-comparison-high-tps.json \
    --output-dir results/my-run \
    --server-host localhost

2. Generate Interactive Graphs

python scripts/generate_interactive_graphs.py \
    results/my-run/ \
    --output graphs/interactive/my-run/ \
    --title "My Benchmark Run"
# Open graphs/interactive/my-run/scalability_and_delta.html in a browser

3. Run a Single Engine Directly

make java-run \
  DRIVER=configs/drivers/default/jedis.json \
  WORKLOAD=configs/workloads/example-workload.json \
  SERVER=localhost:6379

Matrix Orchestrator

The matrix orchestrator (run_benchmark_matrix.py) sweeps a Cartesian product of configurable dimensions โ€” different drivers, thread configurations, pool sizes, environment variables โ€” producing results for interactive visualization.

{
    "x_axis": "connections",
    "workload_template": "configs/workloads/reference/basic-standalone-single-client-1M-reqs.json",
    "dimensions": {
        "connections": [1, 4, 16, 64, 128],
        "driver_config": ["configs/drivers/high-throughput/spring-data-valkey-glide.json"],
        "pool_size": "$connections",
        "env": [
            {"GLIDE_TOKIO_WORKER_THREADS": "1", "GLIDE_CALLBACK_WORKER_THREADS": "2"},
            {"GLIDE_TOKIO_WORKER_THREADS": "2", "GLIDE_CALLBACK_WORKER_THREADS": "4"},
            {"GLIDE_TOKIO_WORKER_THREADS": "8", "GLIDE_CALLBACK_WORKER_THREADS": "16"}
        ]
    }
}

Features: dimension bindings ($connections), conditional dimensions (applies_to), environment variable injection, _manifest.json metadata output.

๐Ÿ“– Full matrix orchestrator documentation

Interactive Graph Generator

Produces self-contained HTML files with Plotly.js charts: RPS scalability, latency percentiles (p50/p95/p99/p999), CPU usage, efficiency, and delta comparison charts. Supports both legacy (subdirectory-per-client-count) and flat (matrix output) layouts.

๐Ÿ“– Full graph generator documentation

System Monitor

Thread-based system metrics collector that runs alongside benchmarks, collecting CPU% (system-wide via /proc/stat), memory RSS (per process group via /proc/<pid>/status), and system memory availability. Outputs .system.ndjson with each sample.

Supported Languages

LanguageStatusDrivers
Javaโœ… ReadyJedis, Lettuce, Valkey-Glide, Redisson, Spring Data Valkey/Redis
Rubyโœ… Readyredis-rb, valkey-glide-ruby
C#โœ… Readyvalkey-glide-csharp, StackExchange.Redis
Python๐Ÿšง Plannedredis-py, aioredis, valkey-glide

Project Structure

resp-bench/
โ”œโ”€โ”€ Makefile                     # Server management + all targets
โ”œโ”€โ”€ configs/
โ”‚   โ”œโ”€โ”€ drivers/                 # Driver configurations (default/, high-throughput/)
โ”‚   โ”œโ”€โ”€ workloads/               # Workload definitions (reference/)
โ”‚   โ”œโ”€โ”€ matrices/                # Matrix orchestrator configs
โ”‚   โ”œโ”€โ”€ schemas/                 # JSON schemas for validation
โ”‚   โ””โ”€โ”€ test/                    # E2E test configs
โ”‚       โ”œโ”€โ”€ drivers/             # Recording client configs
โ”‚       โ”œโ”€โ”€ matrices/            # Test matrix configs
โ”‚       โ””โ”€โ”€ workloads/           # Short test workloads
โ”œโ”€โ”€ scripts/
โ”‚   โ”œโ”€โ”€ run_benchmark_matrix.py  # Matrix orchestrator
โ”‚   โ”œโ”€โ”€ generate_interactive_graphs.py  # Interactive graph generator
โ”‚   โ”œโ”€โ”€ system_monitor.py        # Thread-based CPU/memory monitor
โ”‚   โ””โ”€โ”€ tests/                   # Python test suite (108 tests)
โ”‚       โ”œโ”€โ”€ test_outlier_detection.py
โ”‚       โ”œโ”€โ”€ test_matrix_config.py
โ”‚       โ”œโ”€โ”€ test_graph_data_loading.py
โ”‚       โ”œโ”€โ”€ test_graph_html_output.py
โ”‚       โ”œโ”€โ”€ test_system_monitor.py
โ”‚       โ””โ”€โ”€ test_e2e_pipeline.py  # E2E: engine โ†’ NDJSON โ†’ graphs
โ”œโ”€โ”€ java/                        # Java benchmark engine
โ”œโ”€โ”€ ruby/                        # Ruby benchmark engine
โ”œโ”€โ”€ csharp/                      # C# (.NET 10) benchmark engine
โ”œโ”€โ”€ docs/
โ”‚   โ”œโ”€โ”€ ARCHITECTURE.md          # System architecture
โ”‚   โ”œโ”€โ”€ BENCHMARK_MATRIX.md      # Matrix orchestrator docs
โ”‚   โ”œโ”€โ”€ INTERACTIVE_GRAPHS.md    # Graph generator docs
โ”‚   โ”œโ”€โ”€ CONFIG_SPECIFICATION.md  # Configuration format spec
โ”‚   โ”œโ”€โ”€ BENCHMARKS_JAVA.md       # Java benchmark details
โ”‚   โ”œโ”€โ”€ BENCHMARKS_CSHARP.md     # C# benchmark details
โ”‚   โ””โ”€โ”€ BENCHMARKS_RUBY.md       # Ruby benchmark details
โ””โ”€โ”€ graphs/interactive/          # Generated HTML graphs

Configuration

Driver Configuration

{
  "driver_id": "spring-data-valkey",
  "mode": "standalone",
  "specific_driver_config": {
    "secondary_driver_id": "valkey-glide",
    "pool_size": 32
  }
}

Workload Configuration

{
  "phases": [{
    "id": "STEADY",
    "connections": 64,
    "commands": [
      {"command": "set", "weight": 0.5, "data_size_bytes": 512},
      {"command": "get", "weight": 0.5}
    ],
    "completion": {"type": "requests", "requests": 1000000}
  }]
}

See docs/CONFIG_SPECIFICATION.md for full details.

Make Targets

Benchmark Matrix

TargetDescription
make benchmark-matrixRun matrix benchmark (MATRIX, OUTPUT_DIR, SERVER_HOST)
make benchmark-matrix-dry-runShow plan without running
make benchmark-matrix-graphsGenerate graphs from results

Testing

TargetDescription
make test-scriptsRun 99 Python unit tests (~12s)
make test-scripts-e2eRun 9 e2e integration tests (~7min, builds Java)
make test-scripts-allRun all 108 tests
make java-testRun Java unit tests
make ruby-testRun Ruby tests
make csharp-testRun C# tests

Engines

TargetDescription
make java-runRun Java engine (DRIVER, WORKLOAD, SERVER)
make ruby-runRun Ruby engine (DRIVER, WORKLOAD, SERVER)
make csharp-runRun C# engine (DRIVER, WORKLOAD, SERVER)
make java-buildBuild Java JAR
make csharp-buildBuild C# executable

Server Management

TargetDescription
make server-standalone-startStart standalone server (port 6379)
make server-cluster-initInitialize cluster (ports 7379-7382)
make server-stopStop all servers

Contributing

Author

Authored by Ilia Kolominsky

License

Apache License 2.0 โ€” see LICENSE