Forrest logo
back to the redis-benchmark tool

redis-benchmark:tldr:a5aa6

redis-benchmark: Run a subset of tests with default 100000 requests.
$ redis-benchmark -h ${host} -p ${port} -t ${set,lpush} -n ${100000}
try on your machine

This command is using the redis-benchmark tool to perform benchmark testing on a Redis server. Here's what each option and parameter means:

  • redis-benchmark: This is the command to execute the redis-benchmark tool.

  • -h ${host}: This option specifies the hostname or IP address of the Redis server. The ${host} placeholder needs to be replaced with the actual host value.

  • -p ${port}: This option specifies the port number on which the Redis server is running. The ${port} placeholder needs to be replaced with the actual port value.

  • -t ${set,lpush}: This option specifies the type of operation to benchmark. In this case, it is testing the set and lpush operations. The ${set,lpush} placeholder allows you to choose more than one operation to test. Possible operations include set, get, incr, decr, lpush, rpush, lpop, rpop, sadd, srem, hset, etc.

  • -n ${100000}: This option specifies the number of operations to perform during the benchmark test. The ${100000} placeholder needs to be replaced with the desired number of operations.

Overall, this command will execute the redis-benchmark tool on a Redis server located at the specified host and port. It will perform benchmark testing for the set and lpush operations, executing a total of 100,000 operations.

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