-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[Tiered caching][Milestone 1] Exposing a new cache stats API #12258
Labels
Comments
sgup432
added
enhancement
Enhancement or improvement to existing feature or request
untriaged
labels
Feb 8, 2024
Thanks @sgup432 -- I like this approach 👍 Having each cache report its own stats makes a lot of sense (since the cache implementation knows what stats it has and how to structure them). |
Merged
7 tasks
This was referenced Apr 16, 2024
Merged
This was referenced Apr 28, 2024
Closing this issue as all the cache stats PR have been merged. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Is your feature request related to a problem? Please describe
Overview
As part of tiered caching milestone 1(#10870), we are looking to extend IndicesRequestCache with additional caching tiers like disk.
We will need to introduce new stats to expose "per tier" stats in addition to whatever we have.
Current state
Taking IndicesRequestCache as an example, we expose it as part of node indices stats and index stats. It exposes
level
query parameter which can be used to aggregate stats on dimensions like shardId, indices. Examples below:Node stats -
Index stats - Similar to above, just that this is meant to aggregate only at indices level.
Describe the solution you'd like
Maintaining cache stats for respective tiers with key based dimension support
Considering we are introducing new cache interfaces inside OpenSearch which can be used to implement any caching tier like onHeap, disk etc, we can plan to have a new cache stats under node stats. This way any new each cache tier will maintain its own stats decoupling the logic from consumer using these underlying caches.
Backward compatibility: To main backward compatibility, we will continue to support existing indices request_cache stats like the way it exists today.
API Details below.
Cache stats API (new API):
Request
GET /_nodes/stats/caches?pretty
GET /_nodes/stats/caches/<cache_type>?pretty
GET /_nodes/stats/caches/<cache_type>?level=dimension1,dimension2&pretty
Path parameters
Query parameters
request_cache
Response body
Examples:
RequestCache stats, Dimension is shard, tier:
GET /_nodes/stats/caches/request_cache?level=tier,shards&pretty
Related component
Search:Performance
Describe alternatives you've considered
Update the existing Indices request stats to include per tier stats.
Something like
GET /_node/stats/indices/request_cache?pretty
One of the con of this approach is that each consumer(like IndicesRequestCache) will have to handle their own stats writing logic instead of this being taken care by the underlying caching tier(heap/disk etc) itself.
Additional context
No response
The text was updated successfully, but these errors were encountered: