網站壓力測試工具Webbench介紹

webbench簡單介紹: 

webbench是由 Lionbridge公司開發的出色的站點壓力測試工具。它能測試處在一樣硬件上,不一樣服務的性能以及不一樣硬件上同一個服務的執行情況。webbench不但能具備便準靜態頁面的測試能力,還能對動態頁面(ASP,PHP,JAVA,CGI)進 行測試的能力。

Webbench是一個很easy的壓力測試工具。Webbench最多可以模擬3萬個併發鏈接去測試站點的負載能力。php

(1)Webbench安裝
  
  
  
  
  1. wget http://www.phpddt.com/soft/linux/webbench-1.5.tar.gz
  2. tar zxvf webbench-1.5.tar.gz
  3. cd webbench-1.5
  4. make
  5. make install

(2)Webbench使用
   
   
   
   
  1. webbench -c 1000 -t 60 http://www.phpddt.com/
  2. webbench -c 併發數 -t 執行測試時間 URL

(3)測試結果 
  
  
  
  
  1. root@phpddt:~/webbench-1.5# webbench -c 1000 -t 60 http://www.phpddt.com/
  2. Webbench - Simple Web Benchmark 1.5
  3. Copyright (c) Radim Kolar 1997-2004, GPL Open Source Software.
  4.  
  5. Benchmarking: GET http://www.phpddt.com/
  6. 1000 clients, running 60 sec.
  7.  
  8. Speed=217591 pages/min, 5544152 bytes/sec.
  9. Requests: 217591 susceed, 0 failed.

注意:測試時併發數應該由小到大,並 使用TOP檢查站點負載,或自行打開頁面查看速度。



參考:
html

Webbench官網:http://home.tiscali.cz/~cz210552/webbench.html linux

測試注意事項: 

 1.壓力測試工做應該放到產品上線以前,而不是上線之後。 
 2.webbench 作壓力測試時,該軟件自身也會消耗CPU和內存資源,爲了測試準確。請將 webbench 安裝在別的server上。 
 3.測試時儘可能跨公網進行,而不是內網; 
 4.測試時併發應當由小逐漸加大,觀察一下站點負載及打開是否流程,直到站點打開緩慢甚至站點全然打不開。 
 5.應儘可能進行單元測試,如B2C站點可以着重測試購物車、推廣頁面等,因爲這些頁面佔整個站點訪問量比重較大。


Webbench安裝使用常見問題解決

問題1: cannot create regular file `/usr/local/man/man1′: No such file or directoryweb

解決方法: 建立/usr/local/man/man1文件來解決bash

[root@localhost local]# mkdir -m 644 -p /usr/local/man/man1併發

問題2: /bin/sh: ctags: command not found工具

解決方法:安裝ctags性能

apt-get install ctagsspa

問題3: cc: Command not foundserver

解決方法: 安裝gcc

apt-get install gcc

相關文章
相關標籤/搜索