【redis】使用redis benchmark评估哨兵模式主节点性能
一、场景
验证redis哨兵模式主节点性能
二、工具
Redis benchmark
官网
三、命令介绍
四、使用
redis-benchmark -h 192.168.3.190 -p 26380 -a 123456 -n 100000 -c 20
====== PING_INLINE ====== 100000 requests completed in 1.45 seconds 20 parallel clients 3 bytes payload keep alive: 1 multi-thread: no 0.00% <= 0.1 milliseconds 26.19% <= 0.2 milliseconds 74.33% <= 0.3 milliseconds 87.18% <= 0.4 milliseconds 93.40% <= 0.5 milliseconds 95.80% <= 0.6 milliseconds 97.10% <= 0.7 milliseconds 97.93% <= 0.8 milliseconds 98.45% <= 0.9 milliseconds 98.84% <= 1.0 milliseconds 99.18% <= 1.1 milliseconds 99.39% <= 1.2 milliseconds 99.61% <= 1.3 milliseconds 99.78% <= 1.4 milliseconds 99.85% <= 1.5 milliseconds 99.88% <= 1.6 milliseconds 99.90% <= 1.7 milliseconds 99.93% <= 1.8 milliseconds 99.93% <= 1.9 milliseconds 99.94% <= 2 milliseconds 100.00% <= 3 milliseconds 100.00% <= 3 milliseconds 69013.11 requests per second ====== PING_BULK ====== 100000 requests completed in 1.57 seconds 20 parallel clients 3 bytes payload keep alive: 1 multi-thread: no 98.70% <= 1 milliseconds 99.92% <= 2 milliseconds 99.94% <= 3 milliseconds 99.95% <= 4 milliseconds 99.96% <= 5 milliseconds 99.98% <= 206 milliseconds 99.99% <= 207 milliseconds 100.00% <= 207 milliseconds 63897.76 requests per second ......
redis-benchmark -h 192.168.3.110 -p 26380 -a 123456 -n 100000 -c 20 --csv
"PING_INLINE","65146.58" "PING_BULK","69881.20" "SET","60938.45" "GET","63091.48" "INCR","62344.14" "LPUSH","63211.12" "RPUSH","62421.97" "LPOP","65146.58" "RPOP","62034.74" "SADD","58377.11" "HSET","55648.30" "SPOP","64308.68" "ZADD","46663.56" "ZPOPMIN","63816.21" "LPUSH (needed to benchmark LRANGE)","63451.78" "LRANGE_100 (first 100 elements)","62344.14" "LRANGE_300 (first 300 elements)","61462.82" "LRANGE_500 (first 450 elements)","60132.29" "LRANGE_600 (first 600 elements)","60422.96" "MSET (10 keys)","48732.94"
redis-benchmark -h 192.168.3.110 -p 26380 -a 123456 -n 100000 -c 20 -q
PING_INLINE: 73421.44 requests per second PING_BULK: 85251.49 requests per second SET: 64184.86 requests per second GET: 76335.88 requests per second INCR: 79872.20 requests per second LPUSH: 76161.46 requests per second RPUSH: 76745.97 requests per second LPOP: 76923.08 requests per second RPOP: 81566.07 requests per second SADD: 74183.98 requests per second HSET: 74183.98 requests per second SPOP: 77459.34 requests per second ZADD: 72202.16 requests per second ZPOPMIN: 73964.50 requests per second LPUSH (needed to benchmark LRANGE): 73313.78 requests per second LRANGE_100 (first 100 elements): 73746.31 requests per second LRANGE_300 (first 300 elements): 76452.60 requests per second LRANGE_500 (first 450 elements): 77459.34 requests per second LRANGE_600 (first 600 elements): 76863.95 requests per second MSET (10 keys): 67069.08 requests per second
还有其他用法,自行探究
参考链接: