Simple ab pressure measurement practice

ab pressure measurement

Installation Environment

  1. ab -v found I did not install
  2. yum -y install httpd-tools (yes -y operating parameters could be found after the installation package is omitted)
  3. Wait a minute installation was successful again ab -v successful installation good!

start testing

  1. Never failing to help ab -help
  2. We know by two common parameters help -n (total number of transmission request) -C (number of users, number of concurrent)
  3. Just find a word interface test ab -c 10 -n 100 https://v1.hitokoto.cn/?encode=json Enter car
  4. Result analysis
    1. Echo command as follows:
      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 v1.hitokoto.cn (be patient).....done
      
      
      Server Software:
      Server Hostname:        v1.hitokoto.cn       #被测主机名
      Server Port:            443                  #被测主机端口 ssl
      SSL/TLS Protocol:       TLSv1.2,ECDHE-RSA-AES128-GCM-SHA256,2048,128    #加密协议
      
      Document Path:          /?encode=json        #请求文件
      Document Length:        313 bytes            #请求文件大小
      
      Concurrency Level:      10                   #并发数
      Time taken for tests:   1.356 seconds        #本次测试花费时长
      Complete requests:      100                  #总请求次数
      Failed requests:        96                   #请求失败数
      (Connect: 0, Receive: 0, Length: 96, Exceptions: 0)
      Write errors:           0
      Total transferred:      86855 bytes          #总共传输的数据量,指的是ab从被测服务器接收到的总数据量,包括请求的文本内容和请求头信息。
      HTML transferred:       31469 bytes          #传输的数据量,指的是ab从被测服务器接收到的总数据量,不包括请求的文本内容和请求头信息。
      Requests per second:    73.74 [#/sec] (mean) #平均(mean)每秒完成的请求数:QPS,这是一个平均值,等于Complete requests/Time taken for tests=100/1.093=91.50
      Time per request:       135.611 [ms] (mean)  #从用户角度看,完成一个请求所需要的时间(因用户数量不止一个,服务器完成10个请求,平均每个用户才接收到一个完整的返回,所以该值是下一项数值的10倍。
      Time per request:       13.561 [ms] (mean, across all concurrent requests)  # 服务器(用户)完成一个请求的时间。 
      Transfer rate:          62.55 [Kbytes/sec] received                         #网络传输速度。对于大文件的请求测试,这个值很容易成为系统瓶颈所在。要确定该值是不是瓶颈,需要了解客户端和被测服务器之间的网络情况,包括网络带宽和网卡速度等信息
      
      Connection Times (ms)
                  min  mean[+/-sd] median   max     #最小值  #方差(越大越不稳定) #中位数 #最大值
      Connect:       46   53   3.9     52      65   #网络链接
      Processing:    52   64  14.0     61     120   #系统处理
      Waiting:       52   64  14.0     60     120   #用户等待
      Total:         99  117  15.8    113     178   #请求总时长
      
      Percentage of the requests served within a certain time (ms)
      50%    113                 #这个表第一行表示有50%的请求都是在113ms内完成的
      66%    117
      75%    120
      80%    122
      90%    125
      95%    158
      98%    174
      99%    178
      100%    178 (longest request)
      
Released four original articles · won praise 0 · Views 67

Guess you like

Origin blog.csdn.net/qq_32450143/article/details/105065016