[性能測試] 壓力測試工具彙總

壓力測試工具彙總php

1.autobench結合httperf能夠畫出很漂亮的分析圖
下載網址:
http://www.xenoclast.org/autobench/
autobench --single_host --host1
www.test.com --uri1 /10K --quiet     \
          --low_rate 20 --high_rate 200 --rate_step 20 --num_call 10 \
          --num_conn 5000 --timeout 5 --file results.tsv

2.Siege 功能強大的壓力測試軟件
http://www.joedog.org/JoeDog/Siege
操做手冊:
http://www.joedog.org/Siege/Manual

-c 500   併發500個用戶
-r 150      重複循環150次
-f sites.list     任務的URL列表

其它實用參數:

-i  隨機 URL ,默認是從列表的上面到下面來打壓力
-b 進行壓力測試,不進行延時
-t  持續時間,即測試持續時間,在NUM時間後結束,單位默認爲分


Siege 修正參數進行壓力測試
html

./siege -c 500 -r 150 -f sites.list -i -b

複製代碼


3.webbench web/proxy測試軟件,至關不錯!
http://home.tiscali.cz:8080/~cz210552/webbench.html
http://www.ibiblio.org/pub/Linux ... webbench-1.5.tar.gz

4.sysbench  數據庫壓力測試不錯的軟件,當你mysql調優之後不防有這個壓壓測試一下
http://sysbench.sourceforge.net/
sysbench是一個模塊化的、跨平臺、多線程基準測試工具,主要用於評估測試各類不一樣系統參數下的數據庫負載狀況。
       它主要包括如下幾種方式的測試:
       一、cpu性能
       二、磁盤io性能
       三、調度程序性能
       四、內存分配及傳輸速度
       五、POSIX線程性能
       六、數據庫性能(OLTP基準測試)
       目前sysbench主要支持 MySQL,pgsql, oracle 這3種數據庫。


----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
http://www.opensourcetesting.org/performance.php

1、webbench
Web-bench is a simple web server benchark.
Web Bench is very simple tool for benchmarking WWW or proxy servers. Uses fork() for simulating multiple clients and can use HTTP/0.9-HTTP/1.1 requests.
This benchmark is not very realistic, but it can test if your HTTPD can realy handle that many clients at once (try to run some CGIs) without taking your machine down.
Displays pages/min and bytes/sec. Can be used in more aggressive mode with -f switch.
What's New in This Release:

# tar zxvf webbench-1.5.tar.gz
# cd webbench-1.5
# make && make install

#webbench -c 500 -t 30
參數說明:-c表示併發數,-t表示時間(秒)

2、Siege:壓力模擬/測試工具

最先使用的壓力測試工具是apache的ab(apache benchmark),apache ab作重複壓力測試不錯,可是每次只能測試一個連接,如何測試一組連接(好比從日誌中導出的1個小時的日誌,作真實壓力測試),後來找到了這個:
Siege是一個壓力測試和評測工具,設計用於WEB開發這評估應用在壓力下的承受能力:能夠根據配置對一個WEB站點進行多用戶的併發訪問,記錄每一個用戶全部請求過程的相應時間,並在必定數量的併發訪問下重複進行。

SIEGE is an http regressive testing and benchmarking utility. It was designed to let web developers measure the performance of their code under duress, to see how it will stand up to load on the internet. It lets the user hit a webserver with a configurable number of concurrent simulated users. Those users place the webserver "under siege." The duration of the siege is measured in transactions, the sum of simulated users and the number of times each simulated user repeats the process of hitting the server. Thus 20 concurrent users 50 times is 1000 transactions, the length of the test.

下載/安裝
Siege時一個開放源代碼項目:
http://www.joedog.org

下載:
wget
ftp://sid.joedog.org/pub/siege/siege-latest.tar.gz

安裝:
# ./configure
#make && make install

siege包含了一組壓力測試工具:
SIEGE (1) Siege是一個HTTP壓力測試和評測工具.
使用樣例:
任務列表:
www.chedong.com.url文件
http://www.chedong.com/tech/
http://www.chedong.com/tech/acdsee.html
http://www.chedong.com/tech/ant.html
http://www.chedong.com/tech/apache_install.html
http://www.chedong.com/tech/awstats.html
http://www.chedong.com/tech/cache.html
http://www.chedong.com/tech/click.html
http://www.chedong.com/tech/cms.html
http://www.chedong.com/tech/compress.html
http://www.chedong.com/tech/cvs_card.html
http://www.chedong.com/tech/default.html
http://www.chedong.com/tech/dev.html
http://www.chedong.com/tech/gnu.html
....

# siege -c 20 -r 2 -f
www.sina.com.cn
參數說明:
-c 20 併發20個用戶
-r 2 重複循環2次
-f
www.chedong.com.url 任務列表:URL列表

輸出樣例:

** Siege 2.59
** Preparing 20 concurrent users for battle. 此次「戰鬥」準備了20個併發用戶
The server is now under siege.. done. 服務在「圍攻」測試中:
Transactions: 40 hits 完成40次處理
Availability: 100.00 % 成功率
Elapsed time: 7.67 secs 總共用時
Data transferred: 877340 bytes 共數據傳輸:877340字節
Response time: 1.65 secs 相應用時1.65秒:顯示網絡鏈接的速度
Transaction rate: 5.22 trans/sec 平均每秒完成5.22次處理:表示服務器後臺處理的速度
Throughput: 114385.92 bytes/sec 平均每秒傳送數據:114385.92字節
Concurrency: 8.59 最高併發數 8.59
Successful transactions: 40 成功處理次數
Failed transactions: 0 失敗處理次數

注意:因爲速度很快,可能會達不到併發速度很高就已經完成。Response time顯示的是測試機器和被測試服務器之間網絡連接情況。Transaction rate則表示服務器端任務處理的完成速度。

輔助工具:
增量壓力測試:

爲了方便增量壓力測試,siege還包含了一些輔助工具:
bombardment (1)
是一個輔助工具:用於按照增量用戶壓力測試:
使用樣例:
bombardment urlfile.txt 5 3 4 1
初始化URL列表:urlfile.txt
初始化爲:5個用戶
每次增長:3個用戶
運行:4次
每一個客戶端之間的延遲爲:1秒

輸出成CSV格式:
siege2csv.pl (1)
siege2csv.pl將bombardment的輸出變成CSV格式:
Time Data Transferred Response Time Transaction Rate Throughput Concurrency Code 200 (note that this is horribly broken.)
242 60.22 603064 0.02 4.02 10014.35 0.08
605 59.98 1507660 0.01 10.09 25136.05 0.12
938 59.98 2337496 0.02 15.64 38971.26 0.26
1157 60 2883244 0.04 19.28 48054.07 0.78


網絡IO性能測試:
http://bbs.linuxtone.org/thread-5437-1-1.html
httpload:
http://bbs.linuxtone.org/thread-2899-1-2.html
            
http://bbs.linuxtone.org/thread-1097-1-2.html
相關文章
相關標籤/搜索