Redis-benchmark performance test tutorial

  
 

1. Perform performance test on redis of 1.56, request 1000 times, each request has 200 concurrent clients, the data size of each request is 10k, only the query time is displayed

[sourcecode]< Br>

redis-benchmark -h 192.168.1.56 -p 6379 -c 200 -n 1000 -d 10240 -q

Results:

PING_INLINE: 1703.58 requests per secondPING_BULK: 1628.66 requests Per secondSET: 1631.32 requests per secondGET: 1594.90 requests per secondINCR: 1655.63 requests per secondLPUSH: 1494.77 requests per secondLPOP: 1584.79 requests per secondSADD: 1615.51 requests per secondSPOP: 1636.66 requests per secondLPUSH (needed to benchmark LRANGE): 1597.44 requests per secondLRANGE_100 (first 100 elements): 1633.99 requests per secondLRANGE_300 (first 300 elements): 175.90 requests per secondLRANGE_500 (first 450 elements): 93.62 requests per secondLRANGE_600 (first 600 elements): 72.69 requests per secondMSET (10 keys): 1652.89 requests per second

[/sourcecode]


The redis performance test tool optional parameters are as follows Show:

Serial
Options
Description
Default
1 -h
Specify server hostname 127.0.0.1 2 -p
Specify server port 6379 3 -s
Specify server socket 4 -c
Specify the number of concurrent connections 50 5 -n
Specify the number of requests 10000 6 -d
Specify the data size of the SET/GET value in bytes 2 7 -k
1=keep alive 0=reconnect 1 8 - r
SET/GET/INCR uses random keys, SADD uses random values 9 -P
Pipeline <numreq> Request 1 10 -q
Forces redis. Display only the query/sec value 11 –csv
Output 12 in CSV format -l
Generate loop, execute test 13 permanently -t
Run only comma-separated Test the list of commands. 14 -I
Idle mode. Only open N idle connections and wait.

Copyright © Windows knowledge All Rights Reserved