redis做压测可以用自带的redis-benchmark工具,使用简单
压力测试的命令是
redis-benchmark -q -n 100000
我来解释一下啊:
用cmd进行测试
双击也行
我的是本机测试的啊,故而相对的效率较低。如果要是服务器的话效果会很好的。
就几个英文单词,也好理解,我就不挨个翻译了哦。
====== PING_INLINE ======
100000 requests completed in 3.22 seconds
50 parallel clients
3 bytes payload
keep alive: 1
57.26% <= 1 milliseconds
93.61% <= 2 milliseconds
98.25% <= 3 milliseconds
99.65% <= 4 milliseconds
99.97% <= 5 milliseconds
100.00% <= 6 milliseconds
100.00% <= 6 milliseconds
31094.53 requests per second
====== PING_BULK ======
100000 requests completed in 3.15 seconds
50 parallel clients
3 bytes payload
keep alive: 1
66.06% <= 1 milliseconds
95.09% <= 2 milliseconds
98.64% <= 3 milliseconds
99.68% <= 4 milliseconds
99.95% <= 5 milliseconds
99.98% <= 6 milliseconds
100.00% <= 7 milliseconds
100.00% <= 7 milliseconds
31735.96 requests per second
====== SET ======
100000 requests completed in 3.65 seconds
50 parallel clients
3 bytes payload
keep alive: 1
46.53% <= 1 milliseconds
92.18% <= 2 milliseconds
97.45% <= 3 milliseconds
99.14% <= 4 milliseconds
99.77% <= 5 milliseconds
99.93% <= 6 milliseconds
99.96% <= 7 milliseconds
99.98% <= 8 milliseconds
99.99% <= 9 milliseconds
100.00% <= 10 milliseconds
27404.77 requests per second
====== GET ======
100000 requests completed in 3.21 seconds
50 parallel clients
3 bytes payload
keep alive: 1
61.87% <= 1 milliseconds
96.40% <= 2 milliseconds
99.38% <= 3 milliseconds
99.93% <= 4 milliseconds
99.99% <= 5 milliseconds
100.00% <= 5 milliseconds
31113.88 requests per second
====== INCR ======
100000 requests completed in 3.14 seconds
50 parallel clients
3 bytes payload
keep alive: 1
65.59% <= 1 milliseconds
96.33% <= 2 milliseconds
99.18% <= 3 milliseconds
99.78% <= 4 milliseconds
99.97% <= 5 milliseconds
100.00% <= 6 milliseconds
100.00% <= 6 milliseconds
31887.76 requests per second
====== LPUSH ======
100000 requests completed in 3.59 seconds
50 parallel clients
3 bytes payload
keep alive: 1
56.61% <= 1 milliseconds
95.05% <= 2 milliseconds
99.04% <= 3 milliseconds
99.84% <= 4 milliseconds
99.95% <= 5 milliseconds
99.95% <= 466 milliseconds
99.96% <= 467 milliseconds
99.99% <= 468 milliseconds
100.00% <= 468 milliseconds
27839.64 requests per second
====== RPUSH ======
100000 requests completed in 3.62 seconds
50 parallel clients
3 bytes payload
keep alive: 1
45.71% <= 1 milliseconds
90.87% <= 2 milliseconds
97.21% <= 3 milliseconds
99.14% <= 4 milliseconds
99.77% <= 5 milliseconds
99.96% <= 6 milliseconds
100.00% <= 7 milliseconds
100.00% <= 7 milliseconds
27662.52 requests per second
====== LPOP ======
100000 requests completed in 3.23 seconds
50 parallel clients
3 bytes payload
keep alive: 1
57.65% <= 1 milliseconds
93.31% <= 2 milliseconds
98.00% <= 3 milliseconds
99.46% <= 4 milliseconds
99.89% <= 5 milliseconds
99.99% <= 6 milliseconds
100.00% <= 6 milliseconds
30931.02 requests per second
====== RPOP ======
100000 requests completed in 3.71 seconds
50 parallel clients
3 bytes payload
keep alive: 1
47.74% <= 1 milliseconds
90.44% <= 2 milliseconds
97.06% <= 3 milliseconds
99.16% <= 4 milliseconds
99.82% <= 5 milliseconds
99.95% <= 6 milliseconds
99.96% <= 7 milliseconds
99.97% <= 8 milliseconds
99.98% <= 9 milliseconds
99.99% <= 10 milliseconds
100.00% <= 10 milliseconds
26968.72 requests per second
====== SADD ======
100000 requests completed in 3.93 seconds
50 parallel clients
3 bytes payload
keep alive: 1
47.42% <= 1 milliseconds
87.05% <= 2 milliseconds
95.08% <= 3 milliseconds
98.25% <= 4 milliseconds
99.51% <= 5 milliseconds
99.89% <= 6 milliseconds
99.98% <= 7 milliseconds
100.00% <= 7 milliseconds
25445.29 requests per second
====== SPOP ======
100000 requests completed in 5.55 seconds
50 parallel clients
3 bytes payload
keep alive: 1
26.23% <= 1 milliseconds
77.24% <= 2 milliseconds
90.15% <= 3 milliseconds
95.08% <= 4 milliseconds
97.47% <= 5 milliseconds
98.78% <= 6 milliseconds
99.40% <= 7 milliseconds
99.67% <= 8 milliseconds
99.76% <= 9 milliseconds
99.85% <= 10 milliseconds
99.90% <= 11 milliseconds
99.94% <= 12 milliseconds
99.96% <= 13 milliseconds
99.98% <= 14 milliseconds
100.00% <= 15 milliseconds
100.00% <= 15 milliseconds
18018.02 requests per second
====== LPUSH (needed to benchmark LRANGE) ======
100000 requests completed in 4.34 seconds
50 parallel clients
3 bytes payload
keep alive: 1
35.82% <= 1 milliseconds
83.53% <= 2 milliseconds
93.32% <= 3 milliseconds
96.91% <= 4 milliseconds
98.55% <= 5 milliseconds
99.31% <= 6 milliseconds
99.68% <= 7 milliseconds
99.84% <= 8 milliseconds
99.91% <= 9 milliseconds
99.93% <= 10 milliseconds
99.94% <= 11 milliseconds
99.96% <= 12 milliseconds
99.96% <= 15 milliseconds
99.97% <= 21 milliseconds
99.99% <= 22 milliseconds
100.00% <= 22 milliseconds
23068.05 requests per second
====== LRANGE_100 (first 100 elements) ======
100000 requests completed in 6.55 seconds
50 parallel clients
3 bytes payload
keep alive: 1
0.08% <= 1 milliseconds
78.87% <= 2 milliseconds
95.11% <= 3 milliseconds
98.47% <= 4 milliseconds
99.49% <= 5 milliseconds
99.76% <= 6 milliseconds
99.86% <= 7 milliseconds
99.92% <= 8 milliseconds
99.94% <= 9 milliseconds
99.96% <= 10 milliseconds
99.97% <= 11 milliseconds
99.98% <= 12 milliseconds
99.98% <= 13 milliseconds
99.99% <= 14 milliseconds
100.00% <= 15 milliseconds
100.00% <= 16 milliseconds
100.00% <= 16 milliseconds
15269.51 requests per second
====== LRANGE_300 (first 300 elements) ======
100000 requests completed in 10.54 seconds
50 parallel clients
3 bytes payload
keep alive: 1
0.00% <= 1 milliseconds
0.47% <= 2 milliseconds
84.35% <= 3 milliseconds
94.11% <= 4 milliseconds
98.99% <= 5 milliseconds
99.81% <= 6 milliseconds
99.96% <= 7 milliseconds
99.99% <= 8 milliseconds
100.00% <= 9 milliseconds
100.00% <= 9 milliseconds
9486.77 requests per second
====== LRANGE_500 (first 450 elements) ======
100000 requests completed in 16.00 seconds
50 parallel clients
3 bytes payload
keep alive: 1
0.00% <= 1 milliseconds
0.00% <= 2 milliseconds
14.69% <= 3 milliseconds
70.99% <= 4 milliseconds
83.02% <= 5 milliseconds
89.66% <= 6 milliseconds
93.87% <= 7 milliseconds
96.22% <= 8 milliseconds
97.91% <= 9 milliseconds
99.07% <= 10 milliseconds
99.52% <= 11 milliseconds
99.73% <= 12 milliseconds
99.81% <= 13 milliseconds
99.84% <= 14 milliseconds
99.87% <= 15 milliseconds
99.90% <= 16 milliseconds
99.93% <= 17 milliseconds
99.94% <= 18 milliseconds
99.95% <= 19 milliseconds
99.95% <= 20 milliseconds
99.96% <= 21 milliseconds
99.96% <= 22 milliseconds
99.96% <= 23 milliseconds
99.97% <= 24 milliseconds
99.98% <= 25 milliseconds
99.99% <= 26 milliseconds
99.99% <= 28 milliseconds
99.99% <= 29 milliseconds
100.00% <= 31 milliseconds
100.00% <= 32 milliseconds
6249.61 requests per second
====== LRANGE_600 (first 600 elements) ======
100000 requests completed in 22.63 seconds
50 parallel clients
3 bytes payload
keep alive: 1
0.00% <= 1 milliseconds
0.00% <= 2 milliseconds
0.05% <= 3 milliseconds
34.53% <= 4 milliseconds
59.43% <= 5 milliseconds
71.90% <= 6 milliseconds
81.29% <= 7 milliseconds
88.06% <= 8 milliseconds
92.17% <= 9 milliseconds
94.54% <= 10 milliseconds
96.13% <= 11 milliseconds
97.20% <= 12 milliseconds
97.99% <= 13 milliseconds
98.43% <= 14 milliseconds
98.69% <= 15 milliseconds
98.96% <= 16 milliseconds
99.19% <= 17 milliseconds
99.35% <= 18 milliseconds
99.47% <= 19 milliseconds
99.56% <= 20 milliseconds
99.63% <= 21 milliseconds
99.69% <= 22 milliseconds
99.73% <= 23 milliseconds
99.78% <= 24 milliseconds
99.82% <= 25 milliseconds
99.85% <= 26 milliseconds
99.87% <= 27 milliseconds
99.88% <= 28 milliseconds
99.89% <= 29 milliseconds
99.89% <= 30 milliseconds
99.89% <= 31 milliseconds
99.90% <= 33 milliseconds
99.90% <= 34 milliseconds
99.90% <= 35 milliseconds
99.91% <= 36 milliseconds
99.91% <= 38 milliseconds
99.91% <= 45 milliseconds
99.91% <= 46 milliseconds
99.91% <= 48 milliseconds
99.91% <= 49 milliseconds
99.92% <= 50 milliseconds
99.93% <= 59 milliseconds
99.93% <= 60 milliseconds
99.93% <= 61 milliseconds
99.94% <= 62 milliseconds
99.95% <= 63 milliseconds
99.95% <= 590 milliseconds
99.95% <= 591 milliseconds
99.96% <= 592 milliseconds
99.96% <= 593 milliseconds
99.96% <= 594 milliseconds
99.96% <= 596 milliseconds
99.97% <= 597 milliseconds
99.97% <= 598 milliseconds
99.98% <= 599 milliseconds
99.98% <= 600 milliseconds
99.99% <= 601 milliseconds
99.99% <= 602 milliseconds
99.99% <= 603 milliseconds
99.99% <= 604 milliseconds
99.99% <= 605 milliseconds
99.99% <= 606 milliseconds
99.99% <= 607 milliseconds
99.99% <= 608 milliseconds
100.00% <= 609 milliseconds
100.00% <= 610 milliseconds
100.00% <= 610 milliseconds
4419.30 requests per second
====== MSET (10 keys) ======
100000 requests completed in 5.19 seconds
50 parallel clients
3 bytes payload
keep alive: 1
15.15% <= 1 milliseconds
59.82% <= 2 milliseconds
80.40% <= 3 milliseconds
90.10% <= 4 milliseconds
95.25% <= 5 milliseconds
97.59% <= 6 milliseconds
98.73% <= 7 milliseconds
99.34% <= 8 milliseconds
99.61% <= 9 milliseconds
99.76% <= 10 milliseconds
99.87% <= 11 milliseconds
99.93% <= 12 milliseconds
99.96% <= 13 milliseconds
99.99% <= 14 milliseconds
100.00% <= 15 milliseconds
100.00% <= 15 milliseconds
19282.69 requests per second