LinuxCommandLibrary

redis-benchmark

Benchmark Redis server performance

TLDR

Run default benchmark

$ redis-benchmark
copy
Connect to host
$ redis-benchmark -h [localhost] -p [6379]
copy
Set client count
$ redis-benchmark -c [100]
copy
Set request count
$ redis-benchmark -n [10000]
copy
Test specific command
$ redis-benchmark -t [get,set]
copy
Test with specific data size
$ redis-benchmark -d [256]
copy
Pipeline requests
$ redis-benchmark -P [16]
copy
Quiet mode
$ redis-benchmark -q
copy

SYNOPSIS

redis-benchmark [-h host] [-p port] [-c clients] [-n requests] [options]

DESCRIPTION

redis-benchmark measures Redis server performance by simulating multiple clients concurrently executing various commands. By default it tests a standard set of operations including SET, GET, INCR, LPUSH, LPOP, and others, reporting requests per second for each command type.
The -c flag controls the number of concurrent client connections, while -n sets the total request count. Pipelining with -P batches multiple requests per round-trip, testing raw throughput independent of network latency. The -d flag adjusts the data payload size to benchmark different workload patterns, and -t limits testing to specific commands.

PARAMETERS

-h HOST

Server hostname.
-p PORT
Server port.
-c N
Concurrent clients.
-n N
Total requests.
-t TESTS
Test commands.
-d SIZE
Data size in bytes.
-P N
Pipeline N requests.
-q
Quiet, show query/sec.
-a PASSWORD
Authentication password.
--csv
CSV output.

CAVEATS

Results vary by hardware and network. Local testing eliminates network overhead. Production has different patterns.

HISTORY

redis-benchmark is included with Redis, originally created by Salvatore Sanfilippo in 2009. It provides standardized performance testing for Redis deployments.

SEE ALSO

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community