Joe Horn 的啟示錄

[Benchmark] eAccelerator v.s. APC on PHP 5.3

FreeBSD ports tree 的 lang/php5 升級到 5.3.2, www/eaccelerator 也升級到 0.9.6。
但是… 目前,FreeBSD ports tree 的 www/pecl-APC 依然是 3.0.19,無法在 PHP 5.3 運作;為了讓它正常運作,jnlin 送過 PR(我沒有先查詢,也送了一個 )。

其實 eAccelerator 0.9.6 在 2010 年 2 月初就已經釋出了,可是,從 changelog 看來,很多不錯的功能被砍掉(反璞歸真?):

Changes in this version:

* Support for PHP 5.3.
* The encoder is removed
* The user cache functions are removed
* The session handler is removed
* The minimal PHP version supported is now 5.1
* Some internal refactoring to clean up the code
* Fixed some bugs (and probably added some)

這麼看來,2008 年的這篇文章的參考價值就低了些…
為了滿足我自己的好奇心,就把 APC 3.1.3p1 裝起來測試看看。

系統/硬體:

設定:

測試結果(ab -c5 -n500):

Pure PHPeAcceleratorAPC
WordPress 2.9.23.00 req./sec.
332.834 ms/req.
7.61 req./sec.
131.487 ms/req.
8.87 req./sec.
112.750 ms/req.
MediaWiki 1.15.31.81 req./sec.
552.822 ms/req.
2.75 req./sec.
363.124 ms/req.
5.93 req./sec.
168.580 ms/req.
Gallery 2.3.13.51 req./sec.
284.979 ms/req.
7.91 req./sec.
126.421 ms/req.
7.38 req./sec.
135.506 ms/req.

依照結果看來,APC 3.1.3p1 的確略勝 eAccelerator 0.9.6。
可惜的是.. Xcache 目前的最新版本(1.3.0)沒辦法在 PHP 5.3 跑…

Exit mobile version