Magento Forum

   
101 ways to speed up your Magento e-commerce website
 
Guido Jansen
Magento Team
 
Avatar
Total Posts:  35
Joined:  2008-07-29
The Netherlands
 

It’s a shameless promotion of a blogpost I wrote, but I think it might be useful to anyone who wants to increase Magento performance: My 101 ways to speed up your Magento e-commerce website.

If you have any additional tips & trics: please leave them in the comments and I’ll add them to the list. Thanks!

 
Magento Community Magento Community
Magento Community
Magento Community
 
J_T_
Mentor
 
Avatar
Total Posts:  1961
Joined:  2008-08-07
London-ish, UK
 

- Swap Apache for NginX or Litespeed (I’m moving to Litespeed)
- Turn off or at least reduce web server logging (reduces disk writes)
- Follow the advice from Yahoo! YSlow and Google Page Speed (FireFox Add-Ons)
- Use a CDN (I use Rackspace Cloud FIles with the OnePica module)
- Compile MySQL from source instead of your OS’s package manager (can yield significant MySQL performance gains)

 
Magento Community Magento Community
Magento Community
Magento Community
 
Guido Jansen
Magento Team
 
Avatar
Total Posts:  35
Joined:  2008-07-29
The Netherlands
 

Thanks J.T.! I added, 1, 2 and 5 to the hosting section of my post, 4 was already in the list and I added Yslow to my suggestion of using Google Page Speed.

keep ‘m coming smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
convoke
Jr. Member
 
Total Posts:  6
Joined:  2010-04-09
 

@Jansen Thanks so much for your helpful tips.

 
Magento Community Magento Community
Magento Community
Magento Community
 
J_T_
Mentor
 
Avatar
Total Posts:  1961
Joined:  2008-08-07
London-ish, UK
 

You touch upon this with browser output compression and mod_expire, but taking it further, many forget to actually set expire headers correctly. YSlow will also tell you whether your static files are or aren’t instructed to be cached by the browser for a certain amount of time.

In Apache, I have this in my virtualhost config:

# Turn on Expires and set default to 0
                ExpiresActive On
                ExpiresDefault A0

                
# Set up caching on media files for 1 year (forever?)
                
<FilesMatch "\.(flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav)$">
                        
ExpiresDefault A29030400
                        Header append Cache
-Control "public"
                
</FilesMatch>

                
# Set up caching on media files for 2 weeks
                
<FilesMatch "\.(gif|jpg|jpeg|png|swf)$">
                        
ExpiresDefault A1209600
                        Header append Cache
-Control "public"
                
</FilesMatch>

                
# Set up 1 week caching on commonly updated files
                
<FilesMatch "\.(xml|txt|html|js|css)$">
                        
ExpiresDefault A604800
                        Header append Cache
-Control "proxy-revalidate"
                
</FilesMatch>

                
# Force no caching for dynamic files
                
<FilesMatch "\.(php|cgi|pl|htm)$">
                        
ExpiresActive Off
                        Header set Cache
-Control "private, no-cache, no-store, proxy-revalidate, no-transform"
                        
Header set Pragma "no-cache"
                
</FilesMatch>

Now repeat visitors won’t have to fetch all images etc. yet again if the browser still has them in its cache.

In the System Configuration Advanced area, you can also switch off Mage_Log - saving many DB writes that you can most likely do without anyway.

If Litespeed or NGinX isn’t an option, then go for Zend Server (ideally the non-CE version so you can use full page caching).

Enabling MySQL query cache with a decent chunk of memory also made a decent difference for us.

Finally, one I learned at a London keynote by Yoav, use K-Meleon if you are on Windows for your general Admin work. It renders Magento’s heavy JS back-end significantly faster than any other browser. Whilst this doesn’t speed up Magento for your visitors, it does for you and your staff.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Kammalou
Sr. Member
 
Total Posts:  285
Joined:  2009-01-20
Denmark
 

Hi,

- Use the correct session storage. The choice is either database or files and the best setup depends on your system setup so be sure to test which one works best for you.

With Memcached implemented. You entirely skip the part of writing Session Storage to either disc or DB.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Guido Jansen
Magento Team
 
Avatar
Total Posts:  35
Joined:  2008-07-29
The Netherlands
 

Thx for the suggestions, added an extra 7 tips (+1 for enterprise) to the list which now has a total of 52 items smile

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top