Optimizing Sitecore Indexing Performance – Part 3

Part 1 | Part 2 | Part 3

In the last part of this series, I will cover a few more strategies that you can adopt to improve indexing performance of your Sitecore solution. If you have not read the earlier parts, you can read from the links above.

Use the right index update strategies

Use index update strategies that are appropriate for the database. As a general rule of thumb, use the following:

  • CoreintervalAsyncCore which by default updates the index every one minute
  • MastersyncMaster (default) or intervalAsyncMaster. On environments where you have high volume of content authoring, I have found that intervalAsyncMaster with a one minute interval puts lower load on the machine than syncMaster. Obviously, this would mean that your content changes will not be available through search for the time interval (1 minute) you have specified.
  • Publishing target (web)onPublishEndAsync which updates the index after a publish

You can find more details on these strategies here.

Disable unwanted indexing pipeline processors

If you do not use any index boosting functionality in your solution, you can remove the pipeline processors used for this capability – specifically the ones from indexing.resolveFieldBoost and indexing.resolveItemBoost pipelines. This will contribute towards speeding up the indexing.

<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/"> 
  <sitecore>
    <pipelines>
      <indexing.resolveFieldBoost>
        <processor type="Sitecore.ContentSearch.Pipelines.ResolveBoost.ResolveFieldBoost.SystemFieldFilter, Sitecore.ContentSearch">
          <patch:delete />
        </processor>
        <processor type="Sitecore.ContentSearch.Pipelines.ResolveBoost.ResolveFieldBoost.FieldDefinitionItemResolver, Sitecore.ContentSearch">
          <patch:delete />
        </processor>
        <processor type="Sitecore.ContentSearch.Pipelines.ResolveBoost.ResolveFieldBoost.StaticFieldBoostResolver, Sitecore.ContentSearch">
          <patch:delete />
        </processor>
      </indexing.resolveFieldBoost>

      <indexing.resolveItemBoost>
        <processor type="Sitecore.ContentSearch.Pipelines.ResolveBoost.ResolveItemBoost.ItemLocationFilter, Sitecore.ContentSearch">
          <patch:delete />
        </processor>
        <processor type="Sitecore.ContentSearch.Pipelines.ResolveBoost.ResolveItemBoost.StaticItemBoostResolver, Sitecore.ContentSearch">
          <patch:delete />
        </processor>
        <processor type="Sitecore.ContentSearch.Pipelines.ResolveBoost.ResolveItemBoost.LocalRuleBasedItemBoostResolver, Sitecore.ContentSearch">
          <patch:delete />
        </processor>
        <processor type="Sitecore.ContentSearch.Pipelines.ResolveBoost.ResolveItemBoost.GlobalRuleBasedItemBoostResolver, Sitecore.ContentSearch">
          <patch:delete />
        </processor>
      </indexing.resolveItemBoost>
    </pipelines>
  </sitecore>
</configuration>

Configure index optimization for all indexes

Sitecore comes with an agent to optimize Lucene indexes. The default configuration has sitecore_master_index optimized at periodic intervals. Add all other indexes in your solution to this agent, so that indexes are periodically optimized.

<agent type="Sitecore.ContentSearch.Tasks.Optimize" method="Run" interval="01:00:00">
  <indexes hint="list">
    <index>sitecore_master_index</index>
    <!-- Add other indexes here -->
  </indexes>
</agent>

Adjust indexing settings

And finally, there are some indexing settings that you can play with and arrive at the optimal configuration for your Sitecore solution. These settings are present in Sitecore.ContentSearch.config and Sitecore.ContentSearch.Lucene.DefaultIndexConfiguration.config files. Documentation about these settings is available as comments in the config files.

  • Indexing.DisableDatabaseCaches
  • ParallelIndexing.Enabled
  • ParallelIndexing.MaxThreadLimit
  • ConcurrentMergeSchedulerThreads
  • IndexMergeFactor
  • MaxDocumentBufferSize
  • MaxMergeDocs

Conclusion

Many of the optimization approaches described in this series can also be applied for other Sitecore indexing providers such as Solr or Coveo.

Here is a patch configuration file that you can use as a template to optimize your indexes. It covers some of the approaches that I have described. DO NOT use this config file as-is in your environment; modify it as per your needs.

Hope these posts have been helpful !! Do share additional index optimization approaches you have adopted in your implementations through comments below.

Advertisements

2 thoughts on “Optimizing Sitecore Indexing Performance – Part 3

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s