Welcome to PotatoCommerce - Top Quality Magento Extensions Store

Home > Blog > Magento 2 Performance Optimization: Complete Guide

Magento 2 Performance Optimization — Complete Checklist

Posted on 19 June 2017

Magento 2 performance

Slow stores make low sales. Magento 2 speed is probably the biggest drawback of the platform. Magento 2 requires a serious optimization and solid hardware environment. If Magento 2 installed on a modern and stable environment and configured properly, Magento 2 shows impressive performance results. Many modern technologies have been implemented in Magento 2 to accelerate the rendering of pages both on the backend and storefront sides: Varnish, Redis, Full Page Cache, and LESS.



Overview of Magento 2 performance optimization

Improved indexing system

Indexing is the process of data conversion, which is designed to improve the performance of the site. The indexing architecture has been significantly improved in Magento 2, which allows the platform to run faster.



Full Page Cache

Full Page Cache (FPC) goes out of the box. It significantly reduces the response time (Time to First Byte), which thereby significantly speeds up the loading of the page. FPC caches pages of products, catalogues and CMS pages (including homepage and 404 page). FPC is faster than the standard Magento cache 2-3 times, which allows to reach 50-200ms server response time. The real time to first byte depends on the distance between the server and the client, on how robust server hardware, and on current load of the web server. You can check whether FPC is enabled in System> Tools> Cache Management. The FPC settings are located in Stores> Configuration> Advanced> System> Full Page Cache



Varnish

Varnish is a free server software that is designed to speed up web pages that are on Unix servers. Varnish is used for many platforms, including Drupal, Wordpress, Magento, etc. Varnish works as front-end for any web servers. Varnish has multithreading feature and is very efficient. To enable and configure Varnish in Magento 2, go to Stores> Configuration> Advanced> System> Full Page Cache and select “Varnish Cache” in the Caching Application option.



Redis

Redis technology allows Magento to work with the cache more efficiently. Thus, all cache including Full Page Cache) will work even faster with Redis.



Content Delivery Network (CDN)

CDN is used to create copies of files on servers that are geographically closer to the client. Thus, files (media, js, css, and others) are downloaded faster than browsers, which makes the page load faster.
If you are using Amazon S3 or Amazon Cloudflare, then we recommend that you to use the CDN Synchronizer, which automatically synchronizes data between the Magento and CDN.



Image Optimization

Optimizing files will help make the overall page size significantly smaller, which reduces the time required to load the page. To automatically optimize the files of JPG, PNG and GIF types, you need to use Image Optimizer Magento 2 extension.



Javascript and CSS optimization

Despite the fact that in Magento 2 has is a JS and CSS files optimization, it does not work properly. The thing is it does not merge all JS and CSS files, and it's difficult to work with.
Instead, you can use Performance Optimization Tool - the only Magento 2 extension on the market which really optimizes JS and CSS content.



Magento Performance Toolkit

Magento 2 was enhanced with a toolkit for testing Magento performance on a generated data using Apache jMeter. You can find Magento Performance Toolkit user guide here. This toolkit helps to find the bottleneck in code; therefore to prepare the website for production.



Flat Categories and Products

To speed up product collection you can enable Flat Catalog Category and Flat Catalog Product. When enabled, tables of data with product information and categories are created "on the fly". Depending on your cron settings, which specify the frequency of tasks, the flat catalog will be updated automatically.



Enable GZIP Compression

GZIP compression dramatically reduces the size of downloaded files (HTML, Javascript, CSS, etc.). GZIP compression works on the same principle as file archivers. You can learn more about enabling GZIP Compression here.



Keep Magento up-to-date

The timely updating of the Magento platform allows not only to have the most secure and powerful system, but also the fastest version of the platform.



Monitor performance

To avoid any unexpected blackouts on high traffic period, you need to monitor Magento 2 and server performance. It helps to find the bottlenecks, periods and reasons of high CPU and Memory load.
It is also important to always check your website speed becase it can decrease after any small change on the store. We recommend using free GTMetrix service - it has a feature of daily website check and email alerts.

Conclusion

Optimization of any Magento store is a must. Both desktop and mobile users prefer fast stores which provide smooth user experience. Slow stores make low sales. Therefore, each Magento 2 store owner should care about website speed. So invest in Magento 2 performance optimization as soon as possible.