http_load測試Web引擎效能

來源:互聯網
上載者:User

標籤:des   blog   http   io   使用   ar   strong   檔案   資料   

1:下載http_load

#wget -c http://soft.kwx.gd/tools/http_load-12mar2006.tar.gz

  

2:解壓並編譯http_load

tar xzvf http_load-12mar2006.tar.gz   #解壓http_load壓縮包cd http_load-12mar2006                #進入http_load目錄mkdir /usr/local/man                  #建立目錄make && make install                  #編譯並安裝

  

3:進入到http_load目錄

cd http_load-12mar2006

  

-p-parallel並發的使用者進程數。-f-fetches總計的訪問次數-r-rate           含義是每秒的訪問頻率-s-seconds連續的訪問時間url         網站串連地址或url檔案

  

其中,“url”是http_load-12mar2006目錄下其中一個檔案,在使用前,先在http_load-12mar2006建立一個空白的名為url的檔案,vi命令建立一個連結。

  

4:開始測試

./http_load -p 1021 -s 10 url 
41 fetches, 1020 max parallel, 851898 bytes, in 10.0008 seconds# 一共請求串連41次,最大並發線程1020個,持續10.0008秒內,總傳輸速率為 851898bytes 
20778 mean bytes/connection#每次請求串連平均資料量(851898÷41)
4.09969 fetches/sec, 85183.3 bytes/sec#每秒的響應請求串連數為4.09969個,每秒傳輸的資料為85183.3btyes/毫秒
msecs/connect: 264.607 mean, 269.482 max, 262.187 min#每次串連平均回應時間:264.607毫秒,最大時間:269.482毫秒,最小時間:262.187毫秒
msecs/first-response: 1949.27 mean, 5394.21 max, 380.501 min#每次串連平均返回時間:1949.27毫秒,最大時間:5394.21毫秒,最小時間:380.501毫秒
HTTP response codes:code 200 -- 41#HTTP返回碼:200 ,一共41次。


測試結果中,主要參考fetches/sec、msecs/connect數值,即伺服器每秒能夠響應的查詢次數的數值來衡量效能,當然,單純數值判斷並不準確,還要參考CPU、記憶體的等消耗綜合考慮。

 

http_load測試Web引擎效能

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.