本文转自:https://www.goivvy.com/blog/magento-2-1-million-products

Can Magento 2 handle 1 million products?

I came across that question many times. It got me interested and I started searching the web. I didn’t find an answer so I decided to set up my own experiment.

In this article I will install the latest Magento 2.2.2 (M2), load it with 1 million products and look at the performance. I will describe the procedure in details and will provide specifics so anybody could replicate and prove my findings.

Preconditions

Here is what I will be running:

  1. Magento Open Source 2.2.2.

  2. Debian 8 server with Linode 12G plan: 12G RAM, 6 CPU cores, 196Gb SSD.

I will be using Magento 2 performance toolkit to generate data for testing. It comes with M2 and it helps with testing the impact of various 3rd-party extensions and customizations.

Load 1M products

M2 performance toolkit has different profiles:

  1. Small profile: 800 simple products, 30 categories, 200 customers, 80 orders.

  2. Medium profile: 24k simple products. 300 categories, 2000 customers, 50000 orders.

  3. Large profile: 300k simple products, 3000 categories, 5000 customers, 100k orders.

  4. Extra large profile: 600k simple products, 6000 categories, 10k customers, 150k orders.

Profiles are defined as XML files and are stored in setup/performance-toolkit/profiles/ce/ folder inside Magento root. Here is an example of medium profile:

Medium Profi

We would edit extra large profile XML to set the maximum number of simple products to 1 million:

-- <simple_products>600000</simple_products>

++ <simple_products>1000000</simple_products>

Then we would run an import process:

php bin/magento setup:perf:generate-fixtures \ setup/performance-toolkit/profiles/ce/extra_large.xml

It would take a while to complete. I had to run it two times because the first time it crashed MySQL server:

MySQL cr

The second time it run out of memory:

Out of memory

I then manually reindexed it:

php bin/magento indexer:reindex

Then again it failed on Catalog Rule Product reindex:

Reindex failed

It seemed the server just could not handle the testing data that big.

I decided to cut down the number of catalog price rules from 20 to 2, categories from 6000 to 60, customers from 10000 to 100 and orders from 16000 to 1500. I made certain edits to extra_large profile and restarted setup:perf:generate-fixtures.

This time it went OK and now I have 1,400,000 products in Magento 2:

1 million SKUs

Speed Measurements

Now it is time to feel 1 million products. I have to say I put store in production mode and enabled all cache options.

We will be measuring server response time or time to first byte. Full page load time depends on network capacity and can be different from computer to computer.

Admin Panel

Backend seems fast. TTFB of Dashboard page is 1.37 sec:

Dashboard-TTF

Catalog > Products takes 2.12 sec:

Catalog-TTFB

Catalog > Categories takes a bit more, 3.43 sec:

Catalog-Category-TTFB

Frontend Performance

Storefront is not so fast. Of course Full Page Cache helps but for the sake of an experiment I will turn it off:

FPC is off

We are using the default Magento 2 Luma theme.

Homepage responds in 846 ms:

Homepage-TTFB

Category page responds in 10,03 sec:

Category-TTFB

Adding a configurable product to a cart takes 1.34 sec which is alright:

Add to cart TTFB

Takeaway

Magento 2 can easily handle more than 1 million products. Frontend speed is bearable and backend seems fast enough.

Reindex process does take time, in my case it was around an hour for all indexers to finish.

PS: Check out the article where I loaded WooCommerce with 1 million products and compared its performance to Magento 2.

[转]Magento 2 and 1 Million Products的更多相关文章

  1. Searching for Approximate Nearest Neighbours

    Searching for Approximate Nearest Neighbours Nearest neighbour search is a common task: given a quer ...

  2. 近年Recsys论文

    2015年~2017年SIGIR,SIGKDD,ICML三大会议的Recsys论文: [转载请注明出处:https://www.cnblogs.com/shenxiaolin/p/8321722.ht ...

  3. magento添加多个产品到购物车(Add multiple products to cart )

    Step  1app\design\frontend\base\default\template\catalog\product\list.phtml<?php    $_productColl ...

  4. MAGENTO - APACHE SOLR INTEGRATION - PART II (SETUP)

    MAGENTO - APACHE SOLR INTEGRATION - PART II (SETUP) Tue, 03/01/2011 - 18:30 Tweet Development E-Comm ...

  5. Magento开发常用方法

    这里是我做Magento开发常用到的方法,现在总结出来,后续会把更多有用的方法总结出来. 1.直接操作数据库 查找数据:$read = Mage::getSingleton("core/re ...

  6. magento app开发遇到的问题及解决

    今天一直在解决Magento的APP接口调用数据异常的问题,调用/api/rest/category/:id 这个接口的时候,返回的所有目录的数据是一样的,原始代码是这样的. 1)请求地址 /api/ ...

  7. Magento SSH 下载安装

    http://www.magentocommerce.com/wiki/1_-_installation_and_configuration/installing_magento_via_shell_ ...

  8. 如何迁移测试的MAGENTO到正式运行的MAGENTO

    或者这个题目叫做如何改变MAGENTO的运行目录 第一,我们需要在PHPMYADMIN备份整个MAGENTO的数据.备份数据并且存为.SQL. 在这儿假设你的测试网站在http://dev.site. ...

  9. magento问题集

    magento产品页面价格出现2遍 In app\design\frontend\default\default\template\catalog\product\view\type\Simple.p ...

随机推荐

  1. 测试pc大、小端

    判断计算机的大.小端存储方式 1 int main() { ; char* p=(char*)&a; ) printf("little\n");//小端存储:高位存在地地址 ...

  2. mssql中按周进行表分区的方法

    创建一个包含了一个持久化计算列的表,类似于下面.然后以这个列作为分区的依据. CREATE TABLE [dbo].[test] ( ) NOT NULL , [time] [DATETIME] NU ...

  3. ASP.Net MVC OA项目笔记<一>

    1.1.1 新建空白解决方案CZBK.ItcastOA 1.2.1 添加类库 1.2.2 同上添加多个类库 生成的 class1.cs先不用删除,删了的后,后面可能没办法直接点引用 1.3.1 添加表 ...

  4. 使用Charles对Android App的https请求进行抓包

    本文背景 公司新项目要求抓取目前市面上一些热门App的数据,经过研究发现很多App的网络请求都使用https进行数据传输,这样问题就来了,http使用明文传输所有请求都能拦截到,而https请求无法拦 ...

  5. iOS-项目开发1-图片浏览器

    FFBrowserImageViewController 自定义的图片浏览器:支持图片双击放大,单击取消,拖动取消. 重点: 1:在iOS11之后再布局是要将UIScrollViewContentIn ...

  6. 回车符与换行符问题——C语言

    回车符(carriage return,’\r’)与换行符 (line feed,’\n’) 从上面可以看出换行对应的ASCII码值是10,回车符对应的ASCII码值是13,需要注意的是用户按下回车键 ...

  7. Java - Tips

    001 - Java中print.printf与println的区别? printf:格式化输出,用来控制输出的格式. print:标准输出,不换行. println:标准输出,换行.例如,print ...

  8. Vue.js之下拉列表及选中触发事件

    老早就听说了Vue.js是多么的简单.易学.好用等等,然而我只是粗略的看了下文档,简单的敲了几个例子,仅此而已. 最近由于项目的需要,系统的看了下文档,也学到了一些东西. 废话不多说,这里要说的是下拉 ...

  9. D01-R语言基础学习

    R语言基础学习——D01 20190410内容纲要: 1.R的下载与安装 2.R包的安装与使用方法 (1)查看已安装的包 (2)查看是否安装过包 (3)安装包 (4)更新包 3.结果的重用 4.R处理 ...

  10. 将Python项目打包成EXE可执行文件(单文件,多文件,包含图片)

    解决 将Python项目打包成EXE可执行文件(单文件,多文件,包含图片) 1.当我们写了一个Python的项目时,特别是一个GUI项目,我们特备希望它能成为一个在Windows系统可执行的EXE文件 ...