The fix is simple and some of you might have already guessed it, it is APC ...
We were using eaccelerator / xcache for our opcode caching but after having a go on APC tonight, it looks like Magento turns on it’s rocket boosters once APC is activated over other opcode cachers.
Before with eAccelerator/xcache:
it was about 3-5 seconds to add to cart.
After with APC,
it’s been pretty much instant, about a second. You can check it out here: http://www.magentify.com
And the you need to place this block just underneath <global>:
Our tests indicate that APC does not work with Zend Optimizer, and eAccelerator has a 13% performance increase over APC and uses 5MB less per process than APC. Very important information to consider when you have actual people using your store.
Well, the issue is not which cacher is the fastest, it’s which cacher Magento is more optimized with.
But yeah, from a hosting company’s stand point, you probably do want to provide eAccelerator over other cachers for stability and compatibility. But in terms of performance, I’m seeing about close to 20-50% gain with APC enabled vs eAccelerator.
To be quite honest, I really don’t see much improvement for Magento when used with eAccelerator and even if it does, it’s just slightly noticeable. Magento also has their own cacher built in so I think it balances eachother out.
As for APC, it looks as if Magento team took some time to develop extra caching mechanisms for Magento exclusively.
Probably by directly utilizing the APC via the core api calls.
Hence the local.xml modification indicated above.
We’ve experimented with implementing this block, and found that if you have more than one Instance of Magento installed on your server using this configuration, APC seems to jumble up the cache, and doesn’t seem to be able to differentiate between the various sites and they begin cross-loading other Magento sites on the server - pretty ugly!
It would be wonderful to see some further documentation from the Varien team concerning this enhanced APC caching functionality activated by this configuration block. Does anyone know if this ‘feature’ is officially documented anywhere?
Well that’s true, there were lot of tweakings that were involved to make APC robust and stable on our environment.
But with the correct settings and correct environment, this does really become a non-issue.
Well, using tools like APC or other seems to increase performance.
But what about Magento cache itself ? We see that EAV cache increase performance.
So is it realy interesting to add external cache (say APC...) to Magento cache ? and mysql cache ? If APC store pages, there are not anymore mysql request needed for a stored page. and not anymore call to Magento cache.
Or am I totaly stupid ?
I ask this question because we meet issue with EAV Cache : It does work, ok, but as the trafic increase, as there are more and more error returns (in percentage of seen pages) : invalid_entity_type : XXX : No error with low trafic, and up to 3-4 % with 30 simultaneous guys on the website.
and these errors do not occurs without EAV cache.
so we are looking for solution to By-pass EAV cache, maybe replacing with external one.