|
Magento Optimisation
Posted by Bill Chalmers on 23 July 2014 12:04 PM
|
|
|
This guide lists a collection of performance optimisations for running magento, this guide is not guaranteed to produce the best results and should be used as a general guide on how to optimise magento performance, results may vary. Please implement steps one by one and retest after each step is complete, a step could break the system or decrease performance in some cases so please use caution when implementing steps, the reader is assumed to be very comfortable with installing each of the components or making the listed modifications and be aware of their effect. Initial ConfigurationSetup the following This guide will not detail how to install these individual components. Nginx - http://wiki.nginx.org/Main Apache - http://www.apache.org/ PHP - http://php.net/ PHP APC - http://php.net/manual/en/book.apc.php Varnish - https://www.varnish-cache.org/ For ease of use, you can optionally install: http://www.magentocommerce.com/magento-connect/Phoenix/extension/6322/varnish_cache
Filesystem Enhancements Turn off atime on the default partition - noatime Tools Install the following performance monitoring tools:
Apache ConfigurationRecommended Modules
Recommended Configuration
Database OptimisationRecommended MySQL Configuration
NOTE: these settings will depend greatly on your available resources and your Magento installation requirements. Please install this tool http://mysqltuner.com/ as this will help you to refine your MySQL settings appropriately for your system.
Note: This does not mean all queries that appear in the slow-query.log file will be problematic, it merely logs slow results as a source for tracking down queries that are a potential performance drain.
PHPMagento Required PHP extensions
PHP.ini Recommended Settings
In development/testing – set “display_errors = On”. This provides you with visual troubleshooting cues that you have PHP errors. In production – set “display_errors = Off”
APCIn order to use APC as the opcode cache storage for your Magento install you must modify your ‘app/etc/local.xml Edit the file making sure the lines in bold are added.
Recommended Settings
MagentoMove Magento's var/cache to tmpfs The default installation of Magento uses var/cache in your Magento document root as the slow cache location, i.e. reads and writes from the hard-drive. These reads/writes are very slow and will quickly become a performance killer for all but the smallest online stores. Therefore, we can speed things up by having tmpfs take care of var/cache
Play around with the allocated memory size (here: 64MB). Try 128MB or even 256MB but this depends on your system configuration and available RAM. Enable Flat Catalog Magento uses the EAV model to store customer and product data. This enables these objects to be incredibly extensible, but results in longer SQL queries and more reads. Enabling the Flat Catalog for Categories and Products merges product data into one table, thereby improving performance. Generally, all stores should enable Flat Catalog for Categories. Stores with over 1000 products should enable Flat Catalog for Products.
- See more at: http://docs.nexcess.net/article/optimizing-magento-performance.html#sthash.o7UJHwul.dpuf Combine CSS and JS Files This feature reduces the number of HTTP requests. For versions earlier than 1.4.x, the Fooman_Speedster extension can be used instead. WARNING: Combining CSS/JS when using CDN will cause CSS/JS to "break" until the CDN updates completely. It is recommended to perform this process at the beginning off-peak hours, to allow enough time for the "new" CSS/JS to reach the CDN.
Tweak .htaccessEnable Output Compression
| |
|
|
Knowledgebase
Comments (0)