Skip to content

Magento2 Performance

Preparing clean Magento 2 store for performance testing

1) Download magerun (wget https://files.magerun.net/n98-magerun2.phar), you can read more about it here

Note

Make sure clean database installation throws no errors, otherwise fixtures might fail at some point in the process

2) Execute this command ./n98-magerun2.phar install --noDownload --installationFolder=/path/to/project/root. This will create and install clean Magento database.

3) Execute php bin/magento setup:performance:generate-fixtures /path/to/project/root/setup/performance-toolkit/profiles/ce/large.xml. Instead of large profile you can choose from small, medium, medium_msite and extra_large.

Creating custom profile

You can copy existing profile and modify it's number to your needs. To do that follow commands below:

cd /path/to/project/root/setup/performance-toolkit/profiles/ce/
cp large.xml custom-profile.xml
vim custom-profile.xml # or open it in any other editor and modify it to your needs.

For example to change simple products generation of 300k products to xxx you would need to modify this xml node <simple_products>xxxxxxx</simple_products>

Decreasing Magento 2 load time

Magento 2 out of the box load times can still be effectively decreased, by disabling core Magento extenions which might never be used for your store administrators. Here is an article about how to disable extensions that you don't need.