Magento – Improve performance – Catalog Search Fulltext

catalogsearchindexermagento-2.1magento2performance

Do you have some suggestion how can I improve the performance of the catalogsearch_fulltext indexer for Magento 2.1.X

I already set this indexer to 'Update By Schedule' so only the updated products are refreshed thanks to Mview pattern.

I have ElasticSearch as search engine, but it is not really related to it.

I have around

  • 20k products
  • 7k products visible in search by store
  • 31 stores
  • less than 10 new custom searchable attributes

For a full re-index, Magento took around 10 minutes by stores, so around 5 hours for all stores.

I plan to re-index each store in parallel and increase the server CPU and memory because each catalog search index seems independent by stores.

I try to import products with a differential approach, but sometime my customer needs a full product import.

Edit: I did a POC thanks to https://github.com/amphp/parallel reducing from 5 hours to 14 min using the c5.9xlarge EC2 instance with 36vCPU. But I want to know if there is alternative solution. (>1000$ per month)

Best Answer

Try to upgrade to the latest version (2.2.5). As I can see in the changelog (https://devdocs.magento.com/guides/v2.2/release-notes/ReleaseNotes2.2.5CE.html#indexing) they optimized the search indexer in order to be multithreaded. Try to upgrade to 2.2.5 your local environment and test if it's worth to upgrade to 2.2.x because we know that it's not simple to upgrade from 2.1.x to 2.2.x if you have a lot of custom modules.

Related Topic