HTTP性能測試(apache ab)

使用Apache ab 做網站的性能測試,下邊是測試結果分析:
安裝Apache ab 後,可以在CMD輸入ab -n1000 -c10 http://101.200../來測試想要測試的站點。

D:\Program Files (x86)\apache ab>ab -n1000 -c10 http://101.200.*.*/
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 101.200.*.* (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:        Apache-Coyote/1.1
Server Hostname:        101.200.*.*  ##請求主機
Server Port:            80          ##請求端口

Document Path:          /       ##請求URL地址
Document Length:        714 bytes ##http響應正文的長度

Concurrency Level:      10       ##併發數
Time taken for tests:   36.495 seconds   ##所有請求完成時間
Complete requests:      1000         ##完成請求數量
Failed requests:        1            ##失敗的請求數量
   (Connect: 1, Receive: 0, Length: 0, Exceptions: 0)
Write errors:           0
Total transferred:      1024070 bytes      ##整個過程中網絡傳輸量
HTML transferred:       714000 bytes       ##整個過程HTML傳輸量
Requests per second:    27.40 [#/sec] (mean)  ##重要指標,服務器吞吐率
Time per request:       364.949 [ms] (mean)   ##用戶平均請求等待時間
Time per request:       36.495 [ms] (mean, across all concurrent requests)   ##每個平均請求實際運行平均值
Transfer rate:          27.40 [Kbytes/sec] received  ##表示請求單位時間內流量

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        3   14 164.1      6    3009
Processing:     7  327 2036.4     56   21064
Waiting:        5  223 1784.8     33   21057
Total:         14  341 2041.8     62   21070

##統計用戶等待時間
Percentage of the requests served within a certain time (ms)
  50%     62
  66%     64
  75%     66
  80%     66
  90%     71
  95%     75
  98%   3064
  99%   3350
 100%  21070 (longest request)

此爲學習筆記

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章