用法:redis-benchmark [-h ] [-p ] [-c ] [-n [-k ]
-h <hostname> Server hostname (default 127.0.0.1)
-p <port> Server port (default 6379)
-s <socket> Server socket (overrides host and port)
-c <clients> Number of parallel connections (default 50) 并发客户端数
-n <requests> Total number of requests (default 10000) 请求数量
-d <size> Data size of SET/GET value in bytes (default 2) set 数据大小
-k <boolean> 1=keep alive 0=reconnect (default 1) 是否采用keep alive模式
-r <keyspacelen> Use random keys for SET/GET/INCR, random values for SADD
Using this option the benchmark will get/set keys
in the form mykey_rand:000000012456 instead of constant
keys, the <keyspacelen> argument determines the max
number of values for the random number. For instance
if set to 10 only rand:000000000000 - rand:000000000009
range will be allowed.
-P <numreq> Pipeline <numreq> requests. Default 1 (no pipeline). 是否采用Pipeline模式请求,默认不采用
-q Quiet. Just show query/sec values 仅仅显示查询时间
--csv Output in CSV format 导出为CSV格式
-l Loop. Run the tests forever 循环测试
-t <tests> Only run the comma separated list of tests. The test
names are the same as the ones produced as output.
-I Idle mode. Just open N idle connections and wait.
http://redis.io/topics/benchmarks