Redis的效能測試
Redis-benchmark是官方自帶的Redis效能測試工具,可以有效的測試Redis服務的效能
以下例項同時執行 10000 個請求來檢測效能:
[root@localhost src]# ./redis-benchmark -n100000
====== PING_INLINE ======
100000 requests completed in 1.00 seconds
50parallel clients
3bytes payload
keep alive: 1
99.72% <= 1 milliseconds
99.77% <= 2 milliseconds
99.86% <= 4 milliseconds
99.95% <= 5 milliseconds
99.97% <= 6 milliseconds
100.00% <= 6 milliseconds
100100.10 requests per second
====== PING_BULK ======
100000 requests completed in 1.04 seconds
50parallel clients
3bytes payload
keep alive: 1
99.70% <= 1 milliseconds
99.84% <= 2 milliseconds
99.92% <= 3 milliseconds
99.98% <= 5 milliseconds
99.98% <= 7 milliseconds
100.00% <= 7 milliseconds
96061.48 requests per second
====== SET ======
100000 requests completed in 1.00 seconds
50parallel clients
3bytes payload
keep alive: 1
99.71% <= 1 milliseconds
99.84% <= 2 milliseconds
99.90% <= 5 milliseconds
99.95% <= 6 milliseconds
100.00% <= 6 milliseconds
100000.00 requests per second
====== GET ======
100000 requests completed in 1.01 seconds
50parallel clients
3bytes payload
keep alive: 1
99.73% <= 1 milliseconds
99.90% <= 5 milliseconds
99.95% <= 10 milliseconds
100.00% <= 10 milliseconds
99009.90 requests per second
====== INCR ======
100000 requests completed in 1.09 seconds
50 parallelclients
3bytes payload
keep alive: 1
99.08% <= 1 milliseconds
99.68% <= 2 milliseconds
99.78% <= 6 milliseconds
99.86% <= 7 milliseconds
99.92% <= 8 milliseconds
100.00% <= 8 milliseconds
91575.09 requests per second
====== LPUSH ======
100000 requests completed in 0.94 seconds
50parallel clients
3bytes payload
keep alive: 1
99.42% <= 1 milliseconds
99.84% <= 2 milliseconds
99.89% <= 3 milliseconds
100.00% <= 6 milliseconds
100.00% <= 6 milliseconds
106837.61 requests per second
====== RPUSH ======
100000 requests completed in 1.20 seconds
50parallel clients
3bytes payload
keep alive: 1
98.77% <= 1 milliseconds
99.67% <= 2 milliseconds
99.86% <= 3 milliseconds
99.89% <= 4 milliseconds
99.92% <= 5 milliseconds
99.95% <= 6 milliseconds
100.00% <= 6 milliseconds
83472.46 requests per second
====== LPOP ======
100000 requests completed in 0.99 seconds
50parallel clients
3bytes payload
keep alive: 1
99.70% <= 1 milliseconds
99.82% <= 2 milliseconds
99.90% <= 5 milliseconds
99.90% <= 6 milliseconds
99.95% <= 8 milliseconds
99.97% <= 9 milliseconds
100.00% <= 9 milliseconds
101112.23 requests per second
====== RPOP ======
100000 requests completed in 0.98 seconds
50parallel clients
3bytes payload
keep alive: 1
99.82% <= 1 milliseconds
99.86% <= 2 milliseconds
99.91% <= 5 milliseconds
99.96% <= 10 milliseconds
100.00% <= 10 milliseconds
102145.05 requests per second
====== SADD ======
100000 requests completed in 0.96 seconds
50parallel clients
3bytes payload
keep alive: 1
99.96% <= 1 milliseconds
100.00% <= 8 milliseconds
100.00% <= 8 milliseconds
103734.44 requests per second
====== SPOP ======
100000 requests completed in 1.00 seconds
50parallel clients
3bytes payload
keep alive: 1
99.87% <= 1 milliseconds
99.91% <= 2 milliseconds
99.96% <= 5 milliseconds
99.97% <= 6 milliseconds
100.00% <= 6 milliseconds
99900.09 requests per second
====== LPUSH (needed to benchmark LRANGE)======
100000 requests completed in 0.94 seconds
50parallel clients
3bytes payload
keep alive: 1
99.76% <= 1 milliseconds
99.92% <= 2 milliseconds
99.95% <= 6 milliseconds
99.98% <= 7 milliseconds
100.00% <= 7 milliseconds
106951.88 requests per second
====== LRANGE_100 (first 100 elements)======
100000 requests completed in 2.73 seconds
50parallel clients
3bytes payload
keep alive: 1
72.96% <= 1 milliseconds
98.47% <= 2 milliseconds
99.64% <= 3 milliseconds
99.78% <= 4 milliseconds
99.91% <= 6 milliseconds
99.95% <= 7 milliseconds
99.95% <= 8 milliseconds
100.00% <= 8 milliseconds
36643.46 requests per second
====== LRANGE_300 (first 300 elements)======
100000 requests completed in 6.72 seconds
50parallel clients
3bytes payload
keep alive: 1
0.22% <= 1 milliseconds
75.92% <= 2 milliseconds
97.36% <= 3 milliseconds
98.66% <= 4 milliseconds
99.38% <= 5 milliseconds
99.74% <= 6 milliseconds
99.86% <= 7 milliseconds
99.89% <= 8 milliseconds
99.93% <= 9 milliseconds
99.97% <= 11 milliseconds
99.99% <= 12 milliseconds
100.00% <= 12 milliseconds
14883.17 requests per second
====== LRANGE_500 (first 450 elements)======
100000 requests completed in 9.47 seconds
50parallel clients
3bytes payload
keep alive: 1
0.16% <= 1 milliseconds
46.66% <= 2 milliseconds
79.67% <= 3 milliseconds
96.84% <= 4 milliseconds
98.39% <= 5 milliseconds
99.12% <= 6 milliseconds
99.46% <= 7 milliseconds
99.70% <= 8 milliseconds
99.79% <= 9 milliseconds
99.89% <= 10 milliseconds
99.91% <= 11 milliseconds
99.95% <= 12 milliseconds
99.99% <= 13 milliseconds
100.00% <= 13 milliseconds
10564.12 requests per second
====== LRANGE_600 (first 600 elements)======
100000 requests completed in 12.43 seconds
50parallel clients
3bytes payload
keep alive: 1
0.08% <= 1 milliseconds
2.21% <= 2 milliseconds
60.07% <= 3 milliseconds
80.96% <= 4 milliseconds
94.44% <= 5 milliseconds
96.63% <= 6 milliseconds
97.93% <= 7 milliseconds
98.61% <= 8 milliseconds
99.05% <= 9 milliseconds
99.32% <= 10 milliseconds
99.50% <= 11 milliseconds
99.63% <= 12 milliseconds
99.74% <= 13 milliseconds
99.79% <= 14 milliseconds
99.81% <= 15 milliseconds
99.85% <= 16 milliseconds
99.91% <= 17 milliseconds
99.92% <= 18 milliseconds
99.94% <= 19 milliseconds
99.96% <= 20 milliseconds
99.97% <= 21 milliseconds
99.97% <= 22 milliseconds
99.98% <= 23 milliseconds
99.98% <= 24 milliseconds
99.99% <= 27 milliseconds
100.00% <= 28 milliseconds
100.00% <= 33 milliseconds
8044.41 requests per second
====== MSET (10 keys) ======
100000 requests completed in 1.77 seconds
50parallel clients
3bytes payload
keep alive: 1
72.76% <= 1 milliseconds
99.48% <= 2 milliseconds
99.70% <= 3 milliseconds
99.80% <= 6 milliseconds
99.88% <= 7 milliseconds
99.95% <= 9 milliseconds
100.00% <= 9 milliseconds
56338.03 requests per second
redis效能測試工具可選引數如下所示:
選項 描述 預設值
-h 指定伺服器主機名 127.0.0.1
-p 指定伺服器埠 6379
-s 指定伺服器 socket
-c 指定併發連線數 50
-n 指定請求數 10000
-d 以位元組的形式指定SET/GET 值的資料大小 2
-k 1=keepalive 0=reconnect 1
-r SET/GET/INCR使用隨機 key, SADD 使用隨機值
-P 通過管道傳輸<numreq> 請求 1
-q 強制退出 redis。僅顯示query/sec 值
--csv 以 CSV 格式輸出
-l 生成迴圈,永久執行測試
-t 僅執行以逗號分隔的測試命令列表。
-I Idle模式。僅開啟 N 個 idle 連線並等待。
相關文章
- Redis 效能測試Redis
- Redis-benchmark測試Redis效能Redis
- redis效能測試報告Redis測試報告
- Redis Primer(1)基於JedisPool的Redis hset併發效能測試Redis
- CYQ.Data 操作 Redis 效能測試:對比 StackExchange.RedisRedis
- 【Azure Redis 快取 Azure Cache For Redis】使用Redis自帶redis-benchmark.exe命令測試Azure Redis的效能Redis快取
- 【效能測試】使用ab做Http效能測試HTTP
- 效能測試的流程
- 效能測試
- 效能測試:分散式測試分散式
- Jmeter介面測試+效能測試JMeter
- redis測試點Redis
- 介面測試和效能測試的區別
- 小白測試系列:介面測試與效能測試的區別
- 功能測試、自動化測試、效能測試的區別
- 實戰Redis序列化效能測試(Kryo和字串)Redis字串
- MySQL 加密的效能測試MySql加密
- 效能測試工具的原理
- 微服務測試之效能測試微服務
- 效能測試之測試指標指標
- 測試開發之效能篇-效能測試設計
- Jmeter效能測試:高併發分散式效能測試JMeter分散式
- 效能測試——效能測試-常見效能指標-總體概況指標
- 效能測試流程
- xhprofphp效能測試PHP
- 效能測試工具
- Kafka效能測試Kafka
- 【效能測試】效能測試各知識第1篇:效能測試大綱【附程式碼文件】
- (一)效能測試(壓力測試、負載測試)負載
- Redis測試報告Redis測試報告
- 【PG效能測試】pgbench效能測試工具簡單使用
- 面向開發的測試技術(二):效能測試
- 效能測試中唯一標識的 JMH 測試
- 新潮測試平臺之效能測試
- 軟體效能測試有哪些效能指標?可做效能測試的軟體檢測機構安利指標
- Python的SQL效能測試PythonSQL
- Python 的 SQL 效能測試PythonSQL
- 伺服器的效能測試伺服器