Optimizing Sitecore Performance on Azure PaaS – Part 1

Posted by

So we have mostly finished the project for client, everything is deployed and everything works as we expect it to work. Things need to go to production, but before that we need to see if we can optimize performance.

In my company we usually start with this early on the shared DEVELOPMENT environment. That way we get a head start and are able to tune everything in their near maximal potential. I’m going to publish this guide in multi part. So lets start.

First we want to check Sitecore cache values. After env. has been in use for some time, cache has been build and we can check status of those. To do that we first go to:

/sitecore/admin

Click on the Cache. This will open up a cache windows. Click Refresh on that window and page will get populated with all the cache objects, their current value and ther setuped max. value. You will see something like this:

What we need to look this is two columns, Size, which show us current size of the cache, and MaxSize, which shows us whats the maximum size allowed by configuration. There are a lot of cache objects displayed here, but we will concentrate only on a few that we can benefit from.

First, we build up this patch file:

Under (1) we set cache sizes for master and web database. Caches included are data, items, paths, itempaths and standardValues cache. In this instance, on my env., cache for data was hitting a maximum of 100MB set before. So i increased it to 250MB and will monitor the sizes in the future. Under (2) you define on which roles you want this to be patched. As an example, Content Delivery should not have access to master database so you don’t want that on the Content Delivery server.

If everything is setuped ok, more cache size will increase the performance. On the other hand, more cache means a higher impact on the startup times, but you will benefit from it on the long run. This will also mean less database calls which will end up in less database calls and faster response of the env. overall.

In this first step i also do the following things, especially when we have Sitecore deployed on Azure PaaS infrastructure.

Under (1) we are setting up intervals for Publish and Event Queues. This queues can grow large and can cause large performance hits, especially with default settings of 30 days. We changed that here to be cleaned every 1 day. You can increase or decrease this value based on how much your env. is being used.

Under (2) we increased interval for UpdateListOperationsAgent so it’s not being run every couple of minutes which on smaller size App Services can cause a performance hit.

Under (3) we put index agents for core and master to never automatically build those indexes. You need to be very careful here as this can be counter productive for your env.

In Part 2 we will go over some other cache settings that we can change and also some other settings we can switch to increase overall performance of Sitecore.