ngnix ab压强测试

设置当前的scoke 设置的大小

ulimit -n  20000     重启服务器后失效





1、abr软件安装步骤

        which  ab    : 查看是否安装了软件

       

      在任意目录下执行该命令:yum -y install httpd-tools

       测试一下ab是否安装成功:ab -V

         

1、abr软件安装步骤

        which  ab    : 查看是否安装了软件

       

      在任意目录下执行该命令:yum -y install httpd-tools

       测试一下ab是否安装成功:ab -V


      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/



2、 测压命令:ab    -n1000 -c10  http[s]://www.51fugui.net.a.html

                                          ab    -n1000[多少次]       -c10[多少线程,也就是多少个并发]


      2-1) : 测压的详细参数:


[xufugui@MiWiFi-R1CM-srv ~]$ ab -n1000 -c10 http://www.51fugui.net/a.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 www.51fugui.net (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests




Server Software:        nginx/1.8.0
Server Hostname:        www.51fugui.net
Server Port:            80


Document Path:          /a.html
Document Length:        16 bytes   #  请求http[s]的中文的长度


Concurrency Level:      10       # 当前的级别,与-c 的参数的一致
Time taken for tests:   0.156 seconds    #  表示这些请求处理完后的所消耗的时间
Complete requests:      1000      #   表示总请求数,与-n 的熟练一样
Failed requests:        0    #  表示失败的次数
Write errors:           0   #  表示错误的个数
Total transferred:      246000 bytes     #  表示请求的相应的总和
HTML transferred:       16000 bytes     # 表示请求相应正文的数据量的总和
Requests per second:    6398.94 [#/sec] (mean)   #  表示吐吞量  ( Complete requests/ Time taken for tests)
Time per request:       1.563 [ms] (mean)    # 用户平均等待请求时间,越小越好 (Complete requests  / Complete  Level)
Time per request:       0.156 [ms] (mean, across all concurrent requests)    #  服务器平均请求处理时间,越小越好   ( Time taken for tests / Complete requests
Transfer rate:          1537.24 [Kbytes/sec] received   # 表示这些请求在单位时间内从服务器获取的数据长度,(Total transferred / Time taken for tests  )这个统计项可以很好的说明服务器在处理能力达到限制时,其出口带宽的需求量


Connection Times (ms)
                       min    mean[+/-sd]    median      max
Connect:          0          1   0.5                  0              5
Processing:      0          1   0.6                 1              5
Waiting:           0          1   0.6                 1              5
Total:                1          2   0.8                 1             6
ERROR: The median and mean for the initial connection time are more than twice the standard
       deviation apart. These results are NOT reliable.
WARNING: The median and mean for the total time are not within a normal deviation
        These results are probably not that reliable.


Percentage of the requests served within a certain time (ms)
  50%      1
  66%      2
  75%      2
  80%      2
  90%      3
  95%      3
  98%      3
  99%      4
 100%      6 (longest request)



Percentage of the requests served within a certain time(ms)
这部分数据用于描述每个请求处理时间的分布情况,比如在以上测试结果中,80%请求的处理时间都不超过2ms,而99%的请求都不超过4ms。注意这里的处理时间,是指前面的Time per request,即对于单个用户而言,平均每个请求处理的时间。



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

盒马coding

你的支持是我最大的动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值