4

Can anyone suggest to me how to decide a value for MAGE_INDEXER_THREADS_COUNT?

I am managing a website that has 5 websites, 10 stores, 6 customer groups. I know adding this environment variable can increase indexer performance but I am not able to decide what should be the correct value for the website.

Thanks in advance.

1 Answer 1

1

It depends on how many threads you have in your server, to check if you can run this command below.

nproc

You will see something like this:

MAGE_INDEXER_THREADS_COUNT

Then you can test as I did below, you will see that you can run the reindex process much faster allowing it to run with more threads allocated to it.

MAGE_INDEXER_THREADS_COUNT=$(nproc) php -f bin/magento indexer:reindex

Magento 2 MAGE_INDEXER_THREADS_COUNT

Then you can modify your file env.php to add it.

'x-frame-options' => 'SAMEORGIN',
'MAGE_MODE' => 'production',
'MAGE_INDEXER_THREADS_COUNT' => '40',
'session' => [
    'save' => 'memcache',
    'save_path' => 'tcp://memcache:11211'
],

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.