您的位置:首頁技術文章
文章詳情頁

Windows環境Apache服務器壓力測試

瀏覽:69日期:2023-05-22 16:01:50

通過對服務器壓力測試可以大概了解一個服務器的負載能力,下面是Windows下的Apache服務器測試方法。

在Apache服務器自帶了一個測試程序Ab.exe可以很方便的使用 。。

命令是 ab -c 請求數 -n 線程數 網址(建議輸入目標網頁)。。

線程數不宜過大 按照你電腦的承受能力 。。。

請求數有限制 防止有人亂Ddos別人 。。

例:ab -n 10 -c 10 [url]http://192.168.1.3/index.html[/url]

結果如下 。。

D:Apachebin>ab -n 10 -c 10 [url]http://192.168.1.3/index.html[/url]

(以上是輸入的命令)

Benchmarking 192.168.1.3 (be patient).....done

Server Software: Apache/2.0.63

(目標服務器Apache版本號)

Server Hostname: 192.168.1.3

(目標服務器主機頭名稱)

Server Port: 80

(目標服務器Apache端口)

Document Path: /index.html

(目標網頁相對地址)

Document Length: 292 bytes

(目標網頁大小)

Concurrency Level: 10

(并發線程數)

Time taken for tests: 0.140625 seconds

(使用時間)

Complete requests: 10

(成功的請求數量)

Failed requests: 0

(失敗的請求數量)

Write errors: 0

(發生錯誤數量)

Total transferred: 5750 bytes

(全部使用的流量)

HTML transferred: 2920 bytes

(Html文件使用的流量)

Requests per second: 71.11 [#/sec] (mean)

(指標一 平均每秒請求數)

Time per request: 140.625 [ms] (mean)

(指標二 平均事務響應時間)

Time per request: 14.063 [ms] (mean, across all concurrent requests)

(每秒請求時間)

Transfer rate: 35.56 [Kbytes/sec] received

(傳輸速率)

Connection Times (ms)

min mean[+/-sd] median max

Connect: 0 0 0.0 0 0

Processing: 109 124 16.3 140 140

Waiting: 109 124 16.3 140 140

Total: 109 124 16.3 140 140

(所有請求的響應情況)

Percentage of the requests served within a certain time (ms)

50% 140

66% 140

75% 140

80% 140

90% 140

95% 140

98% 140

99% 140

100% 140 (longest request)

每個請求都有一個響應時間 。。

比如 其中 50% 的用戶響應時間小于 140 毫秒 。。

最大的響應時間小于 140 毫秒 (100% 處) 。。

標簽: Windows系統
相關文章:
国产综合久久一区二区三区