Databases 2 min read

How to Benchmark Redis Performance with redis-benchmark

This guide explains how to use Redis's built‑in redis-benchmark tool to measure the throughput of local or remote Redis instances, covering basic testing, selective command benchmarking, and remote server testing with practical command examples.

Java High-Performance Architecture
Java High-Performance Architecture
Java High-Performance Architecture
How to Benchmark Redis Performance with redis-benchmark

redis-benchmark is the built‑in performance testing tool of Redis, used to evaluate the throughput of a local or remote Redis instance.

Basic test

Run the simplest and most comprehensive test with: redis-benchmark -n 100000 -c 100 This command exercises all Redis data‑structure operations, issuing 100 000 requests with 100 concurrent clients, and reports the number of operations per second for each command.

To display only the operations‑per‑second numbers, add the -q flag.

Testing a specific command

For example, to benchmark only SET and LPUSH:

redis-benchmark -t set,lpush -n 100000 -q

Testing a remote Redis server

Specify the host and port of the target server:

redis-benchmark -h 127.0.0.1 -p 6379 -c 5000 -n 100000 -q
Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

performancetestingredisBenchmarkcommand-line
Java High-Performance Architecture
Written by

Java High-Performance Architecture

Sharing Java development articles and resources, including SSM architecture and the Spring ecosystem (Spring Boot, Spring Cloud, MyBatis, Dubbo, Docker), Zookeeper, Redis, architecture design, microservices, message queues, Git, etc.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.