redis-benchmark(1)
redis-benchmark is a utility to measure Redis server performance by running load tests with configurable parameters.
Synopsis
redis-benchmark [OPTION]... [COMMAND]...Description
redis-benchmark is a performance testing tool that connects to a Redis server and executes a series of commands to measure throughput, latency, and overall performance. It's useful for establishing baseline performance metrics, comparing different Redis configurations, and identifying performance bottlenecks.
By default, it tests SET and GET operations, but can be configured to test any Redis command. Results include throughput (requests per second), average latency, percentile latencies (p50, p95, p99), and detailed histograms.
Common options
| Flag | What it does |
|---|---|
-h | Server hostname (default: 127.0.0.1) |
-p | Server port (default: 6379) |
-c | Number of parallel connections (default: 50) |
-n | Total number of requests to execute (default: 100000) |
-d | Data size of SET/GET value in bytes (default: 2) |
-t | Run only specific comma-separated commands (e.g., set,get,lpush) |
-q | Quiet mode; show only summary statistics |
-l | Generate loop, reconnect N times after disconnect |
-a | Password for authentication |
--csv | Output results in CSV format |
-r | SET/GET/INCR key range; keyN from 0 to N-1 (default: 100000) |
--latency | Enable latency histogram output |
Examples
Run 100,000 requests against localhost Redis server with default SET/GET test
redis-benchmark -h localhost -p 6379 -n 100000Benchmark with 100 parallel connections, 50k requests, quiet mode showing only summary
redis-benchmark -c 100 -n 50000 -qTest only SET and GET commands with 1KB values across 10,000 requests
redis-benchmark -d 1024 -n 10000 -t set,getBenchmark remote Redis server with authentication, output results to CSV file
redis-benchmark -h redis.example.com -a mypassword -n 100000 --csv > results.csvTest list operations (LPUSH, LPOP) with latency histogram enabled
redis-benchmark -t lpush,lpop -n 50000 --latencyStress test with 200 connections, 1 million requests, randomized keys from 0-9999
redis-benchmark -c 200 -n 1000000 -r 10000 -qDisplay all available command-line options and usage information
redis-benchmark --help