分布式缓存服务 DCS-使用redis-benchmark测试Redis性能:redis-benchmark常用命令举例

时间:2024-07-31 17:14:13

redis-benchmark常用命令举例

  • 单机、主备、读写分离和proxy集群的测试命令:

    ./redis-benchmark -h {IP或 域名 } -p 6379 -a {password} --threads {num} -n { nreqs } -r { randomkeys } -c {clients} -d {datasize} -t {command}

  • cluster集群测试命令:

    ./redis-benchmark -h {IP或域名} -p 6379 -a {password} --threads {num} -n { nreqs } -r { randomkeys } -c {clients} -d {datasize} --cluster -t {command}

  • 测试短连接:

    ./redis-benchmark -h {IP或域名} -p 6379 -a {password} --threads {num} -n { nreqs } -r { randomkeys } -c {clients} -d {datasize} -k 0 -t {command}

  • 测试空闲连接:

    ./redis-benchmark -h {IP或域名} -p 6379 -a {pwd} -c {clients} -I

support.huaweicloud.com/usermanual-dcs/dcs-pwp-0423002.html