Improving the performance of instance creation is something we are focused on.
There are a number of things that can be done to improve instance creation performance that may not be obvious at first.
If you are struggling with instance creation or feel instance creation is slow, this guide will help.
Please also feel free to reach out to our support team who can guide you through this process.
1. Recent Code Backup
The first thing to check is that you have a recent code backup. Every time an instance is created MDOQ builds the codebase from this. The more recent the backup the less actions MDOQ has to carry out to bring the codebase up to date.
Code backups can be found at: Live instance > Toolbelt > Snapshots > Code backups > Manage
2. DB Snapshot selection
Within MDOQ there are two types of database backups:
- Sanitized - this contains no sensitive data such as orders or customers
- Full - this contains all data
There are also options to chose prebuilt snapshots (should you wish to test previous versions of the database).
We recommend using the latest sanitized backup whenever possible. If you do need an instance to have a different backup, change it just for that instance.
Database snapshot selection can be configured at: Live Instance > Settings > Mysql
Backup: Latest Sanitized
3. Recent DB Backup
Having a recent database reduces the amount of time to required to run the bin/magento commands. For example if you have recently deployed a new change and haven't got a recent backup, MDOQ with stage this upgrade when creating an instance, adding extra time. (This is good an desirable when testing a development before going live, but not so much when you want to work on the next feature)
Database backups can be found at:
Live instance > Toolbelt > Snapshots > Full DB Backups > Manage
Live instance > Toolbelt > Snapshots > Sanitized DB Backups > Manage
The backup used is configured under: Live Instance > Settings > Mysql > Backup
4. Elasticsearch Snapshot
Elasticsearch snapshots are often overlooked, because you can create an instance without needing them. However when a snapshot doesn't exist, MDOQ will trigger a reindex on the instance to ensure all products show when visiting the instances frontend. A reindex can take a long time depending on the size of your catalog. Similar to Database snapshot, using a snapshot is much faster then a reindex.
Elasticsearch snapshots can be found at: Live instance > Toolbelt > Snapshots > Elasticsearch snapshot > Manage
Please also see: Generating and storing Elasticsearch Snapshots
Still want more speed
If you feel the creation process is still to slow for you please get in touch with our support team who will be happy to work with you on reducing the creation time.
Additional Things To Consider
New Database Backups
The first time a database backup is used to create an instance it will take longer than subsequent roll ups. This is because MDOQ creates a snapshot of the database after importing the backup, this greatly reduces the roll up next time.