ab命令を使ってウェブサイトの性能をテストします。


Ab圧力試験ツールの使用
[root@ju ~]# ab -n1000 -c10 http://192.168.116.193/index.html    #      10   ,    1000 
This is ApacheBench, Version 2.3<$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus TechnologyLtd, http://www.zeustech.net/
Licensed to The Apache Software Foundation,http://www.apache.org/
 
Benchmarking 192.168.116.193 (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.0.15               #  apache   
Server Hostname:        192.168.116.193            #      
Server Port:            80                         #     
 
Document Path:          /index.html                #     
Document Length:        3698 bytes                 #      
 
Concurrency Level:      10                         #   
Time taken for tests:   0.577 seconds              #      
Complete requests:      1000                       #         
Failed requests:        0                          #         ,              、    、           ,          
Write errors:           0                          #         
Total transferred:      3917820 bytes              #              
HTML transferred:       3705396 bytes              #        HTML   
Requests per second:    1733.55 [#/sec] (mean)     #        ,     ,     mean          
Time per request:       5.768 [ms] (mean)          #             ,      mean         
Time per request:       0.577 [ms] (mean, across all concurrentrequests)   #             ,           
Transfer rate:          6632.57 [Kbytes/sec] received      #                       ,                           
 
Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0   2   5.5      2     85
Processing:     1   3   6.3      2     84
Waiting:        0   2   5.1      2     82
Total:          2   5   8.8      4    100
#           ,                       
 
Percentage of the requests served within acertain time (ms)
 50%      4
 66%      5
 75%      5
 80%      5
 90%      6
 95%      9
 98%     19
 99%     80
 100%   100 (longest request)
#              。                ,  50%         4  ,60%         5  ,         100   
 
Abコマンドパラメータのコメント:
-n    #                。   ,       。
-c    #           。       。
-t    #          。       -n 50000。                        。   ,      。     
-p    #     POST      .  
-T    #POST      Content-type   。
-v    #            - 4          , 3            (404, 200 ), 2               。 -V         。     
-w    # HTML        。   ,               。     
-I    #  HEAD  ,   GET。