VFPCGI Day4

出自VFP Wiki

跳轉到: 導航, 搜尋
VFPCGI的第四天

Apache 本身提供了 ab 這個命令可以讓你對自己的 web server 作測試。 除了可以用在 apache 身上之外,也可以用在 IIS 上。

使用的說明可以參考:Apache 壓力測試

我的測試環境:

  • Windows 2000 Professional
  • AMD 1.7G
  • RAM 512MB
這邊我們統一使用下面指令進行測試,也就是模擬有 5000 個 request 連上 web server。
ab -n 5000 http://localhost/vfpcgi/vfpcgi.exe

這邊我們只觀察兩個數值:

  • Time taken for tests: 總共執行花了多久的時間.(以上 1000 次共多久)
  • Requests per second: 每秒平均可以處理多少個 connection.
  • Time per request: 每個 connection 所花費時間。
Host在IIS上的結果:
Time taken for tests:   600.93750 seconds
Requests per second:    8.33 [#/sec] (mean)
Time per request:       120.019 [ms] (mean)
Time per request:       120.019 [ms] (mean, across all concurrent requests)
Host在Apache上的結果:
Time taken for tests:   754.250000 seconds
Requests per second:    6.63 [#/sec] (mean)
Time per request:       150.850 [ms] (mean)
Time per request:       150.850 [ms] (mean, across all concurrent requests)

Apache 的結果,明顯較 IIS 差,但我這邊使用的是預設的設定,如果你對 Apache 設定有一定瞭解的話,不妨再去作調整,或許可以得到更好的數字。

以上結果,就提供給各位作參考。