// 默认模拟 10w 次请求,50个client并发,数据大小 3b. keep-alive 1 ~ redis-benchmark // Quiet. Just show query/sec values ~ redis-benchmark -q PING_INLINE: 80971.66 requests per second PING_BULK: 85106.38 requests per second SET: 93196.65 requests per second GET: 99403.58 requests per second INCR: 101729.40 requests per second LPUSH: 95693.78 requests per second RPUSH: 81234.77 requests per second LPOP: 87108.02 requests per second RPOP: 84033.61 requests per second SADD: 84889.65 requests per second HSET: 81300.81 requests per second SPOP: 84104.29 requests per second LPUSH (needed to benchmark LRANGE): 81037.28 requests per second LRANGE_100 (first 100 elements): 21920.21 requests per second LRANGE_300 (first 300 elements): 9130.75 requests per second LRANGE_500 (first 450 elements): 5879.93 requests per second LRANGE_600 (first 600 elements): 4888.30 requests per second MSET (10 keys): 64683.05 requests per second
监控
使用 redis-exporter 上报 prometheus,接入 grafana 显示。
下载 redis-exporter ,本地 build 并且启动。
1 2 3 4 5 6 7 8 9
git clone https://github.com/oliver006/redis_exporter.git cd redis_exporter go build . ./redis_exporter --version // 启动后,浏览器访问 http://localhost:9121/metrics ,有数据表示启动成功
Copyright Declaration: This station is mainly used to sort out incomprehensible knowledge. I have not fully mastered most of the content. Please refer carefully.