Redis Benchmarks

Redis benchmark is a utility tool which is used to check the performance of Redis by using multiple (n) command simultaneously.

Syntax

Example

Let's call Redis Benchmarkcommands:

redis-benchmark -n 100000

Redis Benchmarks 1
Redis Benchmarks 2

See the list of available options in Redis benchmark:

IndexOptionDescriptionDefault Value
1-hSpecifies server host name127.0.0.1
2-pSpecifies server port6379
3-sSpecifies server socket
4-cSpecifies the number of parallel connections50
5-nSpecifies the total number of requests10000
6-dSpecifies data size of SET/GET value in bytes2
7-k1=keep alive, 0=reconnect1
8-rUse random keys for SET/GET/INCR, random values for SADD
9-pPipelinerequests1
10-hSpecifies server host name
11-qForces Quiet to Redis. Just shows query/sec values
12--csvOutput in CSV format
13-lGenerates loop, Run the tests forever
14-tOnly runs the comma-separated list of tests
15-IIdle mode. Just opens N idle connections and wait

Example

Let's take an example to show multiple usage options in Redis benchmark utility.

Redis Benchmarks 3




Latest Courses