Today I will see what is faster: Magento CE 1.9 or Magento CE 2.1. I was inspired by this StackExchange question and by the Amasty team benchmark. Amasty compared Magento 1.9.2.2 vs Magento 2.0.0. They found out that 1.9 is faster than 2.0. Now it is 2017 and Magento 2.1.4 and 1.9.3.2 just came out so I decided to see if 1.9 still beats 2.1.
Disclaimer: I will be comparing Community Editions (CE).
I don't want to wait show me results now!
Setup
My setup is simple and could be replicated by others. I will use Amazon AWS EC2 instance. Here is the details:
- Debian 8
- Mysql 5.6.35
- PHP-FPM 7.0.15
- Nginx 1.10.3
- c3.large instance
- AMI debian-jessie-amd64-hvm-2017-01-15-1221-ebs (ami-94bdeef4)
Magento 2.1.4
The settings that I will use for Magento 2.1:
- Production Mode
- Theme - Luma
- Merge Javascript files - Yes
- Enable Javascript bundling - Yes
- Minify Javascript files - Yes
- Merge CSS files - Yes
- Minify CSS files - Yes
Magento 1.9.3.2
The settings for Magento 1.9.3.2:
- Default install with Sample data 1.9.2.4
- Theme: rwd/default
- All cache enabled
- Flat Catalog enabled for products and categories
Test Scenario
I will be using JMeter as load testing software. Scenario as follows: 50 concurrent users with ramp-up period of 10 seconds repeating 20 times. That comes down to 1000 requests. I will be using Mac Numbers 2D-Line chart so it will be linear extrapolation of CSV load test data.
I will be testing homepage, cart page with no items and customer login page. I won't be testing product/category pages as they might be subject to theme or data difference.
NO Full Page Cache
First we will test with Magento 2.1 Full Page Cache (FPC) off. I want to make 1.9 and 2.1 even because Magento CE 1.9.x doesn't have FPC by default.
1. Homepage
Magento 1.9 is obviously faster. Here is some numbers:
2. Cart Page
Yes Full Page Cache
No we will turn on Magento 2.1.4 FPC and will install the free Zoom FPC for Magento 1.9.3.2.
Zoom FPC is an abandoned project but with a little magic you can make it work with 1.9.
For 2.1.4 I will be using built-in FPC:
I will be using a built-in FPC.
1. Homepage
We see that Magento 1.9 with FPC beats Magento 2.1.4 FPC easily. Does it true for cart page? Let's see.
2. Cart Page
3. Customer login page
Takeaway
Magento 1.9.3.2 beats Magento 2.1.4 with either FPC on or off. For Magento 1.9 FPC I was using this excellent free extension Zoom FPC.
Do you have a different benchmark results? Share it comments!
If you find this post interesting do not hesitate to sign up for our newsletter and join the 1472 people who receive Magento news, tips and tricks regularly.
Thank You!
Thank you for sharing your precious knowledge. Just the right information I needed.
Awesome Content in This Blog!
@Gabriel - try shopify
It's my experience too! Magento 2.1.x is much slower than Magento 1.9.3.x! - Thats a fact! - I realized that by installing on my root server and checked response time! - At first I thought, that the server configuration is not optimal, but everything was perfect. Then I compared 19.9.3.3 and 2.1.7 and it was obvious, that Magento 2.1.7 had overall twice the response time than Magento 1.9.3.3. - My conclusion is, that Magento 2.1.7 is really a cost factor, because you need more server performance to get the same response time!
But this is a point, a startup my think of another shop system, that needs less recourses.
What is your opinion about an alternative to Magento 2.1.x?
zoom fpc is faster than lesti
Konstantin,
Is there a reason you've used Zoom FPC instead of Lesli FPC which is much more popular and free as well?
@developer - I explained how I get these results. You are welcome to repeat the steps I took and report the results you get.
How you get this resuls? I've tested magento 2.1.6 without varnish with sample data products and first bit on home page I got in 90 ms. I.m testing on my home PC with HDD and and fx8230 and you are testing on server
@Matt magento 2 doesn't require fpc when developing - what a non sense!
I am testing TTFB - and that is the only thing that matters in my benchmark.
"Both solutions tested do not indicate whether the FPC is actually working" - yes they do - just compare TTFB to the ones without FPC.
Im seeing a few more test methodology / setup issues:
Magento 1 CE doesnt require an FPC, It's design to work without one (Though can be improved with one)
Magento 2 requires Varnish Cache in production (And FPC when developing), Magento 2 isnt designed to work without a caching layer.
Your tests are only requesting the HTML document (not any static assets) so you are not seeing an actual users page load and the settings around minification, combining files are not doing anything as these files are not being requested.
Both solutions tested do not indicate whether the FPC is actually working, Most FPC implementations are failures as there are no metrics on what's missing cache.
Steve,
with a little hacking you can make Zoom work with 1.9 no problem
you can patch 1.9 to work with php7, it is still 1.9
where does c4 come from? I am using c3 as it is stated in the article. It is also stated that i run m1 and m2 on the same aws box. I keep m1 and m2 in separate folders and with a simple nginx edit i change between them.
i have done NO configuration to neither M1 nor M2. out of the box installs as I have stated.
Problems with this...
- Zoom is no longer supported, and only purports to support Magento up to v. 1.6
- PHP 7 is not supported for Magento 1.9
- c4 instances are faster than c3, and tend to use a different infrastructure
- where are you running the tests from? If locally then there's added stress from the testing and no exervising of the network
- configuration. What have you done to speed up database, php, system?
For me the last is the most important. It's clear that the bottlenecks that you're seeing are outside the variables of the test.