Forrest logo
back to the redis-benchmark tool

redis-benchmark:tldr:9943b

redis-benchmark: Run benchmark by using a [P]ipelining of 16 commands.
$ redis-benchmark -n ${1000000} -t ${set,get} -P ${16}
try on your machine

The command redis-benchmark -n ${1000000} -t ${set,get} -P ${16} is used to run benchmark tests on a Redis server.

Here's a breakdown of the command:

  • redis-benchmark: This is the command line utility provided by Redis for benchmarking purposes. It measures the performance of a Redis server by executing various commands and operations.

  • -n ${1000000}: This option specifies the total number of requests to be made during the benchmark test. In this case, it is set to 1,000,000. This means that Redis will execute 1 million operations as part of the benchmark.

  • -t ${set,get}: This option specifies the type of commands that will be executed during the benchmark. The ${set,get} value indicates that both SET and GET commands will be benchmarked. SET is used to set a key-value pair in Redis, and GET is used to retrieve the value associated with a given key.

  • -P ${16}: This option specifies the number of pipelines to be used during the benchmark. A pipeline is a way to send multiple commands to the Redis server in a single network round-trip, improving the overall performance. In this case, it is set to 16, meaning that Redis will use 16 concurrent pipelines for executing the commands.

Overall, this command will run a benchmark test on a Redis server, executing 1 million SET and GET commands with 16 pipelines, and measure the performance metrics such as throughput (requests per second) and latency.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the redis-benchmark tool