Skip to main content

Sitecore Performance Improvement Plan | Maintenance Plan


Sitecore Performance Improvements
   
This article contains a list of items that you should investigate if your Sitecore installation is experiencing poor performance. You can also investigate these before putting your Sitecore website into production.
         
Perform below activities in production environment to improve performance of   site. Please take database backup before performing below steps.

1.      Rebuild Solr indexes  ( Weekly/Monthly )
·         Login into Sitecore CMS.
·         Open Sitecore Control Panel from Dashboard.
·         Click on “Indexing manager” from indexing section and perform the operation as below.
·         Rebuild Master and preview database 
·         Rebuild Web, Core and other index 

2.      Empty Sitecore Recycle Bin (Weekly)
·         Login into Sitecore CMS.
·         Open Recycle bin and Empty all items from there.


3.      DB cleanup using SiteCore UI (Weekly)
·         Login into Sitecore CMS.
·         Open Control Panel from Dashboard
·         Click on “clean up databases” from database section.
·         Select one by one all database (Master, Preview, Web and core ) and perform clean up.


4.      Rebuild link databases (Weekly)
·         Login into Sitecore CMS.
·         Open Control Panel from Dashboard
·         Click on “Rebuild link databases” from database section.
·         Select one by one all database (Master, Preview, Web and core) and perform clean up.


5.      Rebuild DB indexes ( Weekly/Alternate Day )
·         Create two jobs in Database and configure database as below to rebuild the index.
·         Build_Index_Weekly – Configure  web , core and other database to rebuild the index weekly
·         Build_Index_AlternateDay – Configure  master  and preview to rebuild the index alternate day

6.      Database Shrink ( Weekly )
·         Login into SQL management studio
·         Select one by one all database
·         Click on Tasks and shrink the database as below
·         Alternatively, we can create a job for same purpose, which will be executed weekly. 



7.      Purge Data from Table ( Weekly )
Cleanup the following tables from the artifact data. It is safe to completely truncate them before publishing your website. All of these tables should be automatically cleaned up on a periodic basis. Validate in Sitecore.config files.
·         History – cleaned up by Sitecore.Tasks.CleanupHistory agent
·         PublishQueue – cleaned up by Sitecore.Tasks.CleanupPublishQueue agent
·         EventQueue – cleaned up by Sitecore.Tasks.CleanupEventQueue
            Note: Alternatively, you can write a job to do this activity, weekly
·         History
·         Publish Queue
·         Event Queue
8.      Database Strategy Full to Simple

·         Login into SQL Server management studio
·         Select one by one all database
·         Right Click on database and Click on properties
·         Click on Option and select Simple from “Compatibility level” section


9.      Optimize Sitecore caches.
·         Increase and tune the size of the data, items, and prefetch caches. Bigger caches = better performance. Increase carefully. Take a help of CacheViewer tool.
·         Always use HTML caching and make almost all the renderings on the site cacheable. Then tune the size of HTML caches.
·         Tune the sizes of other caches if they are reaching their threshold.
·         Tune or disable initial prefetching. Do not disable the actual prefetch caches — you should only increase their size. This can affect startup times.

10.  Sitecore Client specific optimizations
·         Make sure that content authors never use Full publish — they should only use Smart or Incremental publishing.
·         Enable content expiration in IIS. In that case the web browsers won't request all the static files from the server second time until their expiration date is passed. Sitecore Client uses a lot of static files.
·         Enable static HTTP content compression in IIS.
·         Enable dynamic HTTP content compression in IIS. This speeds up both the Sitecore client and the public web site and is especially beneficial in environments with a low bandwidth.
·         Set the ContentEditor.RenderCollapsedSections setting to False. This is a hidden setting that is set to True by default. Changing this setting can help a lot.
·         Set the ContentEditor.CheckHasChildrenOnTreeNodes and the ContentEditor.CheckSecurityOnTreeNodes settings to False. Changing these settings doesn’t normally help much, but you should still test whether or not this helps.
·         Check long running validators and disable any default validators that you don’t need. They are often the cause of bad performance.
·         Do not show Standard Fields in Content Editor. Uncheck the check box from View menu. It will help to load item faster.
·         Limit the number of items that share the same parent to 100 items per parent.
·         Cleanup obsolete versions and ensure they do not grow unrestricted – we do recommend to have no more than 5-10 versions per item in Master database. Use the Version Manager shared source tool for this. http://marketplace.sitecore.net/en/Modules/Version_Manager.html
·         Disable search indexes if you don't use them. Set Indexing.UpdateInterval to 00:00:00.
·         Set Value of Caching.AccessResultCacheSize to 0 if do not need to check access rights for any user

11.  Scale up the Core database
Links table of Core database is grown and it has more records then to reduce the    load on your Core Database/Link table, please scale up the core database. You may follow below steps to scale up.

A)     Database:
·         Take up a backup of database “[lift_sitecore_core]”
·         Create one new  database in prod env and Name it like :  lift_sitecore_links
·         Insert all links table data into new database
·         You may use query :       
select * into [lift_sitecore_links].[dbo].[Links] from [lift_sitecore_core].[dbo].[Links]
·         Execute count query in both database and match the count
Select count(*) from [lift_sitecore_core].[dbo].[Links]
Select count(*) from [lift_sitecore_links].[dbo].[Links]

B)     Sitecore Config :
        ·         Add a node in connectionstring file :
<add name="links" connectionString="user id=saccount; password=test; Data Source=SCPRODDB; Database= lift_sitecore_links " />
·         Update entry in Sitecore.config
<LinkDatabase type="Sitecore.Data.$(database).$(database)LinkDatabase, Sitecore.Kernel">
  <param connectionStringName="links" />
 </LinkDatabase>
·         Repeat steps 5 & 6 in all environments ( Prod CMS, Preview , CD1 & CD2)

C)      Database :
·         Truncate table Links from database [lift_sitecore_core] 

12.  Non-Cluster Index
·         If Notification databse has, very huge data and taking time to load then consider to create new “Non_Cluster” index.
CREATE NONCLUSTERED INDEX [Notifications_Multi_idx] ON [dbo].[Notifications]
([ItemId], [Processed], [Language], [Version], [InstanceType]) INCLUDE ([Id], [InstanceData], [Created])

As per this kb article - https://kb.sitecore.net/articles/850390
·         VersionedFields database has very huge data then create index for that too.
CREATE NONCLUSTERED INDEX [VersionedFields_Multi_idx]
ON [dbo].[VersionedFields] ([FieldId])
INCLUDE ([ItemId],[Language],[Version],[Value])

13.  Other Config changes(as recommended) :
·         Disable WebDAV config
·         Disable Memory Monitor
·         Disable Performance Counters
·         Set log4net from ‘Info’ to ‘Error’ and limit the size of log files


For more info visit cache-tuning document:


Comments

Popular posts from this blog

Sitecore Publishing target and Solr Configuration

Creating a new publishing target is very helpful if your Sitecore environment is setup in multiple content delivery servers. We can publish data from Master database to one or more publishing target databases. Main thing to notice here is Master database contains all versions of any content or assets while publishing target database contains single latest version for each language.      This post aims to provide systematic instructions to set up publishing target. It comprises of a target database (where the content will be published) and publishing target definition item in master database that points to that target database.             Post creation of publishing target need to take care of Solr configuration. This post cove master slave Solr configuration and onPublishEndAsync strategy. We are using 1 Solr Master instance and 6 Slave instance (2-EU, 2-Ap, 2- NA).     1   So...

Setup Sitecore Habitat v9.0 project in simple way

In this article , I would describe how to setup the Sitecore habitat V9.0 project with Sitecore Experience Platform 9.0 rev in very simple way. I used below system configuration to setup this project: 1. Windows 10 (32/64-bit) 2. IIS 10.0 3. .NET Framework 4.6.2 4. Microsoft Visual Studio 2017 5. Microsoft SQL Server 2017 6. Solr 6.6.2 7. Microsoft PowerShell® version 5.0 8. Web Platform Installer 5.0. 9. Web Deploy 3.6 for Hosting Servers 10. Node-v8.9.4-x64 Follow below steps to setup the project. A).   Habitat require Sitecore instance. Setup the clean Sitecore 9.0 instance. Ex : http://demo.local.com , Directory location : C:\inetpub\wwwroot\demo.local.com   For more info visit -   https://dev.sitecore.net/ B). Download the Habitat V9.0 project from Github site :  https://github.com/Sitecore/Habitat/     Note  :  When you download the packages, it is possible that the .ZIP packages are marked as blocke...

Web Deploy setup and configuration with Sitecore

Web Deploy empowers Visual Studio and WebMatrix to help developers streamline the deployment of Web applications to Microsoft IIS Web servers or to Microsoft Azure Websites. In addition, integration with Web Platform Installer allows developers to simply and easily install community webapplications.   This post describe the installation of Web Deploy and Configuration with Sitecore instance.  This post will be very useful if you want to sync your Sitecore media items with all of the CD's environment (Distributed environment) . In one of my previous project, I was keeping all the media items in file system and synchronizing all the files from CM to Cd's server. This solution is tested with 1 CMS and 6 CD's server (2-EU, 2- NA, 2- AP) with more than 5 Lakh files.  1.       Software Pre-requisites           a.       OS – Window 7/ Windows Server 2008 R2 Enterprise       ...