Tune cache values
Applies to |
All Core roles, but particularly Content Delivery |
---|
A Sitecore cache consumes memory based on the amount of data stored in the cache. Cache size defines the maximum application memory the cache can consume. The following instructions apply to all Sitecore caches.
To tune cache values:
-
Ensure that you have set initial cache values before tuning.
-
Start a load test that hits all items in all languages. The load test must run for the duration of the cache tuning exercise.
-
If you are tuning caches for Content Delivery, use your load test to simulate visits to the published site.
-
If you are tuning caches for Content Management, use your load test to simulate visits to the Experience Editor and Content Editor. Ideally, your test should including expanding the Content Tree.
-
-
While the load test is running, browse to the
/sitecore/admin/cache.aspx
page. While tuning the Content Delivery environment, pay particular attention to the following caches:-
web[data] (Data cache)
-
web[item] (Item cache)
-
SqlDataProvider- Prefetch data(web) (Prefetch cache)
When tuning the Content Management environment, pay particular attention to the following caches :
-
master[data] (Data cache)
-
master[item] (Item cache)
-
SqlDataProvider- Prefetch data(master) (Prefetch cache)
-
-
To see how caches to react to load, on the
/sitecore/admin/cache.aspx
, click Refresh.NoteOn a Content Delivery server, access to the administrative pages is normally not available. Sitecore saves of copy of the
cache.aspx
page every ten minutes in theApp_Data\diagnostics\health_monitor
folder with names such asCacheStatus.20200907Z.131237Z.html
where20200907Z.131237Z
is a time stamp. You can use these snapshots instead.NoteThe maximum amount of memory that you can assign to caches depends on the amount of memory available in the system.
-
If the size of the cache is consistently more than 80% of the maximum cache size, increase the size of the cache by 25%.
-
If the size of the cache remains less than 50% of the MaxSize, decrease the size of the cache by 25%.
-
If the cache Delta fluctuates significantly, increase the size of the cache by 25%.
NoteSignificant fluctuations in the cache delta indicates that the cache is regularly exceeding max size and being scavenged. A cache is scavenged by half (half of the cache entries are removed) when it exceeds maximum.
-
-
Repeat the previous step until the caches are stable. A cache is considered stable when the Delta value remains relatively consistent.