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.
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?
You have to make your sites different with the entry <prefix>alphanumeric</prefix> in /app/etc/local.xml file.
Try <prefix>siteA</prefix> at your first site and
<prefix>siteB</prefix> at your second site ... etc
I have installed APC on Apache, shared environment (Media Temple gs) with databaste running in isolated container. I followed the protocal with regards to php.ini, local.xml and made some APC config. adjustments. I think that I see a slight improvement in the handling of cache, but the front end page upload time is slower and there is no change in “add to cart” time.
I am looking at this blog:http://www.magentocommerce.com/blog/understanding-magento-scalability-and-performance-1/
with this local.xml edit:
<global>
<cache>
<backend>apc</backend>
<prefix>MAGE_</prefix>
</cache>
</global>
Any thoughts or experience with this snippet as an alternative to ‘Alphanumeric? Does anyone understand what the implicatons are?
“Cache Management” no longer saves the checked items (check marks) when enabling the Magento cache. (And yes, var/cache stays empty) Is this normal? I am asking myself if I have lost the Magento cache mechanisms and traded one for the other. The site was faster without APC than with. Can anyone think of anything that had tripped them up after APC installation? I have read every forum/wiki/blog/post/thread about speeding up Magento and APC that I can find. What have I done bass-akwards??
I have installed APC on Apache, shared environment (Media Temple gs) with databaste running in isolated container. I followed the protocal with regards to php.ini, local.xml and made some APC config. adjustments. I think that I see a slight improvement in the handling of cache, but the front end page upload time is slower and there is no change in “add to cart” time.
I am looking at this blog:http://www.magentocommerce.com/blog/understanding-magento-scalability-and-performance-1/
with this local.xml edit:
<global>
<cache>
<backend>apc</backend>
<prefix>MAGE_</prefix>
</cache>
</global>
Any thoughts or experience with this snippet as an alternative to ‘Alphanumeric? Does anyone understand what the implicatons are?
“Cache Management” no longer saves the checked items (check marks) when enabling the Magento cache. (And yes, var/cache stays empty) Is this normal? I am asking myself if I have lost the Magento cache mechanisms and traded one for the other. The site was faster without APC than with. Can anyone think of anything that had tripped them up after APC installation? I have read every forum/wiki/blog/post/thread about speeding up Magento and APC that I can find. What have I done bass-akwards??