我在一台本地的虚机,用NAT网络方式进行的测试,结果如下:
这里只是学习ab的结果学习,不代表测试结果的准确性
[root@localhost opt]# ab -n 100 -c 10 http://www.baidu.com/ This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0 Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Copyright 2006 The Apache Software Foundation, http://www.apache.org/ Benchmarking www.baidu.com (be patient).....done /*服务器信息*/ Server Software: BWS/1.1 Server Hostname: www.baidu.com Server Port: 80 Document Path: / Document Length: 51642 bytes /*并发10*/ Concurrency Level: 10 /*测试花费时间*/ Time taken for tests: 22.76500 seconds /*完成请求*/ Complete requests: 100 /*失败请求*/ Failed requests: 96 (Connect: 0, Length: 96, Exceptions: 0) Write errors: 0 /*传输字节*/ Total transferred: 5329272 bytes HTML transferred: 5261101 bytes /*平均每秒请求 throughout*/ Requests per second: 4.53 [#/sec] (mean) Time per request: 2207.650 [ms] (mean) Time per request: 220.765 [ms] (mean, across all concurrent requests) Transfer rate: 235.73 [Kbytes/sec] received /*连接预测*/ Connection Times (ms) min mean[+/-sd] median max Connect: 8 130 63.1 141 306 Processing: 257 1704 1331.0 1275 7202 Waiting: 11 140 62.0 151 371 Total: 266 1834 1346.5 1386 7407 /*不同场景的预测*/ Percentage of the requests served within a certain time (ms) 50% 1386 66% 2066 75% 2380 80% 2720 90% 3839 95% 4836 98% 6193 99% 7407 100% 7407 (longest request)