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
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
·
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
· 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
Post a Comment