Apache ab性能测试连续两次得到的性能差很多?
发布于 1 天前 作者 lww555 737 次浏览 来自 问答

对一个项目进行进行ab 测试 执行eg: ab -n 800 -c 50 "http://example.cn/" 得到结果后再次执行发现性能差了很多。ab 两次测试需要间隔一段时间吗? 第一次执行结果

Concurrency Level:      50
Time taken for tests:   3.066 seconds
Complete requests:      800
Failed requests:        0
Total transferred:      31708000 bytes
HTML transferred:       31562400 bytes
Requests per second:    260.94 [#/sec] (mean)
Time per request:       191.618 [ms] (mean)
Time per request:       3.832 [ms] (mean, across all concurrent requests)
Transfer rate:          10099.79 [Kbytes/sec] received

Connection Times (ms)
min  mean[+/-sd] median   max
Connect:        3    8  41.0      7    1165
Processing:    32  178  44.8    168     333
Waiting:       21  170  44.7    160     322
Total:         37  186  60.4    175    1338

Percentage of the requests served within a certain time (ms)
50%    175
66%    191
75%    206
80%    217
90%    250
95%    281
98%    307
99%    322
100%   1338 (longest request)

第二次执行结果

Concurrency Level:      50
Time taken for tests:   12.140 seconds
Complete requests:      800
Failed requests:        0
Total transferred:      31708000 bytes
HTML transferred:       31562400 bytes
Requests per second:    65.90 [#/sec] (mean)
Time per request:       758.756 [ms] (mean)
Time per request:       15.175 [ms] (mean, across all concurrent requests)
Transfer rate:          2550.63 [Kbytes/sec] received

Connection Times (ms)
min  mean[+/-sd] median   max
Connect:        3  564 877.5      7    3434
Processing:    21   82  55.5     67     299
Waiting:       14   74  55.6     60     291
Total:         26  646 876.8    155    3491

Percentage of the requests served within a certain time (ms)
50%    155
66%   1069
75%   1160
80%   1218
90%   2151
95%   2425
98%   3147
99%   3446
100%   3491 (longest request)
回到顶部