Install AB
Yum-y Install Httpd-tools
-C 100 indicates the number of concurrent users is 100
-N 100 indicates total number of requests is 100
ab-c 100-n http://127.0.0.1/index.php
Server software: nginx/1.10.2 #平台nginx version 1.10.2
Server hostname: 127.0.0.1 #服务器主机名
Server port: 80 #服务器端口
Document path: /index.php #测试的页面文档
Document length: 307 bytes #文档大小
Concurrency level: 100 #并发数
Time taken for tests: 9.764 seconds #整个测试持续的时间
Complete requests:& nbsp; 100 #完成的请求数量
Failed requests: 0 #失败的请求数量
Write errors: 0
non-2xx responses: 100
Total transferred:51300 bytes #整个场景中的网络传输量
HTML transferred: 30700 bytes #整个场景中的HTML内容传输量
Requests per second: 10.24 [#/sec] (mean) # throughput, number of requests processed per unit of time in 100 concurrent users. 10.24 times per second meanrepresents an average. the larger the value, the better.
Time per request: 9764.459 [MS] (mean) # user average request wait time , mean mean
Time per request:90.303 [MS] (mean, across all concurrent requests) #Average of actual run time per request
Transfer Rate: 5.55 [Kbytes/sec] received #平均每秒网络上的流量 to eliminate the problem of prolonged response time due to excessive network traffic
Connection Times (MS)
Min MEAN[+/-SD] Median max
Connect:0 4 1.3 4 6
Processing:11 1784 2708.6 95 9018
Waiting:5 1784 2708.7 95 9018
Total:11 1788 2709.3 99 9022
Percentage of the requests served within a certain time (MS)
50%User response time is less than Ms
66 % user response time is less than 1269 milliseconds
75% 3275 #75% User response time is less than 3275 milliseconds
80% 4275
90% 6762
95% 8012
98% 8763
99% 9022
100% 9022 (Longest request) # Maximum response time is less than 7785 milliseconds
#并发请求CPUs are not processed at the same time, but are rotated on a per-request basis, so basically the first time per Requests is approximately equal to the second Time multiplied by the number of concurrent requests.
This article is from the "Shell" blog, be sure to keep this source http://zhizhimao.blog.51cto.com/3379994/1940080
CENTOS6 AB performance Test Web server