Skip to content

Instantly share code, notes, and snippets.

@l1905
Created July 24, 2018 11:04
Show Gist options
  • Save l1905/e890c74b4de277cf3756bf31f080829c to your computer and use it in GitHub Desktop.
Save l1905/e890c74b4de277cf3756bf31f080829c to your computer and use it in GitHub Desktop.
redis压测相关
#/bin/bash
echo "开始压测codis\n"
# 清空redis
echo "开始清空redis\n"
redis-cli -h 10.9.131.169 -p 6380 flushall
redis-cli -h 10.9.116.212 -p 6380 flushall
redis-cli -h 10.9.116.241 -p 6380 flushall
sleep 3
echo "完成清空redis\n"
echo "开始redis-benchmark 压测\n"
echo "短连接---单KEY大小200字节---并发:600-----"
redis-benchmark -t set -d 200 -n 100000 -r 100000 -c 1000 -h 10.9.145.71 -p 6379
<<COMMENT
并发200: 5.9
并发300: 5.8
一直到并发600, QPS还是5.8
平均QPS:5.8万
总结:指定并发数不影响最终codis QPS, 并发超过800, QPS缓慢下降到5万,
理论上是代理机达到瓶颈, CPU打满 后续横向扩招代理机,应该是指数增长
COMMENT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment