【效能測試工具】- Http_Load

來源:互聯網
上載者:User

標籤:des   style   http   color   使用   os   io   strong   

優點:參數少;缺點:url.txt檔案要求較高,不如siege方便

http_load是ACME實驗室開發的,這個工具以並發方式運行,用以測試web伺服器的輸送量與負載。它不同於其它壓力測試工具的是,它能以單一的進程運行,一般不會使客戶機down掉。同時在unix下,除了http它也可以用來測試https類型的請求。官方地址:http://www.acme.com/software/http_load/

 

安裝:
tar zxvf http_load-12mar2006.tar
cd http_load-12mar2006
make && make install                          /*makeinstall之間是有空格的,同時make install需要root許可權*/

 

參數說明:
XXXXXXXXXXXXX:~/http_load-12mar2006$http_load –help
usage:  http_load [-checksum] [-throttle][-proxy host:port] [-verbose] [-timeout secs] [-sip sip_file]
            -parallel N | -rate N[-jitter]                           

            -fetches N | -seconds N                                   

            url_file            /*需要訪問的URL文字檔,檔案格式是每行一個URL,URL最好超過50-100個測試效果比較好*/
One start specifier, either -parallel or -rate, is required.                              /*使用的時候 –parallel與-rate二選一*/
One end specifier, either -fetches or -seconds, is required.                         /*使用的時候 –feches與-second二選一*/

 

-parallel 簡寫-p :並發的使用者進程數      /*http_load –p500 –s 300 user.txt,並發500個進程,跑300秒*/

-rate 簡寫-r :每秒的訪問頻率                /*比如http_load –r 5 –s 10 url.txt,說的是每秒的訪問頻率是5次,共跑10秒*/

-fetches 簡寫-f :總計的訪問次數          /*使用fetches能讓用戶端保證確定請求數的全部處理,更容易讓被測伺服器受到壓力 */

-seconds簡寫-s :總計的訪問時間

 

基本使用:

XXXXXXXXXXXXX:~/http_load-12mar2006$ http_load -p 10 -s 5 urls.txt     /*並發10個進程,訪問5秒。Urls.txt內的檔案格式為每行1個url地址。*/

 

操作結果:(測試的url.txt內的網址均為:http://www.test.com/index.html)

13995 fetches, 10max parallel, 21948 bytes, in 5 seconds                          /*共運行了13995個請求,最大並發進程數是10,總傳輸資料是21948個位元組,已耗用時間5秒*/

1.56827 mean bytes/connection                    /*21948位元組/13995請求 = 每個串連平均傳輸的資料量是1.56827個位元組*/

2799 fetches/sec, 4389.6 bytes/sec             /*伺服器每秒能夠響應的查詢次數是2799個(13995/5),每秒傳遞的資料是4389.6 bytes*/

msecs/connect: 1.74836 mean, 3.757 max, 1.439 min                   /*每個串連的平均訪問時間是1.748毫秒*/

msecs/first-response:1.79729 mean, 5.463 max, 1.484 min      /**/

HTTP responsecodes:

  code 200 -- 236

 

討論/疑問:

 

  • 測試結果裡的msecs/connect與msecs/first-response的差別在於?

 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.