zoukankan      html  css  js  c++  java
  • apache ab工具安装测试

    1.安装

     安装包下载地址:

    将 httpd-2.2.29.tar.gz 解压到目录 /apps/install/httpd-2.2.29 ,这是我放置的位置

    cd /apps/install/httpd-2.2.29

    ./configure

    make

    make install

    ok ,没有 error 就表示安装成功了,上面我并没有改变他的编译目录,默认的编译目录在

    /usr/local/apache2/bin

    如果找不到了,搜索呗

    find . -name httpd

    2.测试

     进入 /usr/local/apache2/bin

    cd /usr/local/apache2/bin

     ./ab -n 300 -c 300 http://www.baidu.com/

    执行 300次,每次并发 300个请求 www.baidu.com

    ./ab -n 3000 -c 3000 http://www.test.com/
    其中-n代表每次并发量,-c代表总共发送的数量
     

    3.测试结果说明

    [root@Svr107 bin]# ./ab -n 3000 -c 3000 http://www.test.com/  
    This is ApacheBench, Version 2.3 <$Revision: 655654 $>
    Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
    Licensed to The Apache Software Foundation, http://www.apache.org/
    
    Benchmarking www.twioo.com (be patient)
    Completed 300 requests
    Completed 600 requests
    Completed 900 requests
    Completed 1200 requests
    Completed 1500 requests
    Completed 1800 requests
    Completed 2100 requests
    Completed 2400 requests
    Completed 2700 requests
    Completed 3000 requests
    Finished 3000 requests
    
    
    Server Software:        nginx/0.7.65
    Server Hostname:        www.test.com
    Server Port:            80
    
    Document Path:          /  ###请求的资源
    Document Length:        50679 bytes  ###文档返回的长度,不包括相应头
    
    Concurrency Level:      3000   ###并发个数
    Time taken for tests:   30.449 seconds   ###总请求时间
    Complete requests:      3000     ###总请求数
    Failed requests:        0     ###失败的请求数
    Write errors:           0
    Total transferred:      152745000 bytes
    HTML transferred:       152037000 bytes
    Requests per second:    98.52 [#/sec] (mean)      ###平均每秒的请求数
    Time per request:       30449.217 [ms] (mean)     ###平均每个请求消耗的时间
    Time per request:       10.150 [ms] (mean, across all concurrent requests)  ###上面的请求除以并发数
    Transfer rate:          4898.81 [Kbytes/sec] received   ###传输速率
    
    Connection Times (ms)
                  min  mean[+/-sd] median   max
    Connect:        2   54  27.1     55      98
    Processing:    51 8452 5196.8   7748   30361
    Waiting:       50 6539 5432.8   6451   30064
    Total:         54 8506 5210.5   7778   30436
    
    Percentage of the requests served within a certain time (ms)
      50%   7778   ###50%的请求都在7778Ms内完成
      66%  11059
      75%  11888
      80%  12207
      90%  13806
      95%  18520
      98%  24232
      99%  24559
     100%  30436 (longest request)
  • 相关阅读:
    SpringBoot入门篇--整合mybatis+generator自动生成代码+druid连接池+PageHelper分页插件+SpringBoot整合Mybatis-plus
    认证 (authentication) 和授权 (authorization) 的区别
    新手redis集群搭建
    Nginx是什么?
    分布式和集群的区别
    springBoot 项目 jar/war打包 并运行
    pyV8不支持dom操作,关于PyV8的支持DOM的疑问
    Python爬虫:更加优雅的执行JavaScript(PyV8)
    python中正则表达式 re.findall 用法
    Python爬虫-破解JS加密的Cookie
  • 原文地址:https://www.cnblogs.com/yun965861480/p/6516095.html
Copyright © 2011-2022 走看看