-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Enhancement on indices.fielddata.cache.size #59829
Comments
Pinging @elastic/es-search (:Search/Search) |
This makes sense to me, and would help avoid situations where the cache must be cleared manually. I'll discuss with the team to confirm we want to make a change. |
We discussed as a team and decided to not adjust the default setting or recommendation for However we have some changes planned to improve the situation:
Thanks @boicehuang for filing this issue, it revived an important discussion around simplifying fielddata cache management. |
Currently,
indices.fielddata.cache.size
limits the max memory of field data cache by continuously discarding the least recently used one(LRU), defaults to unbounded. Also,indices.breaker.fielddata.limit
is a limit of field data cache by refusing query when the active field data cache memory reached its limit, defaults to 40%.When we continuously send sorting on or computing aggregations on the _id or text field, the field data cache memory first reaches 40%.
Indices.breaker.fielddata.limit
begins to refuse every new query. The problem is that field data cache can't do the LRU. It cannot be recovered by itself until I send_cache/clear
.However, if we adjust
indices.fielddata.cache.size
to 38%, when the field data cache grows, new queries will trigger the cache to do the LRU. It expires the least recently used cache and works well with the new query. Also,indices.breaker.fielddata.limit
can take effect on the sudden growth of the field data cache.So, I suppose
indices.fielddata.cache.size
should be less thanindices.breaker.fielddata.limit
by default and better to add some tips on both settings. I am pleased to do some works.The text was updated successfully, but these errors were encountered: