I'm working on a Windows workstation, on which I use WampServer as my development platform, to write PHP applications which are then run on Linux.
I'm pretty used to APC on Linux, which is blazing fast and a must have for me. However, I'm always surprised to get no performance gain when I use it on Windows.
This leads to generation times close to 1 second per page, on applications relying heavily on the Zend Framework for example. Most of this time is spent parsing PHP files (I verified that by benchmarking include()
s). The very same application can run 10x faster on Linux on MacOS.
The extension is properly loaded:
> var_export(extension_loaded('apc'));
true
Here is my config:
[APC]
apc.enabled = 1
apc.cache_by_default = 1
apc.enable_cli = 0
apc.shm_segments = 1
apc.shm_size = 64M
apc.max_file_size = 1M
apc.stat=1
Did anyone have a similar experience and has a few tips to share?
Edit: more information: I copied the apc.php
file from the APC source archive to my web directory. There, I can see that the APC cache is at work, reporting more than 90% hits vs misses. Still, the speed does not increase though. It takes half a second to include a few dozen files from the framework, with or without APC. And on an equivalent machine on Linux, it's 10x faster.
$t = new APCIterator('user');
on your Windows. – Anilevar_dump($t)
givesobject(APCIterator)#5 (0) {}
as expected. APC is enabled. – Thrill