ab 安装部署
yum -y install httpd-tools
-c 用户数 -n 请求数
[root@localhost ~]# ab -c 10 -n 100 http://112.21.11.79/index.html This is ApacheBench, Version 2.3 <$Revision: 1430300 $> Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Licensed to The Apache Software Foundation, http://www.apache.org/ Benchmarking 112.21.11.79 (be patient).....done Server Software: openresty/1.21.4.1 Server Hostname: 112.21.11.79 Server Port: 80 Document Path: /index.html Document Length: 1097 bytes Concurrency Level: 10 Time taken for tests: 0.020 seconds Complete requests: 100 Failed requests: 0 Write errors: 0 Total transferred: 133700 bytes HTML transferred: 109700 bytes Requests per second: 4966.72 [#/sec] (mean) Time per request: 2.013 [ms] (mean) Time per request: 0.201 [ms] (mean, across all concurrent requests) Transfer rate: 6484.87 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 0 0 0.2 0 1 Processing: 1 1 0.2 1 2 Waiting: 0 1 0.1 1 1 Total: 1 2 0.2 2 2 Percentage of the requests served within a certain time (ms) 50% 2 66% 2 75% 2 80% 2 90% 2 95% 2 98% 2 99% 2 100% 2 (longest request)