Reduce the number of index update jobs


Description

Sitecore CMS/XP uses index update strategies to keep search indexes up-to-date.

Index update strategies queue index update jobs that perform the actual update:

INFO Job started: Index_Update_IndexName=sitecore_master_index

The presence of the index name in the name of the job means that:

In environments with frequent content changes, the synchronous index update strategy might not be able to keep up with the changes because it creates a separate update job for each item change.

Switching to Interval Asynchronous index update strategy allows you to optimize resource consumption and speed up index update operations.

Solution

  1. Check if there are any index update jobs that are triggered too frequently. There are two ways to do this:
    • Using the /sitecore/admin/jobs.aspx page.
      The page shows a list of Running, Queued, and Finished jobs. Check the list of queued jobs to see if the same job is queued many times in a short period of time.
    • Using Sitecore log files.
      Check how frequently an index update job with a particular index name is triggered, for example:
      INFO Job started: Index_Update_IndexName=sitecore_master_index
  2. Find the index update strategy that corresponds to the affected search index(es), for example:
    <index id="sitecore_master_index" ...>
      ...
      <strategies hint="list:AddStrategy">
        <strategy ref="contentSearch/indexConfigurations/indexUpdateStrategies/syncMaster" />
      </strategies>
      ...
    </index>
  3. Switch from the Synchronous to Interval Asynchronous index update strategy:
    <strategy ref="contentSearch/indexConfigurations/indexUpdateStrategies/intervalAsyncMaster" />
  4. Tune the interval of the strategy, if necessary:
    <intervalAsyncMaster type="Sitecore.ContentSearch.Maintenance.Strategies.IntervalAsynchronousStrategy, Sitecore.ContentSearch" ...>
      <param desc="database">master</param>
      <param desc="interval">00:00:05</param>
      ...
    </intervalAsyncMaster>

Notes

Check the known issue about frequent rebuilds of the sitecore_suggested_test_index to see if it is applicable to your version of Sitecore XP.