Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Magento-website speeding techniques
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Magento-website speeding techniques

livserverslivservers Member
edited May 2018 in Tutorials

Many of us using Magento websites nowadays.Magento is the leading e-commerce platform and it is a large open source .

Here are some suggestions to improve the performance of Magento sites

System Requirement

It is imperative to select a Magento specialized hosting provider with good server configuration and a satisfying installed version of Magento system requirement.

Enable Magento Cache

System –> Cache Management, Click “Select All” and choose “Enable” under “Actions”.

**Implement Content Delivery Network **(CDN)

We can use CDN with Magento store. It will help your website’s static contents (Images, JavaScripts, CSS, etc) to be delivered from the nearest CDN Edge Server when users are accessing it.

**Implement Magento Full Page Cache
**

There is Full Page Cache which ppays and important role in magento websites. LiteMage cache and Extendware Full Page Cache,varnish cache are full page cache options for the Magento sites. It helps to cache the static contents of the website and reduce the loading time.

Enable Frontend Flat Catalog

Frontend Flat Catalog is especially useful when you have a large store with a lot of products.

Enable Log Cleaning

Configuration >> Advanced >> System >> Log Cleaning then Choose Yes to “Enable Log Cleaning”.

Consider reducing “Save Log, Days” as well. The Magento logs can grow to a very large size over time and this will seriously affect performance, which is why log cleaning must be enabled to keep it in control. It is imperative to enable Magento Cron job in order to run the log cleaning properly.

Merge JavaScript and CSS Files

Configuration >> Advanced >> Developer >> JavaScript Settings/CSS Settings

Choose Yes for both “Merge JavaScript Files”

and Merge CSS Files.

Disable Mage_Log

Disabling Mage_Log will improve performance, also magento logs won't help much, which will significantly reduce the queries to the MySQL database and thus speed up loading time.

Enable Compilation

System –> Tools –> Compilation, Click “Run Compilation Process”.

This compiles all files of a Magento installation to make one embody path to extend performance.
Disable Magento Compiler before making any changes to the website like adding a replacement extension or initiating upgrade/downgrade/installation or removal of any Magento module.

GZip Compression

Enable the Gzip compression by uncommenting the rules in the .htaccess file so that it compresses the web pages and style sheets before sending them over to the browser.

Expire Headers

This helps to request the files from the browser cache and reduce the loading time.

Use Fewer Extensions/Modules

It is better to use fewer extensions/modules with Magento to improve the site performance. Some Magento extensions/modules reduce the site performance and slow down sites. If the site is slow, try to disable the extensions/modules one by one and find which is causing the issue

Optimize images

Optimize all site images and reduce the size and that will help to improve the website speed.

Defer loading of JavaScript

It is not necessary to load and execute all the scrips in the initial page render. So, deactiavate the JavaScripts after the initial render or after other critical parts of the page have finished loading. This will help to reduce resource contention and improve performance.

Minify JavaScript

Minify the JavaScripts to reduce their space and speed them up. Check with your web designer or theme developer as it may break the website for some themes or make conflict issue with the JS/Jquery theme and modules.

Minify CSS

Minify the CSS to reduce their space and speed them up. Check with your web designer or theme developer as it may break the website for some themes.

Comments

  • eva2000eva2000 Veteran
    edited May 2018

    While all those optimisation techniques are nice. Magento is natively going to be slow as everything is fed through index.php (PHP). Accelerating PHP is only way and that involves either setting up Varnish Cache in front of Apache or Nginx or using Litespeed web server and their LiteMage caching for Magento. Both offload the load from PHP to web/cache servers dramatically speeding up Magento.

    I am still a noob to Magento, but did write up my entire first time experience in using & installing Magento 2.2.2 including redis vs varnish cache benchmarks - all via pure SSH install on my Centmin Mod LEMP stack with Nginx, PHP-FPM, MariaDB on CentOS 7 https://github.com/centminmod/centminmod-magento2. Contributions, corrections etc via pull requests are welcome :)

    If folks just want to jump to just the benchmarks

    Using my custom forked wrk-cmm load testing tool

    Example redis cache FPC Magento

    wrk-cmm -t2 -c2 -d10s --breakout -H 'Accept-Encoding: gzip' -s scripts/setup.lua --latency $domain
    thread 1 created
    thread 2 created
    Running 10s test @ https://magento.domain.com
      2 threads and 2 connections
      Thread Stats   Avg      Stdev     Max   +/- Stdev
        Latency    29.77ms    9.12ms 134.42ms   96.97%
        Connect     9.30ms    4.76ms  12.67ms  100.00%
        TTFB       29.46ms    9.08ms 134.08ms   96.97%
        TTLB      306.88us  212.53us   2.83ms   97.51%
        Req/Sec    34.26      6.07    40.00     97.47%
      Latency Distribution
         50%   28.09ms
         75%   30.42ms
         90%   33.51ms
         99%   75.62ms
      684 requests in 10.05s, 4.84MB read
    Requests/sec:     68.04
    Transfer/sec:    493.39KB
    

    versus warmed up Varnish cache with 1,011 requests/second and TTFB thread latency max at 12.54ms

    wrk-cmm -t2 -c2 -d10s --breakout -H 'Accept-Encoding: gzip' -s scripts/setup.lua --latency $domain
    thread 1 created
    thread 2 created
    Running 10s test @ https://magento.domain.com
      2 threads and 2 connections
      Thread Stats   Avg      Stdev     Max   +/- Stdev
        Latency     1.99ms    0.90ms  13.00ms   91.47%
        Connect     7.28ms    5.85ms  17.71ms   52.00%
        TTFB        1.46ms  679.66us  12.54ms   81.05%
        TTLB      505.80us  583.70us   6.74ms   91.19%
        Req/Sec   508.07    126.29   720.00     66.50%
      Latency Distribution
         50%    1.49ms
         75%    2.49ms
         90%    2.76ms
         99%    5.49ms
      10124 requests in 10.01s, 70.53MB read
    Requests/sec:   1011.06
    Transfer/sec:      7.04MB
    
    Thanked by 1Aidan
  • teamaccteamacc Member
    edited May 2018

    Hello

    Goodbye.

  • AlyssaDAlyssaD Member

  • Low end talk at its finest...

    Thanked by 1FHR
  • alexmorcoalexmorco Member
    edited May 2018

    Thanks for sharing the requirements and almost these are the precautions before starting with Magento or starting online ecommerce store, Hosting affects a lot with your store performance because this is what where you products, checklist, checkout, and customers would go through the platform, I have selected A SPAMMY SERVICE and using their SPAMMY SERVICE for my store. Performance is awesome.

  • @alexmorco how is the spamming working out for you?

Sign In or Register to comment.