Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Page 1 of 2
add to cart page load time in less than 2 seconds
 
SimpleHelixcom
Enthusiast
 
Avatar
Total Posts:  906
Joined:  2007-08-31
Huntsville, AL
 

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>:

<global>
....................
<cache>
<backend>apc</backend>
<prefix>alphanumeric</prefix>
</cache>
......................

 
Magento Community Magento Community
Magento Community
Magento Community
 
SimpleHelixcom
Enthusiast
 
Avatar
Total Posts:  906
Joined:  2007-08-31
Huntsville, AL
 

Almost forgot,

This is the file you want to edit after you activate APC.

app/etc/local.xml

 
Magento Community Magento Community
Magento Community
Magento Community
 
lotusseedsD
Mentor
 
Avatar
Total Posts:  1144
Joined:  2007-08-31
 

Does it work for any server from any web host?

 
Magento Community Magento Community
Magento Community
Magento Community
 
dan_w
Sr. Member
 
Total Posts:  290
Joined:  2008-01-04
 

Thanks for the tip. Makes a huge difference.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Crucial
Enthusiast
 
Avatar
Total Posts:  770
Joined:  2007-11-07
Phoenix, AZ
 
chinesedream - 10 June 2008 12:47 PM

Does it work for any server from any web host?

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.

 
Magento Community Magento Community
Magento Community
Magento Community
 
SimpleHelixcom
Enthusiast
 
Avatar
Total Posts:  906
Joined:  2007-08-31
Huntsville, AL
 

Crucial

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.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Brandlive_br
Guru
 
Avatar
Total Posts:  653
Joined:  2008-05-19
Buenos Aires, Argentina
 

SimpleHelix, thanks for your tip.
I can appreacite the difference using APC at this moment.

 
Magento Community Magento Community
Magento Community
Magento Community
 
developerx
Jr. Member
 
Total Posts:  25
Joined:  2007-10-23
 

has anyone used memcache ?

I’ve tried:

<cache>
<backend>memcached</backend>
<host>127.0.0.1</host>
<port>112211</port>
</cache>

But it still creates the cache and session directories and no speed improvement

 
Magento Community Magento Community
Magento Community
Magento Community
 
United Media Associates
Member
 
Avatar
Total Posts:  48
Joined:  2008-03-27
 

Be very careful with adding the following block to your local.xml file:

SimpleHelix.com -

<global>
....................
<cache>
<backend>apc</backend>
<prefix>alphanumeric</prefix>
</cache>
......................

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?

 
Magento Community Magento Community
Magento Community
Magento Community
 
SimpleHelixcom
Enthusiast
 
Avatar
Total Posts:  906
Joined:  2007-08-31
Huntsville, AL
 

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.

 
Magento Community Magento Community
Magento Community
Magento Community
 
lorik
Sr. Member
 
Avatar
Total Posts:  81
Joined:  2008-08-29
Grenoble
 

Hi everybody

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 smile ?

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.

What you think about it ?

thank you for yours replies

 
Magento Community Magento Community
Magento Community
Magento Community
 
Stuarts
Member
 
Total Posts:  66
Joined:  2009-03-16
 

Have to say I tried this and it slowed down the server from 2 seconds to 3 seconds on average.

I have been trying a lot of different things to speed up magento

(See this post - Ways to Speed up Magento- http://www.magentocommerce.com/boards/viewthread/36225/ )

So, I’m not sure if any of those conflict with this?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Brent W Peterson
Moderator
 
Avatar
Total Posts:  3217
Joined:  2009-02-26
Minneapolis MN
 

I went to install eAccellorater on our openSUSE server but it said I needed to either upgrade to PHP 5.3 or downgrade to php 5.2.11

The problem is that our security audit won’t let us down grade to the lower version of PHP

I have installed APC with Zend.

Does anyone have any recommendations on this?

 
Magento Community Magento Community
Magento Community
Magento Community
 
tsopis
Jr. Member
 
Total Posts:  6
Joined:  2008-09-13
Greece
 
United Media Associates - 13 August 2008 10:04 AM

Be very careful with adding the following block to your local.xml file:

SimpleHelix.com -

<global>
....................
<cache>
<backend>apc</backend>
<prefix>alphanumeric</prefix>
</cache>
......................

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

 
Magento Community Magento Community
Magento Community
Magento Community
 
WinginIt
Member
 
Total Posts:  43
Joined:  2008-12-12
 

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??

Any help would be appreciated. Thank you.

 
Magento Community Magento Community
Magento Community
Magento Community
 
WinginIt
Member
 
Total Posts:  43
Joined:  2008-12-12
 

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??

Any help would be appreciated. Thank you.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top
Page 1 of 2