本文转自: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. Python自动化开发 -进程、线程和协程(二)

    本节内容 一.线程进程介绍 二. 线程 1.线程基本使用 (Threading) 2.线程锁(Lock.RLock) 3.信号量(Semaphore) 4.事件(event) 5.条件(Conditi ...

  2. [mysql] mysql 查询语句收集

    // 1. 筛选出当天的中奖名单            $where = " date_format(f_ctime,'%Y-%m-%d') = current_date()"; ...

  3. 国内代码托管平台(Git)

    可以说GitHub的出现完全颠覆了以往大家对代码托管网站的认识.GitHub不但是一个代码托管网站,更是一个程序员的SNS社区.GitHub真正迷人的是它的创新能力与Geek精神,这些都是无法模仿的. ...

  4. golang 本地构建包

    说点废话 为小胖做一个温馨提示的功能,思路已经整理好.今天使用goquery的时候,发现已经修改了.其中需要一个golang.org/x/net/html这个包,但是官网已经被万恶的GFW给墙了.这里 ...

  5. Windows核心编程:第11章 Windows线程池

    Github https://github.com/gongluck/Windows-Core-Program.git //第11章 Windows线程池.cpp: 定义应用程序的入口点. // #i ...

  6. 用WPF写一个登录界面,我想在输入完密码后按回车就能够验证登陆,而不需要用鼠标单击登陆按钮

    在wpf中,将按钮的IsDefault设置为true ​​​​

  7. 【计算机网络】网络层学习笔记:总结IP,NAT和DHCP

    前言:这篇文章是学习网络层协议时候总结的笔记,前面的主要部分介绍的都是IP协议, 后半部分介绍NAT协议和DHCP协议 参考书籍 <计算机网络-自顶向下>       作者 James F ...

  8. skynet inject address file.lua

    inject d test/inject_fuck.lua -- d 是服务的 handle 拿 simpledb.lua 举例,修改如下 local skynet = require "s ...

  9. flask加vue 动画 加载更多

    曾经使用flask_paginate(地址:https://blog.csdn.net/qq_42239520/article/details/80378095)进行分页,现在又想新的想法,怎么才能和 ...

  10. 网络Socket编程TCP协议例子

    1.单线程TCP服务端 public class TcpChatServer { private Integer port=8000; private ServerSocket serverSocke ...