Contents
Overview of performance testing data
To use the Magento performance toolkit or another tool for performance testing, you must generate a large amount of data (for example, stores, categories, products, and so on).
You can adjust the amount of data you create using profiles (small, medium, large, and extra large). The next section discusses profiles in more detail.
The following figure shows how a product displays on the storefront using the small profile:
This gives you an idea about what the data looks like.
First steps
-
Log in to the Magento server as, or switch to, a user who has permissions to write to the Magento file system. One way to do this is to switch to the Magento file system owner.
If you use the bash shell, you can also use the following syntax to switch to the Magento file system owner and enter the command at the same time:
su <Magento file system owner> -s /bin/bash -c <command>
-
To run Magento commands from any directory, add
<your Magento install dir>/bin
to your systemPATH
.Because shells have differing syntax, consult a reference like unix.stackexchange.com.
bash shell example for CentOS:
export PATH=$PATH:/var/www/html/magento2/bin
You can also run the commands in the following ways:
cd <your Magento install dir>/bin
and run them as./magento <command name>
php <your Magento install dir>/bin/magento <command name>
<your Magento install dir>
is a subdirectory of your web server's docroot. Need help locating the docroot? Click here.
In addition to the command arguments discussed here, see Common arguments.
About profiles
The following table provides details about the data generator profiles (small, medium, large, and extra large).
Profiles are located in <your Magento install dir>/setup/performance-toolkit/profiles/<ce or ee>
For example, /var/www/html/magento2/setup/performance-toolkit/profiles/ce
Parameter | Small profile | Medium profile | Large profile | Extra large profile |
---|---|---|---|---|
websites |
1 |
1 |
3 |
5 |
store_groups |
1 |
2 |
3 |
5 |
store_views |
1 |
2 |
3 |
5 |
simple_products |
800 |
16,000 |
400,000 |
800,000 |
configurable_products |
50 |
1,000 |
25,000 |
50,000 |
categories |
30 |
300 |
1,000 |
3,000 |
categories_nesting_level |
3 |
3 |
3 |
6 |
catalog_price_rules |
10 |
20 |
50 |
100 |
catalog_target_rules |
2 |
5 |
10 |
50 |
cart_price_rules |
10 |
20 |
50 |
100 |
cart_price_rules_floor |
2 |
2 |
2 |
5 |
customers |
20 |
200 |
2,000 |
5,000 |
tax rates |
40,000 |
40,000 |
40,000 |
40,000 |
orders |
80 |
1,600 |
40,000 |
80,000 |
Run the data generator
Run the command as discussed in this section. After the command runs, it rebuilds indexers.
Command options:
magento setup:perf:generate-fixtures {path to profile}
where <path to profile>
specifies the absolute file system path to and name of a profile.
For example,
magento setup:perf:generate-fixtures /var/www/html/magento2/setup/performance-toolkit/profiles/ce/small.xml
Sample output for the small profile:
Generating profile with following params:
|- Websites: 1
|- Store Groups: 1
|- Store Views: 1
|- Categories: 30
|- Simple products: 800
|- Configurable products: 50
|- Customers: 20
|- Cart Price Rules: 10
|- Catalog Price Rules: 10
|- Orders: 80
Generating websites, stores and store views... done in <time>
Generating categories... done in <time>
Generating simple products... done in <time>
Generating configurable EAV variations... done in <time>
... more ...
Find us on