redis 性能测试

Redis 性能测试

指定 10000 个请求:

> redis-benchmark -n 10000  -q
====== PING_INLINE ======
  10000 requests completed in 0.14 seconds
  50 parallel clients
  3 bytes payload
  keep alive: 1

98.91% <= 1 milliseconds
99.98% <= 2 milliseconds
100.00% <= 2 milliseconds
70921.98 requests per second

====== PING_BULK ======
  10000 requests completed in 0.14 seconds
  50 parallel clients
  3 bytes payload
  keep alive: 1

99.28% <= 1 milliseconds
100.00% <= 1 milliseconds
68965.52 requests per second

====== SET ======
  10000 requests completed in 0.14 seconds
  50 parallel clients
  3 bytes payload
  keep alive: 1

99.54% <= 1 milliseconds
100.00% <= 1 milliseconds
70921.98 requests per second

====== GET ======
  10000 requests completed in 0.16 seconds
  50 parallel clients
  3 bytes payload
  keep alive: 1

97.85% <= 1 milliseconds
99.58% <= 2 milliseconds
99.93% <= 3 milliseconds
100.00% <= 3 milliseconds
64102.56 requests per second

====== INCR ======
  10000 requests completed in 0.14 seconds
  50 parallel clients
  3 bytes payload
  keep alive: 1

99.48% <= 1 milliseconds
100.00% <= 1 milliseconds
69444.45 requests per second

====== LPUSH ======
  10000 requests completed in 0.15 seconds
  50 parallel clients
  3 bytes payload
  keep alive: 1

99.74% <= 1 milliseconds
100.00% <= 1 milliseconds
68493.15 requests per second

====== RPUSH ======
  10000 requests completed in 0.15 seconds
  50 parallel clients
  3 bytes payload
  keep alive: 1

99.60% <= 1 milliseconds
100.00% <= 1 milliseconds
67567.57 requests per second

====== LPOP ======
  10000 requests completed in 0.14 seconds
  50 parallel clients
  3 bytes payload
  keep alive: 1

99.73% <= 1 milliseconds
100.00% <= 1 milliseconds
70921.98 requests per second

====== RPOP ======
  10000 requests completed in 0.15 seconds
  50 parallel clients
  3 bytes payload
  keep alive: 1

99.57% <= 1 milliseconds
100.00% <= 1 milliseconds
67114.09 requests per second

====== SADD ======
  10000 requests completed in 0.14 seconds
  50 parallel clients
  3 bytes payload
  keep alive: 1

99.72% <= 1 milliseconds
100.00% <= 1 milliseconds
69930.07 requests per second

====== HSET ======
  10000 requests completed in 0.14 seconds
  50 parallel clients
  3 bytes payload
  keep alive: 1

99.43% <= 1 milliseconds
100.00% <= 1 milliseconds
68965.52 requests per second

====== SPOP ======
  10000 requests completed in 0.14 seconds
  50 parallel clients
  3 bytes payload
  keep alive: 1

99.00% <= 1 milliseconds
100.00% <= 1 milliseconds
70422.53 requests per second

====== LPUSH (needed to benchmark LRANGE) ======
  10000 requests completed in 0.14 seconds
  50 parallel clients
  3 bytes payload
  keep alive: 1

99.30% <= 1 milliseconds
100.00% <= 1 milliseconds
69930.07 requests per second

====== LRANGE_100 (first 100 elements) ======
  10000 requests completed in 0.22 seconds
  50 parallel clients
  3 bytes payload
  keep alive: 1

96.42% <= 1 milliseconds
100.00% <= 1 milliseconds
46296.30 requests per second

====== LRANGE_300 (first 300 elements) ======
  10000 requests completed in 0.44 seconds
  50 parallel clients
  3 bytes payload
  keep alive: 1

15.69% <= 1 milliseconds
99.41% <= 2 milliseconds
99.96% <= 3 milliseconds
100.00% <= 3 milliseconds
22831.05 requests per second

====== LRANGE_500 (first 450 elements) ======
  10000 requests completed in 0.58 seconds
  50 parallel clients
  3 bytes payload
  keep alive: 1

0.12% <= 1 milliseconds
98.48% <= 2 milliseconds
99.66% <= 3 milliseconds
99.91% <= 4 milliseconds
100.00% <= 4 milliseconds
17301.04 requests per second

====== LRANGE_600 (first 600 elements) ======
  10000 requests completed in 0.73 seconds
  50 parallel clients
  3 bytes payload
  keep alive: 1

0.03% <= 1 milliseconds
85.95% <= 2 milliseconds
99.36% <= 3 milliseconds
99.89% <= 4 milliseconds
100.00% <= 4 milliseconds
13661.20 requests per second

====== MSET (10 keys) ======
  10000 requests completed in 0.14 seconds
  50 parallel clients
  3 bytes payload
  keep alive: 1

99.70% <= 1 milliseconds
100.00% <= 1 milliseconds
69930.07 requests per second

指令参数如下:

1-h指定服务器主机名127.0.0.1
2-p指定服务器端口6379
3-s指定服务器 socket
4-c指定并发连接数50
5-n指定请求数10000
6-d以字节的形式指定 SET/GET 值的数据大小2
7-k1=keep alive 0=reconnect1
8-rSET/GET/INCR 使用随机 key, SADD 使用随机值
9-P通过管道传输 请求1
10-q强制退出 redis。仅显示 query/sec 值
11–csv以 CSV 格式输出
12-l生成循环,永久执行测试
13-t仅运行以逗号分隔的测试命令列表。
14-IIdle 模式。仅打开 N 个 idle 连接并等待。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值