Indices.fielddata.cache.expire

Based on https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules-fielddata.html and the indices.fielddata.cache.expire setting is experimental.

In this article: Limiting Memory Usage | Elasticsearch: The Definitive Guide [master] | Elastic it is mentioned that we should not use it:

There is another setting that you may see online: indices.fielddata.cache.expire.

We beg that you never use this setting! It will likely be deprecated in the future.

This setting tells Elasticsearch to evict values from fielddata if they are older than expire, whether the values are being used or not.

This is terrible for performance. Evictions are costly, and this effectively schedules evictions on purpose, for no real gain.

There isn’t a good reason to use this setting; we literally cannot theory-craft a hypothetically useful situation. It exists only for backward compatibility at the moment. We mention the setting in this book only since, sadly, it has been recommended in various articles on the Internet as a good performance tip.

It is not. Never use it!

Does anyone have any context on that?

1 Like

The reason is that entries in the fielddata cache are SUPER expensive to regenerate, so you don't want to evict from this cache unless you absolutely ned to reclaim memory or you know it will not be used again.

I second what the article says: never use it.

1 Like