併發壓力效能測試工具介紹

2022-07-16 15:24:11 字數 2283 閱讀 2476

1. 安裝

2. 使用

abs -c 200 -n 1000

ab -c 200 -n 1000

#### 3. 引數解釋

- 引數內容

#### 4. 報告內容解釋

- 結果內容

server software: nginx/1.10.2 (伺服器軟體名稱及版本資訊)

server hostname: 192.168.1.106 (伺服器主機名)

server port: 80 (伺服器端口)

document path: /index.html (供測試的url路徑)

document length: 3721 bytes (供測試的url返回的文件大小)

concurrency level: 1000 (併發數)

time taken for tests: 2.327 seconds (壓力測試消耗的總時間)

complete requests: 5000 (總次數)

failed requests: 688 (失敗的請求數)

write errors: 0 (網路連線寫入錯誤數)

total transferred: 17402975 bytes (傳輸的總資料量)

html transferred: 16275725 bytes (html文件的總資料量)

requests per second: 2148.98 [#/sec] (mean) (平均每秒的請求數,伺服器的吞吐量)

time per request: 465.338 [ms] (mean) (所有併發使用者(這裡是1000)都請求一次的平均時間)

time request: 0.247 [ms] (單個使用者請求一次的平均時間)

transfer rate: 7304.41 [kbytes/sec] received 每秒獲取的資料長度 (傳輸速率,單位:kb/s)

...percentage of the requests served within a certain time (ms)

50% 347 ## 50%的請求在347ms內返回

66% 401 ## 60%的請求在401ms內返回

#### 5. 參考文件

centos 7 ab 壓力測試安裝與解釋

- [鏈結一](

- [鏈結二](

### 二、http_load壓力測試工具

#### 1. 安裝

1. 安裝

wget 

tar zxvf webbench-1.5.tar.gz

cd webbench-1.5

make && make install

2. 使用
webbench -c 併發數 -t 執行測試時間 url

webbench -c 5000 -t 120

1. 安裝

wget 

tar zxf siege-4.0.4.tar.gz

cd siege-4.0.4/

./configure

sudo make

sudo make install

siege -v

2. 應用舉例

基礎應用

siege -c10 -r1 -p url

支援多個header引數

siege -c10 -r1 -p --header="authorization: 123456" --header="sg: 123456"

支援從檔案讀取url

siege -c9 -r1 -f url.txt

3. 參考資料

1. 安裝

Apache ab 壓力併發測試工具

ab,即apache benchmark,只要我們安裝了apache,就能夠在apache的安裝目錄中找到它。它的居住位址是apache安裝目錄 bin ab.exe。現在,我們就來看看如何使用ab.exe來進行壓力測試。在使用之前我們先來學習一下ab的用法。首先,我們輸入cmd開啟dos視窗,然後...

web效能壓力測試工具

為了測試之前寫的http伺服器的專案,學習一下以下幾個web壓力測試工具。1 概念 http load以並行復用的方式執行,用以測試web伺服器的吞吐量與負載。1 利用wget遠端安裝 wget 2 解壓縮 tar zxvf http load 12mar2006.tar.gz 3 進入http l...

ApacheBench 效能壓力測試工具

apachebench命令原理 1 ab命令會建立很多的併發訪問執行緒,模擬多個訪問者同時對某一url位址進行訪問。2 試目標是基於url,可以用來測試apache的負載壓力,也可以測試nginx lighthttp tomcat iis等其它web伺服器的壓力。3 ab命令對發出負載的計算機要求很...