LinuxCommandLibrary

redis-benchmark

A tool to benchmark a Redis server.

TLDR

Run full benchmark

$ redis-benchmark
copy


Run benchmark on a specific Redis server
$ redis-benchmark -h [host] -p [port] -a [password]
copy


Run a subset of tests with default 100000 requests
$ redis-benchmark -h [host] -p [port] -t [set,lpush] -n [100000]
copy


Run with a specific script
$ redis-benchmark -n [100000] script load "[redis.call('set', 'foo', 'bar')]"
copy


Run benchmark by using 100000 [r]andom keys
$ redis-benchmark -t [set] -r [100000]
copy


Run benchmark by using a [P]ipelining of 16 commands
$ redis-benchmark -n [1000000] -t [set,get] -P [16]
copy


Run benchmark [q]uietly and only show query per seconds result
$ redis-benchmark -q
copy

Copied to clipboard