The Community platform uses in-memory caching to increase a site performance. At times you may need to monitor and adjust the size of the cache. It is recommend to periodically monitor the size of the cache to ensure settings are optimal.
The cache size can be set by going to Administration->Site->Cache.
To set an optimal value for the cache size, you will need monitor your community during peak hours for an extended period of time. Follow the steps below to help determine a value for the cache size:
- Start a short cache monitoring session to determine how much your site is currently using. If the values are close to the max on the web servers, you may consider adjusting.
- Take note of the average maximum size being used across the web nodes and set the cache size (Administration->Site->Cache) to a value 2-3X the value from the previous step. This is to allow for growth and finding a new cache size value.
- Start a new cache monitoring session (or continue the current if still monitoring) and monitor the cache for an extended period of time.
- Take note of the average memory size during this monitoring period and increase it by 25%. This will be your new value.
Note: If the values are close to the maximum again, restart the process with a cache value high enough to allow for growth during monitoring.
- Set the new value (Administration->Site->Cache) and periodically monitor during peak periods to see if additional adjustments are necessary.
Things to consider:
- A cache that is highly utilized is a good thing and not always a signal it needs to be increased in size. The process (above) of evaluating the size over a period of time is to determine if the size needs to be increased.
- Content will continue to stay in the cache as long as its requested. If there is no request for an time for 30 minutes, it will be ejected.
- The size of the cache may go over the maximum for a period of time.
- Continually check these settings as your community continues to grow.
You can monitor the cache by going to Administration->Monitoring->Cache. Start a monitoring session by clicking the start.
The monitoring session includes the following:
- Server List - A list of all servers (web and job) running the community. Unchecking a server from this list removes the metrics from this server for all reports during the current session.
- Hits and Misses Chart - Reports the number of hits and (green) and misses (red) per server as well as the total number of items cached. A server count can be individually removed by clicking the server name in the X-axis.
- Memory Usage Chart - Reports the amount of memory (in MB) used by the cache per server. A server can be individually removed by clicking the server name in the X-axis.
- Top Hits - Lists the top 50 cache hits and misses during the current session.