How to Stress Test Redis with redis‑benchmark: Commands, Parameters, and Results
Learn how to use Redis's built-in redis‑benchmark tool to simulate concurrent clients, configure request parameters, interpret performance metrics, and visualize results, ensuring your Redis deployment is properly tested for throughput, latency, and resource utilization before production.
Many people install and deploy Redis without performing performance testing on its configuration and high‑availability setup, which can lead to cache penetration, avalanche, and other issues. As operations staff, you can use Redis's built‑in benchmark tool for simple load testing. redis-benchmark [option] [option value] For example, with a local Redis service at IP 10.100.81.171, you can simulate 100 concurrent users each performing 1000 requests.
redis-benchmark -h 10.100.81.171 -p 6379 -c 100 -n 100000Parameter details:
100000 requests completed in 1.60 seconds (default 100000)
3 bytes payload per request
keep alive: 1 (single connection handling all requests)
100.00% ≤ 2 milliseconds latency
62656.64 requests per second throughput
Result snapshot:
Redis read/write benchmark with a 500‑byte payload:
redis-benchmark -h 10.100.81.171 -p 6379 -q -d 500You can also monitor Redis server resource usage with monitoring commands or other tools:
redis‑benchmark command usage introduction:
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
