PHP Accelerators test on Windows with Apache (WampServer)
Sun 14 Nov 2010 21:13
Performance test of the free PHP accelerators on phpBB, MantisBT, TYPO3 and phpMyAdmin.
Applications used to test accelerators
The tested PHP software was phpMyAdmin 18.104.22.168 (a part of WampServer 2.0j), Mantis Bug Tracker 1.2.2, website made with TYPO3 4.3.5 cms and phpBB 3.0.7.
My testing machine was PC with the processor Intel Core 2 Duo E7200, 2GB of memory, 1TB SATA disk drive 7200 rpm. The operating system was Windows XP. The computer was disconnected from network and all tests were done on the localhost. There were 30 processes working while tests were done including FireFox, Task manager, command prompt and, of course, WampServer. The antivirus and firewall software were not working while tests were done. The version of WampServer was 2.0i upgraded to Apache 2.2.14, PHP 5.3.1 and MySQL 5.1.41. I used default configuration of Apache (plus mod_rewrite and mod_headers), default configuration MySQL and PHP (plus 128 MB of memory_limit). I used the ApacheBench as the benchmark. The system had over 1,5GB free physical memory.
Tested PHP Accelerators
I chose to test the most popular open source accelerators APC 3.1.4 beta, eAccelerator 0.9.6.1 and XCache 1.3.0. Each of them could use 64MB of memory for caching purposes. Their configuration settings are on the images below. When one accelerator was tested, the others were commented in php.ini.
For testing I used ApacheBench. Test commands were:
So 10 concurrent threads were making 500 requests to the web server.
eAccelerator used the least memory. In most tests the APC used the biggest amount of memory, but in phpBB test APC admin page shows the least memory consumption. A very small amount of cached files confirms that it could be an error. There was no file over 3MB size in phpBB sources.
eAccelerator appears to be the most universal PHP accelerator. XCache was just after eAccelerator. The APC was the last but I have to emphasize, that it was its beta version.