Summary
Production /status?full=true shows the Solr queryResultCache is undersized for the workload. filterCache is sized correctly (99.8 % hit ratio, no evictions), so the same workload is mostly variation in the q clause that queryResultCache is supposed to absorb.
Evidence
| Cache |
Hit ratio |
Size |
Lookups |
Hits |
Evictions |
filterCache |
0.998 |
74 |
43,030 |
42,956 |
0 |
queryResultCache |
0.565 |
512 |
749,258 |
423,353 |
317,758 |
A 56 % hit rate on a cache that has evicted 317 K entries strongly suggests the working set is much larger than the configured 512 slots.
Suggested action
In solrconfig.xml (managed in the Helm chart, not this repo), bump queryResultCache to:
<queryResultCache class="solr.search.CaffeineCache"
size="4096"
initialSize="2048"
maxRamMB="512"
autowarmCount="0"/>
Using maxRamMB rather than (or in addition to) size bounds the cache by memory rather than entry count and is generally more robust.
How to verify after deploy
Hit /status?full=true after the change and a soak period:
solr.cache.queryResultCache.size reflects the new ceiling
solr.cache.queryResultCache.hitratio rises (target: > 0.85)
solr.cache.queryResultCache.evictions rate per hour drops sharply
Summary
Production
/status?full=trueshows the SolrqueryResultCacheis undersized for the workload.filterCacheis sized correctly (99.8 % hit ratio, no evictions), so the same workload is mostly variation in theqclause thatqueryResultCacheis supposed to absorb.Evidence
filterCachequeryResultCacheA 56 % hit rate on a cache that has evicted 317 K entries strongly suggests the working set is much larger than the configured 512 slots.
Suggested action
In
solrconfig.xml(managed in the Helm chart, not this repo), bumpqueryResultCacheto:Using
maxRamMBrather than (or in addition to)sizebounds the cache by memory rather than entry count and is generally more robust.How to verify after deploy
Hit
/status?full=trueafter the change and a soak period:solr.cache.queryResultCache.sizereflects the new ceilingsolr.cache.queryResultCache.hitratiorises (target: > 0.85)solr.cache.queryResultCache.evictionsrate per hour drops sharply