ab压力测试工具
发布日期:2021-05-08 03:57:38 浏览次数:21 分类:精选文章

本文共 1653 字,大约阅读时间需要 5 分钟。

  • 安装ab压力测试工具
yum install httpd-tools
  • ab命令使用格式及其常用的参数
ab -n 50 -c 20 http://192.168.15.7/download/-n : 总的请求数-c : 同时并发的请求数
  • 压力测试工具输出内容详解
[root@web02 ~]  ab -n 50 -c 20 http://192.168.15.7/download/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 192.168.15.7 (be patient).....doneServer Software:        nginx/1.20.0Server Hostname:        192.168.15.7Server Port:            80Document Path:          /download/Document Length:        453 bytesConcurrency Level:      20Time taken for tests:   0.006 seconds				发费的总时间Complete requests:      50							总共发起的请求个数Failed requests:        44							没有来得及处理的请求个数   (Connect: 0, Receive: 0, Length: 44, Exceptions: 0)Write errors:           0Non-2xx responses:      44Total transferred:      19052 bytesHTML transferred:       10330 bytesRequests per second:    8434.55 [#/sec] (mean)				每秒请求数(总请求数除总时间)Time per request:       2.371 [ms] (mean)					对于客户端而言,单个请求所用的时间Time per request:       0.119 [ms] (mean, across all concurrent requests)		服务端处理请求的时间,不包括网络传输时间等Transfer rate:          3138.57 [Kbytes/sec] received				网络速率,可以用来当作网络瓶颈参考值Connection Times (ms)              min  mean[+/-sd] median   maxConnect:        0    0   0.1      0       1Processing:     1    1   0.5      1       2Waiting:        0    1   0.3      1       2Total:          1    2   0.4      2       2Percentage 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)
上一篇:linux常用shell命令字典
下一篇:Nginx常用基础模块

发表评论

最新留言

不错!
[***.144.177.141]2025年03月22日 05时55分47秒

关于作者

    喝酒易醉,品茶养心,人生如梦,品茶悟道,何以解忧?唯有杜康!
-- 愿君每日到此一游!

推荐文章