I’m using a VPS with a couple of Wordpress sites, 1 vBulletin site, and most importantly some Yii-built sites.
I would like to know which versions of APC and PHP work well together. I’ve experienced some problems with using PHP 5.3.2 and APC 3.1.3p1 (and 3.1.4). What I got were intermittent “Unable to allocate memory for pool” errors - these errors sometimes even show up in my Wordpress sites.
although it’s more of a general PHP issue than one regarding Yii, I’d like to help with a little tip-off.
I have a server up and running on Ubuntu 10.04 LTS with the latest Apache2, running PHP 5.3.2.1, using eAccelerator 0.9.6.1, and it blew my mind how fast my sites are now delivered using eAcc. I can really recommend to use it. In combination with using cache and compression in Apache, you’ll be surprised about the enormous speed boost.
At the bottom, you’ll find a few suggestions regarding your issue, as well as a fix for it which you can find in the latest SVN version. Hope that will help.
Interesting that you experience such big differences between APC and eAccelerator. If i google for some benchmark comparison there’s not really much difference. Personally i’m using APC for a long time now and it never urged me to try something else. Sure APC was configured well? There are some options that make a real difference, with apc.stat being my favorite when it comes to top performance.
I am sorry that the impression came up that eAccelerator is so much faster than APC - I didn’t actually mean it that way
I just was impressed about how well it worked out-of-the-box for me, and how much faster everything was delivered by the server than a standard server setup without any cache module.
Having read about a couple of benchmarks a while ago for the three most common PHP caches (APC / XCache / eAccelerator) since I am quite new to PHP, the consense of all reports was that they are quite equal in their performance. The final choice then is everybodys personal flavour, which in my case was eAcc.
But you are right, reading my post again, I quite emphasize eAccelerator over APC - please don’t ask me why So to correct my earlier statement:
@Everybody:
Take your personal best choice of the three mentioned caches, but take it, it’s worth it!