ApacheBench 網站壓力測試

ApacheBench 網站壓力測試

利用Apache 內建的ApacheBench ab.exe來進行測試(Apache\bin 目錄下)

指令:

E:\xampp\apache\bin>ab -n 100 -c 5 http://www.yourweb.com/

代表同時 5 個連線,連續點擊 100 次

結果:

Benchmarking www.yourweb.com (be patient).....done

Server Software:        Microsoft-IIS/8.5
Server Hostname:        www.yourweb.com
Server Port:            80

Document Path:          /
Document Length:        25992 bytes

Concurrency Level:      5
Time taken for tests:   46.813 seconds
Complete requests:      100
Failed requests:        1
(Connect: 1, Receive: 0, Length: 0, Exceptions: 0)
Total transferred:      2630700 bytes
HTML transferred:       2599200 bytes
Requests per second:    2.14 [#/sec] (mean)
Time per request:       2340.625 [ms] (mean)
Time per request:       468.125 [ms] (mean, across all concurrent requests)
Transfer rate:          54.88 [Kbytes/sec] received

Connection Times (ms)
min  mean[+/-sd] median   max
Connect:        0   37 301.0      0    3016
Processing:   266 1964 4304.3    375   21234
Waiting:      250 1905 4318.6    328   21234
Total:        266 2001 4302.6    391   21234

ApacheBench 網站壓力測試
ApacheBench 網站壓力測試

Percentage of the requests served within a certain time (ms)
50%    391
66%    609
75%    844
80%   3297
90%   5422
95%   6563
98%  21188
99%  21234
100%  21234 (longest request)

注意紅色欄位的數值:

  • Failed requests:失敗的要求數(Requests)
  • Requests per second:平均每秒可回應多少要求
  • Time per request:平均每個要求所花費的時間(單位: 豪秒)

參考:
The Will Will Web:http://blog.miniasp.com/post/2008/06/30/Using-ApacheBench-ab-to-to-Web-stress-test.aspx
壓力測試網站:https://k6.io/

關於作者 多力哥
ApacheBench 網站壓力測試
影像創作攝影師/網頁動畫設計師/系統網路工程師/水草研究生
景文科大畢業後,我成為一名網站動畫設計師,並副修MIS電腦資訊管理。2004年,我開始接觸單眼相機,並在2008年正式成為一名接案攝影師,目前使用Canon系統進行拍攝。2016年,我愛上了美麗的水草缸,這讓我的生活多了另一層次的放鬆。每天在電腦前修圖時,能欣賞紅吱吱、綠油油的水草,彷彿多了一份平靜與愉悅。攝影與水草讓我的生活充滿了藝術與自然的交融。
連絡信箱:hello@hahasmile.com (歡迎合作提案)
DORIGO IMAGE 攝影工作室:https://dorigo-image.com
如果你喜歡我的內容,可以用行動贊助我一杯咖啡☕,支持我持續創作,也讓這個網站可以繼續營運下去喔!

若您喜歡這篇文章,歡迎按讚分享喔!
0 回復

發表評論

想要留言嗎?
歡迎歡迎!

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *