Speeding up Magento
Optimizing your Magento for fast ecommerce
Since its launch in 2007, Magento has quickly become the most popular opensource e-commerce platform. However, a fresh Magento install is notoriously slow. Even with modern hardware, a default install will see page generation taking up to 10 seconds. So it’s no coincidence that most posts on the Magento forum are speed complaints.
Magento speed issues generally cover two categories. The first is the latency of a single pageview with an otherwise quiet install. The second is the latency of a single pageview among many concurrent pageviews. Both require a different approach and testing methodology. However, to optimize a busy shop for concurrency, it should first be optimized for an isolated pageview. This articles focuses on this very task. For high-concurrency optimization, please refer to the advanced articles elsewhere on this site.
Where to start tuning your own Magento shop? There are long lists of possible tweaks on the web, some of which require significant effort to implement and only yield marginal speed improvement in very specific situations. The tips below cover the most essential optimizations that are currently known and can be applied to 98% of existing Magento shops.
Note: some tips require server administrator access. Unless you are a sysadmin, you should find out whether your hosting provider has implemented these. Also refer to our “How to pick a speedy hosting provider” guide.
The two major Magento bottlenecks of a regular install are disk access and database query time, so read the tips covering these subjects first. After that, you should analyze your own particular template and selection of modules. Third, have a look at the Magento specific methods to cache parts of the page generation output and cache transfer of static content. Fourth, you should study the generic tips for web application stack optimization.
Storage
Due to Magento’s architectural design, a single Magento pageview makes the server open thousands of PHP, CSS, Javascript and image files. Therefore, optimizing random disk access speed should be first on your list. There are two common strategies to achieve this.
First is to use the fastest disks on the market. Solid State Drives (SSD) are pricey but lightning fast. They excel especially in random access since they lack moving parts. Pick your SSDs based on industry reviews such as The SSD Review.
A seconds strategy, if the byte size of your shop permits, is to load the whole shop into RAM. The easiest way is to map part of your system memory as a folder in your filesystem, a.k.a. a ramdisk or tmpfs. For specific instructions, please refer to the Linux Ramdisk Howto. Evident advantage is that RAM is a magnitude faster than SSD storage. Drawbacks include high costs and a theoretical limitation on the amount of RAM that you can fit in a single server. Another important measure: due to the nature of RAM, you should configure periodic synchronization between the ramdisk and a persistant storage medium, otherwise your new SKU’s are lost at the next reboot.
Needless to say that disk access times will be random at best, if you share your storage with other sites. So dedicated storage is the way to go. It follows that separate storage for your front-end shop and database is highly recommended.
MySQL
A defaul Magento install executes over a hundred database queries to generate a single page of content. And if you enable custom plugins, there are even more queries. To speed things up, you should verify that you get the most out of the build-in query cache of MySQL. See the query cache section in our MySQL guide. Note that it’s no use to optimize the index cache (key_buffer) because that only applies to MyISAM tables and Magento mostly uses InnoDB tables.
Webserver
Webserver optimization boils down to a) minimizing latency in the webserver itself and b) configuration the webserver for better interaction the the client.
Decreasing webserver latency can be partially achieved by switching to specific webserver software that has sacrificed features for speed. Examples are Nginx and Lighttpd. People have reported 10s of miliseconds of gain per request compared to Apache, especially on heavily loaded servers.
You could also reconfigure your webserver to smooth interaction with clients. Well known targets:
- Make sure that your webserver sends compressed content so the total transfer time decreases
- Have your webserver send the right hints about what and how to cache
- Make sure that HTTP/1.1 Keepalive is enabled so connections stay open for at least 2 seconds.
Practical examples of these tweaks can be found in the Apache section.
Template & configuration
Make sure your site conforms to the generic guidelines for speedy design. If you buy a design or template, confirm that it was build with speed in mind. As a guideline, you should keep the total size of your frontpage (HTML, images, javascript, css) under 200KB.
In the Magento configuration, disable all extensions that you don’t use. Disable all extended features. Enable all caching under System > Cache Management. Use the internal functionality to combine javascript and CSS.
Third party magic
Many commercial components exist that claim to speed up Magento page generation. In general, they replace core Magento code so you should be cautious when updating Magento to a newer release.
Note: we can’t recommend a specific extension. Please post your mileage in the comments.
- http://biz.metrofindings.com/main.page/magento-speed-up-module.html
- http://www.tinybrick.com/magento-speed-booster-module.html
- http://www.artio.net/magento-extensions/m-turbo-accelerator
- http://store.delorumcommerce.com/catalog/product/view/id/3/category/3/
- http://www.magentocommerce.com/magento-connect/FOOMAN/extension/457/fooman-speedster
- http://www.magentocommerce.com/magento-connect/TinyBrick/extension/3287/lightspeed
- http://stackoverflow.com/questions/1639213/why-is-magento-so-slow
More extensions at http://www.magentocommerce.com/magento-connect/filter/all/performance.
Conclusion
This article described the most beneficial optimization strategies for Magento. Low hanging fruit is optimizing the disk i/o bottleneck and the MySQL and webserver cache features. Depending on the nature of the shop, optimizing the template and installing a third party caching mechanism are second in line to yield the best speed gain.



This module is time waste, it cant work normaly with any internet shops.
Support complicatedly crap, they answering meybe on 3-4 email on Cezch language, not on English.
We spended week to find out that this module just CANT work with any internet shop, and asked for refund. And like you understand Artio dont give refund, its our problem that we using Magento which isnt suited well with M-Turbo
Just dont waste your time and search other module.
Very detail learning, thank you
Hello are using WordPress for your blog platform? I’m new to the
blog world but I’m trying to get started and set up my own.
Do you need any html coding
expertise to make your own blog? Any help would be really appreciated!
Hello, you used to write magnificent, but the last several posts have
been kinda boring… I miss your tremendous writings. Past several posts are
just a
little out of track! come on!
Heya are using WordPress for your blog platform? I’m new to the
blog world but I’m trying to get started and set up my own.
Do you require any coding
expertise to make your own blog? Any help
would be really appreciated!
Hi! This post could not be written any better!
Reading this post reminds me of my good old room mate!
He always kept chatting about this. I will
forward this write-up to him. Pretty sure he will
have a good read. Thank you for sharing!
Wholesale Cheap 1:1 replica louis vuitton Handbags / Bags / Purses from china Online Outlet for Sale
http://mooreksvc4.webs.com/ laqeuz
Wholesale Cheap 1:1 replica louis vuitton Handbags / Bags / Purses from china Online Outlet for Sale
gcudsv
Well I really liked reading it. This
subject provided by you is very practical for proper planning.
Unquestionably consider that which you said. Your
favorite justification seemed to be at the web the
simplest factor to consider of. I say to you, I certainly get
annoyed while other folks consider concerns that they plainly
don’t know about. You
managed to hit the nail upon the top and outlined out the entire thing without having side effect , folks could take a signal. Will likely be again to get more. Thank you
Hey there just wanted to give you a quick heads up. The text in your
content seem to be running off the screen in Firefox.
I’m not sure if this is a format issue or something to do with web browser compatibility but I thought I’d post to
let you know. The design look great though! Hope you get the problem solved soon.
Thanks
Heya. Sorry to hassle you but I happened to run across your site and discovered you happen to be using the exact same template as me.
The only issue is on my website, I’m struggling to get the theme looking like yours. Would you mind e-mailing me at: matilda-daniel@aol.com so I can get this figured out. By the way I have bookmarked your internet site: http://speedprofs.com/magento/ and will be visiting frequently. Thanks!!
I think this is one of the most important
info for me. And i am happy reading your article. But wanna remark on few general things, The
website taste is perfect, the articles is actually excellent :
D. Excellent activity, cheers
When I originally commented I clicked the -Notify me when
new feedback are added-
checkbox and now each time a comment is added I get four emails with the identical comment.
Is there any approach you possibly can take away me
from that service? Thanks!
Hello there! I could have sworn I’ve visited your blog before but after going through many of the articles I realized it’s new to me.
Regardless, I’m certainly delighted I found it and I’ll be bookmarking it and checking
back often!
Leave a comment