108
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
See the list of available options in Redis benchmark:
Index | Option | Description | Default Value |
1 | -h | Specifies server host name | 127.0.0.1 |
2 | -p | Specifies server port | 6379 |
3 | -s | Specifies server socket | |
4 | -c | Specifies the number of parallel connections | 50 |
5 | -n | Specifies the total number of requests | 10000 |
6 | -d | Specifies data size of SET/GET value in bytes | 2 |
7 | -k | 1=keep alive, 0=reconnect | 1 |
8 | -r | Use random keys for SET/GET/INCR, random values for SADD | |
9 | -p | Pipeline requests | 1 |
10 | -h | Specifies server host name | |
11 | -q | Forces Quiet to Redis. Just shows query/sec values | |
12 | –csv | Output in CSV format | |
13 | -l | Generates loop, Run the tests forever | |
14 | -t | Only runs the comma-separated list of tests | |
15 | -I | Idle mode. Just opens N idle connections and wait |
Example
Let’s take an example to show multiple usage options in Redis benchmark utility.
Next TopicRedis Client Connection