Nginx效能測試工具之webbench
在apache中有自帶的ab命令可以測試服務的壓力,而nginx沒有自帶的命令,必須要採用第三方軟體來測試,今天就簡單介紹一下webbench對nginx的壓力測試,壓力測試是對系統管理員和運維人員必須的,可以很清晰地看清伺服器能接受多大壓力.注:本人是在虛擬機器上做測試.
1.下載webbench軟體和安裝
[root@centos179min ~]# wget http://home.tiscali.cz/~cz210552/distfiles/webbench-1.5.tar.gz
[root@centos179min ~]# tar xvf webbench-1.5.tar.gz -C /usr/local/
[root@centos179min ~]# cd /usr/local/webbench-1.5/
[root@centos179min webbench-1.5]# make
[root@centos179min webbench-1.5]# make install
2.命令詳解
[root@centos179min webbench-1.5]# ./webbench -help
webbench [option]… URL
-f|–force Don`t wait for reply from server.
-r|–reload Send reload request – Pragma: no-cache.
-t|–time <sec> Run benchmark for <sec> seconds. Default 30.
-p|–proxy <server:port> Use proxy server for request.
-c|–clients <n> Run <n> HTTP clients at once. Default one.
-9|–http09 Use HTTP/0.9 style requests.
-1|–http10 Use HTTP/1.0 protocol.
-2|–http11 Use HTTP/1.1 protocol.
–get Use GET request method.
–head Use HEAD request method.
–options Use OPTIONS request method.
–trace Use TRACE request method.
-?|-h|–help This information.
-V|–version Display program version.
[root@centos179min webbench-1.5]#
3.測試網站壓力
[root@centos179min webbench-1.5]# ./webbench -c 200 -t 10 http://192.168.1.179/test.php
Webbench – Simple Web Benchmark 1.5
Copyright (c) Radim Kolar 1997-2004, GPL Open Source Software.
Benchmarking: GET http://192.168.1.179/test.php
200 clients, running 10 sec.
Speed=58386 pages/min, 51328516 bytes/sec. –每秒鐘響應請求數:Speed=58386 pages/min,每秒鐘傳輸資料量:51328516 bytes/sec
Requests: 9731 susceed, 0 failed. –10秒200個客戶端請求沒有失敗
[root@centos179min webbench-1.5]# ./webbench -c 1000 -t 10 http://192.168.1.179/test.php
Webbench – Simple Web Benchmark 1.5
Copyright (c) Radim Kolar 1997-2004, GPL Open Source Software.
Benchmarking: GET http://192.168.1.179/test.php
1000 clients, running 10 sec.
Speed=47916 pages/min, 42126676 bytes/sec.
Requests: 7986 susceed, 0 failed. –10秒1000個客戶端請求也沒有失敗
[root@centos179min webbench-1.5]# ./webbench -c 2000 -t 10 http://192.168.1.179/test.php
Webbench – Simple Web Benchmark 1.5
Copyright (c) Radim Kolar 1997-2004, GPL Open Source Software.
Benchmarking: GET http://192.168.1.179/test.php
2000 clients, running 10 sec.
Speed=50394 pages/min, 44303164 bytes/sec.
Requests: 8399 susceed, 0 failed. –-10秒中內發2000個請求也沒有失敗
[root@centos179min webbench-1.5]# ./webbench -c 4000 -t 10 http://192.168.1.179/test.php
Webbench – Simple Web Benchmark 1.5
Copyright (c) Radim Kolar 1997-2004, GPL Open Source Software.
Benchmarking: GET http://192.168.1.179/test.php
4000 clients, running 10 sec.
Speed=46644 pages/min, 40894852 bytes/sec.
Requests: 7749 susceed, 25 failed. –10秒內4000客戶端傳送請求就有25個失敗,證明10秒併發不超過4000,注nginx沒有做過憂化
[root@centos179min webbench-1.5]#
相關文章
- 效能測試之JVM的故障分析工具VisualVMJVMLVM
- 效能測試工具 - Siege
- 【PG效能測試】pgbench效能測試工具簡單使用
- Nginx 和 Gunicorn 效能對比測試Nginx
- 效能測試之測試指標指標
- 微服務測試之效能測試微服務
- ABAP Webdynpro效能測試工具Web
- jmeter之效能測試JMeter
- 測試開發之效能篇-效能測試設計
- 新潮測試平臺之效能測試
- 效能測試之資料庫監控分析工具PMM資料庫
- 效能測試工具你知道多少?
- 使用 fio 工具測試 EBS 效能
- java 效能測試框架工具-junitperfJava框架
- 負載,效能測試工具-Gatling負載
- jmeter之效能測試(16.1)JMeter
- 效能測試:主流壓測工具介紹
- 效能測試之測試分析與調優
- 效能測試之常見效能指標指標
- 軟體產品測試之效能效率測試
- 測試開發之效能篇-JMeter介面測試JMeter
- 隨行付微服務測試之效能測試微服務
- JMeter效能測試工具使用入門JMeter
- 自己上手寫效能測試工具(二)
- Webapi管理和效能測試工具WebBenchmarkWebAPI
- sitespeedio前端效能測試工具介紹前端
- 效能測試之資料庫監控分析工具Grafana+Prometheus資料庫GrafanaPrometheus
- 效能測試之Docker監控Docker
- 效能測試之入門篇
- IO測試工具之fio
- 安全測試工具之-BurpsuiteUI
- PR效能測試工具升級到全鏈路效能測試與分析平臺
- 移動端效能測試必備工具 PerfDog 效能狗
- CentOS 下效能測試工具 wrk 安裝CentOS
- 測試網路效能的小工具
- 效能測試監控工具--Jmeter + Grafana + InfluxDBJMeterGrafanaUX
- 網路效能測試工具iperf的使用
- 效能測試工具的 Coordinated Omission 問題
- 【網路】效能指標與測試工具指標