Coding

Published on October 9th, 2019 | by Bibhuranjan

0

Magento 1 Versus Magento 2 Performance: Which Is Faster?

Disclaimer first!

Both Magento 1 and Magento 2 are fully capable to deliver good customer experience. Here we want to compare Magento 1 and Magento 2 in terms of technical requirements, migration challenges, and performance.

Comparing two platforms is not an easy task since all stores are unique in their configuration, the number of customizations, third-party extensions, user behavior patterns, structure, and server setups.

But even though it’s an equation with lots of unknowns, let’s find some common ground to create a meaningful comparison between Magento 1 and Magento 2 performance and technical requirements.

If you’ve come across this article because you want to migrate from Magento 1 to Magento 2, we can help you predict major technical challenges, plan for possible hardware and server environment upgrades, and mitigate critical migration risks.

Bear in mind that this is an overview article that is just glancing over the theme. If you want to know more about how to maximize Magento 1 vs 2 performance during migration, take a look at our guide.

Differences Between Magento 1 and Magento 2 Technical Requirements

In the grand scheme of things, technical requirements of any store, regardless of whether it was built on Magento 1 or Magento 2, depend more on the installed third-party extensions, the number of SKUs, and expected peak loads. But even though this answer is the most adequate, we understand your frustration with its vagueness and we’ll try our best to compare M1 and M2 requirements for similar stores.

First of all, there’s a 4x spike in RAM demands: from 512 Mb for M1 PHP to 4 Gb for M2 PHP setup. Second, when we are talking about the server requirements, it’s strongly advised to use a multi-server setup for Magento 2 – which means getting a dedicated machine for Elasticsearch, at least. Magento 1 is less demanding here, comfortably lounging in a single-server setup.

Magento v1.9.x system requirements:

Apache 2.x or Nginx 1.7.x, PHP version 5.4, up to PHP 7, MySQL 5.6 (Oracle or Percona), Redis and Memcached cache management support, Apache Solr search (integrated support for M1 EE only).

Magento v2.3.x system requirements:

Apache 2.2 or 2.4+ or Nginx 1.x, PHP version 7.1.3+ and 7.2.x, MySQL 5.6 and 5.7 (also supporting latest Percona, MariaDB, and MySQL NDB Cluster versions), built-in support of Varnish version 4.x or 5.2, Redis 3.2 (compatible with 2.4+), Memcached, native Solr 4.x support (native support ended with M2.1), native support of Elasticsearch 5.2.x and 2.x.

As you can see, there is a lot of crossover in terms of available technologies. The stuff you probably use on your Magento 1 installation but haven’t found in the list above is most often integrated using third-party extensions or custom-made solutions where for Magento 2 these tools are supported natively.

While you can expect marginally better performance for natively supported tools, the advantage here lies mostly in ease of integration and customization, not in the performance department itself.

What to Expect When Migrating to Magento 2

Magento 2 can demand several times more resources than your previous Magento 1 setup. It doesn’t mean it’s inefficient. The difference comes from installed extensions and customizations, product structure, Magento internal settings, etc. Overall, you can expect to see a 30-40% rise in hardware requirements.

In terms of performance, most developers are convinced that both Magento 1 and Magento 2 are fully capable to deliver top performance if you invest the time and money in the hardware and the optimization process. Magento 2 might need a beefier setup, though, making up for it in improved user experience and productivity.

In terms of technical availability, Magento 2 offers more advanced support for different tools, among them performance-oriented ones:

  • latest PHP versions (upgrading to the latest PHP version gives Magento a nice performance boost),
  • Elasticsearch versions 5, 6, and 7,
  • continuous feature expansions (M1 gets security patches only),
  • better cache management support (Varnish support, built-in full-page cache).

In terms of new capabilities, Magento 2 boasts better scalability, improved (and potentially faster) database structure, and tighter security. Most of the improvement, though, is in how easy it is to implement or integrate the most popular third-party tools.

Some Tips to Improve Magento 2 Performance After Setup

With dozens of possible bottlenecks and potential narrow points, Magento 2 has accumulated a huge collection of performance tweaks and fixes that are not equally applicable for every situation. We’ll list here just a few to give you the idea how your Magento 2 store can be affected by different performance factors.

The tips below are major mission-critical stuff that will benefit any M2 store. For more specific fixes, employ manual profiling to find bottlenecks and then eliminate them. It’s important to diagnose the problem first and treat it later.

Migrate to Magento-focused hosting. If you are new to Magento 2, choosing the right hosting is the best performance upgrade you can do for your store. A competent hosting team that specializes in Magento hosting will be able to speed up your migration, get you an optimal server config, troubleshoot any issues faster, and give advice if something goes wrong along the way. Keeping your store on a generic hosting is a bad idea. Magento has a lot of quirks and obscure requirements to run fast. Believe us, you don’t want to deal with them on your own.

Make cache better. By default, Magento 2 uses built-in cache as the caching application of the store. This is obviously a really poor choice. Go to Stores > Configuration > Advanced > System and switch to Varnish. Bear in mind, though, that Varnish works for backend stuff. You’ll need Redis for frontend cache management. The Varnish+Redis combination offers better user experience and a snappy feeling of your store.

Replace MySQL search with Elasticsearch. Install Elasticsearch in place of the default in-store search engine. It’s faster, smarter, and better in every way. Native support for Elasticsearch means it upgrades when Magento upgrades – less maintenance is always good.

The built-in MySQL-powered search is good when you have limited product SKUs and a moderately busy setup. When you grow your available SKUs and at the same time your audience, the MySQL search has a hard time scaling appropriately to the challenge. In addition to that, Elasticsearch offers good features such as working with typos, smart search algorithms, instant search capabilities, etc.

Turn off JS Bundling. Magento-developed built-in JS bundling can makes things only worse. Even though it’s a pretty controversial tool, a lot of optimization guides will tell you to turn it on in order to speed up Magento. This is a mistake. Use advanced JS bundling instead. A third-party solution will work much better than the native tool.

Go to Stores > Configuration > Advanced > Developer> Javascript Settings and make sure it’s off.

Turn on JS Minify, GZIP compression, CSS and HTML minification. In stark comparison to JS bundling, these options are useful and actually speed up Magento.

Get a good CDN with image optimization. Frontend performance depends so much on rational static asset delivery. We don’t say it’s impossible to build a reliable system yourself. What we say is that a Content Delivery Network worth its salt will make all the necessary optimizations for you. New image format conversions, image optimizations, latency cuts, and more – this investment is worth the money.

Flatten everything. A large store will benefit greatly from flattening categories and product catalogs. This optimization makes database queries faster since originally Magento keeps multiple product attributes in different tables. Now attributes will be stored in tables that are created on the fly. You can read more about the flat structure here.

Build DB indexes. When you migrate from Magento 1 to Magento 2 you’ll probably need some third-party extensions to complement the original Magento functionality with additional features. The challenge here is to add new capabilities without deteriorating performance. Most third-party extensions don’t have pre-built DB indexes which can slow down your store. You have to manually build them to prevent dips in performance.

Magento 1 vs 2 Performance: What to Expect

When we compare different Magento stores, it’s entirely possible to have both fast Magento 1 and Magento 2 stores.

In the performance department, most of the time the end result will depend much more on the skill of the developer team than on what kind of platform they are building their store on. Both M1 and M2 offer a lot of solutions to make your Magento store scalable, fast, and reliable under load.

 

Author’s bio:

Vasili Nikolaev is a technical writer at Onilab. He is on a permanent treasure hunt to dig up the most effective tips to make the life of store owners a little bit easier. There’s nothing more satisfying than finding a great solution to a challenging problem for him. Follow him on Twitter, Linkdin

Like this post? Share with your friends.
Share on Facebook
Facebook
0Tweet about this on Twitter
Twitter
Share on LinkedIn
Linkedin
Share on Reddit
Reddit
0Share on Tumblr
Tumblr
0Share on VK
VK
Email this to someone
email

Tags: , , ,


About the Author

Bibhuranjan

Editorial Officer, technofaq.org I'm an avid tech enthusiast at heart. I like to mug up on new and exciting developments on science and tech and have a deep love for PC gaming. Other hobbies include writing blog posts, music and DIY projects.



Leave a Reply

Your email address will not be published. Required fields are marked *

Back to Top ↑