您的位置:首页 > 运维架构 > Apache

Apache 网站压力测试工具 ab

2012-06-18 10:58 465 查看
http://httpd.apache.org/docs/2.0/programs/ab.html

常用参数

-n 测试的请求次数

-c 并发请求个数

-k keep alive,所有的请求保持在同一个会话里面

ab -n 100 -c 10 http://www.yahoo.com/[/code] 
Concurrency Level:      10
Time taken for tests:   1.889 seconds
Complete requests:      100
Failed requests:        0
Write errors:           0
Total transferred:      1003100 bytes
HTML transferred:       949000 bytes
Requests per second:    52.94 [#/sec] (mean)
Time per request:       188.883 [ms] (mean)
Time per request:       18.888 [ms] (mean, across all concurrent requests)
Transfer rate:          518.62 [Kbytes/sec] received

Connection Times (ms)
min  mean[+/-sd] median   max
Connect:       57   59   1.7     59      64
Processing:   117  126   7.5    124     162
Waiting:       57   62   7.0     60      98
Total:        175  186   8.0    184     224

Percentage of the requests served within a certain time (ms)
50%    184
66%    186
75%    187
80%    188
90%    192
95%    203
98%    216
99%    224
100%    224 (longest request)
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息