最新公告
  • 欢迎您光临牛品源码网,本站秉承服务宗旨 履行“站长”责任,销售只是起点 服务永无止境!立即加入我们
  • Centos服务器使用Apache测试压力工具

    Centos服务器测试压力我们可以使用Apache自带的压力测试的工具ab(ApacheBench),做一些简单的压力测试。

    centos服务器安装ab工具。

    yum install httpd-tools

    执行压力测试命令:

    ab -n 1000 -c 100 http://xx

    -n 后面的1000代表总共发出1000个请求;-c后面的100表示采用100个并发(模拟100个人同时访问),后面的网址表示测试的目标URL。

    [root@Tomcat ab]# ab -c 1000 -n 4000 http://192.168.0.222/docs/manager-howto.html
    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 192.168.0.222 (be patient)
    Completed 400 requests
    Completed 800 requests
    Completed 1200 requests
    Completed 1600 requests
    Completed 2000 requests
    Completed 2400 requests
    Completed 2800 requests
    Completed 3200 requests
    Completed 3600 requests
    Finished 4000 requests
    Server Software:        nginx/1.4.3
    Server Hostname:        192.168.0.222
    Server Port:            80
    Document Path:          /docs/manager-howto.html
    Document Length:        73924 bytes
    Concurrency Level:      1000
    Time taken for tests:   0.875928 seconds
    Complete requests:      4000
    Failed requests:        0
    Write errors:           0
    Total transferred:      296732000 bytes
    HTML transferred:       295696000 bytes
    Requests per second:    4566.59 [#/sec] (mean)
    #最重要的指标之一,相当于LR中的每秒事务数,后面括号中的mean表示这是一个平均值,越大抗压越强
    Time per request:       218.982 [ms] (mean)
    #最重要的指标之二,相当于LR中的平均事务响应时间,后面括号中的mean表示这是一个平均值
    Time per request:       0.219 [ms] (mean, across all concurrent requests)
    Transfer rate:          330822.86 [Kbytes/sec] received
    #平均每秒网络上的流量,吞吐量,越大抗压越强
    Connection Times (ms)
                  min  mean[+/-sd] median   max
    Connect:        0    0   4.5      0      29
    Processing:     1   17  14.5     17     653
    Waiting:        0   17  14.5     17     653
    Total:         15   18  15.2     17     674
    Percentage of the requests served within a certain time (ms)
      50%     17
      66%     18
      75%     18
      80%     18
      90%     20
      95%     22
      98%     37
      99%     40
    100%    674 (longest request)

     

    RIPRO主题是一个优秀的主题,极致后台体验,无插件,集成会员系统
    牛品源码 » Centos服务器使用Apache测试压力工具

    常见问题FAQ

    免费下载或者VIP会员专享资源能否直接商用?
    本站所有资源版权均属于原作者所有,这里所提供资源均只能用于参考学习用,请勿直接商用。若由于商用引起版权纠纷,一切责任均由使用者承担。更多说明请参考 VIP介绍。
    提示下载完但解压或打开不了?
    最常见的情况是下载不完整: 可对比下载完压缩包的与网盘上的容量,若小于网盘提示的容量则是这个原因。这是浏览器下载的bug,建议用百度网盘软件或迅雷下载。若排除这种情况,可在对应资源底部留言,或 联络我们.。
    找不到素材资源介绍文章里的示例图片?
    对于PPT,KEY,Mockups,APP,网页模版等类型的素材,文章内用于介绍的图片通常并不包含在对应可供下载素材包内。这些相关商业图片需另外购买,且本站不负责(也没有办法)找到出处。 同样地一些字体文件也是这种情况,但部分素材会在素材包内有一份字体下载链接清单。
    站壳网
    一个高级程序员模板开发平台

    发表评论

    • 264会员总数(位)
    • 66769资源总数(个)
    • 1本周发布(个)
    • 0 今日发布(个)
    • 1859稳定运行(天)

    提供最优质的资源集合

    立即查看 了解详情