Redis Benchmarks
# Redis Performance Testing
Redis performance testing is achieved by executing multiple commands simultaneously.
### Syntax
The basic command for Redis performance testing is as follows:
redis-benchmark
**Note**: This command should be executed in the Redis directory, not as an internal instruction within the Redis client.
### Example
The following example tests performance by executing 10,000 requests simultaneously:
$ redis-benchmark -n 10000 -q PING_INLINE: 141043.72 requests per second PING_BULK: 142857.14 requests per second SET: 141442.72 requests per second GET: 145348.83 requests per second INCR: 137362.64 requests per second LPUSH: 145348.83 requests per second LPOP: 146198.83 requests per second SADD: 146198.83 requests per second SPOP: 149253.73 requests per second LPUSH (needed to benchmark LRANGE): 148588.42 requests per second LRANGE_100 (first 100 elements): 58411.21 requests per second LRANGE_300 (first 300 elements): 21195.42 requests per second LRANGE_500 (first 450 elements): 14539.11 requests per second LRANGE_600 (first 600 elements): 10504.20 requests per second MSET (10 keys): 93283.58 requests per second
Optional parameters for the Redis performance testing tool are listed below:
| No. | Option | Description | Default Value |
| --- | --- | --- | --- |
| 1 | **-h** | Specifies the server hostname | 127.0.0.1 |
| 2 | **-p** | Specifies the server port | 6379 |
| 3 | **-s** | Specifies the server socket | |
| 4 | **-c** | Specifies the number of concurrent connections | 50 |
| 5 | **-n** | Specifies the number of requests | 10000 |
|
YouTip