Skip to content

Add query cache hit count and field data cache hit count to rest API #48645

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
clandry94 opened this issue Oct 29, 2019 · 10 comments · Fixed by #60114
Closed

Add query cache hit count and field data cache hit count to rest API #48645

clandry94 opened this issue Oct 29, 2019 · 10 comments · Fixed by #60114
Labels
:Data Management/CAT APIs Text APIs behind /_cat >enhancement good first issue low hanging fruit Team:Data Management Meta label for data/management team

Comments

@clandry94
Copy link

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

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

@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-features (:Core/Features/CAT APIs)

@jtibshirani
Copy link
Contributor

As a point of clarification -- it seems the node stats API returns this information, but it is not available in the cat nodes API.

@martijnvg martijnvg added the good first issue low hanging fruit label Oct 30, 2019
@samz007
Copy link

samz007 commented Nov 3, 2019

@clandry94 I am a beginner in open source contributions, Can I start working on this?

@clandry94
Copy link
Author

@samz007 sure 🙂 feel free to comment if you have any questions and I can try to help out.

@abhishek8gupta
Copy link

Is anyone picking up this one? or can I pick up? I am beginner to ES group.

@samz007
Copy link

samz007 commented Nov 6, 2019

@clandry94 Started working on this issue. Thanks.

@ak-24
Copy link

ak-24 commented May 8, 2020

Is this issue still open and unassigned ?

@clandry94
Copy link
Author

I won't have time to work on this for the foreseeable future, so if someone else would like to grab it feel free 😄

@parthpunkster
Copy link
Contributor

Can I start working on this one?

@Priya-Raut
Copy link

Is this issue still unassigned? Can I start working on it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Data Management/CAT APIs Text APIs behind /_cat >enhancement good first issue low hanging fruit Team:Data Management Meta label for data/management team
Projects
None yet
10 participants