-
Notifications
You must be signed in to change notification settings - Fork 25.7k
Description
Describe the feature:
I was investigating cache hit ratios in Elasticsearch clusters recently and noticed that the request_cache has a hit_count and miss_count exposed through the rest API but the query_cache and fielddata cache do not as seen h ere
elasticsearch/server/src/main/java/org/elasticsearch/rest/action/cat/RestNodesAction.java
Lines 157 to 169 in 18f5690
| table.addCell("fielddata.memory_size", "alias:fm,fielddataMemory;default:false;text-align:right;desc:used fielddata cache"); | |
| table.addCell("fielddata.evictions", "alias:fe,fielddataEvictions;default:false;text-align:right;desc:fielddata evictions"); | |
| table.addCell("query_cache.memory_size", "alias:qcm,queryCacheMemory;default:false;text-align:right;desc:used query cache"); | |
| table.addCell("query_cache.evictions", "alias:qce,queryCacheEvictions;default:false;text-align:right;desc:query cache evictions"); | |
| table.addCell("request_cache.memory_size", "alias:rcm,requestCacheMemory;default:false;text-align:right;desc:used request cache"); | |
| table.addCell("request_cache.evictions", | |
| "alias:rce,requestCacheEvictions;default:false;text-align:right;desc:request cache evictions"); | |
| table.addCell("request_cache.hit_count", | |
| "alias:rchc,requestCacheHitCount;default:false;text-align:right;desc:request cache hit counts"); | |
| table.addCell("request_cache.miss_count", | |
| "alias:rcmc,requestCacheMissCount;default:false;text-align:right;desc:request cache miss counts"); |
The values seem to be available within the QueryCacheStats class but not FieldDataStats class so would it make sense to make the QueryCache rest API on parity to the RequestCache rest API? Also having the field data cache hit and miss counts would be very useful as well but seems to be a bit more work to implement.
I can implement these features if it would be useful