redis-benchmark 测试redis性能

本文详细介绍了Redis-Benchmark的使用方法,包括参数解释、命令执行方式及常见选项,帮助用户了解如何通过该工具评估Redis性能。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

用法: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

How fast is Redis?
How fast is Redis?
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值