Cache thrashing
Cache thrashing is a phenomenon whereby evictions remove cache entries prematurely and force additional database reloads that are detrimental to performance. There are several cases that can lead to cache thrashing:
- A single data set can be too large to reside in the global cache. This forces the server to load the same data from the database and subsequently evict the data, potentially thousands of times, while loading a single web page. This results in serious performance issues.
- Some concurrent actions result in thrashing. For example, a user logs onto a server
that has the
batchserver role. A batch job, which can load many objects into the cache, can remove objects from the cache. This forces the server to reload the cache as the user again needs those objects. For this reason, Guidewire recommends that you have separate servers for handling batch processing and user interface transactions.
If an individual cache reports hundreds or thousands of evictions and a low cache hit rate, then that cache is experiencing cache thrashing. If you notice cache thrashing on a server that is not processing batch jobs, re-size the cache. Otherwise, dedicate the server to batch jobs.
