Request updates to ES documentation page "limiting memory usage"

After I completed the analysis of the fielddata cache in my situation, I
sent a longer analysis within Microsoft. A colleague pointed me to the

There is lots of great info there and I'm really glad that the default size
of the fielddata cache is clearly called out as unbounded.

There are two serious flaws with that page that I request get fixed.
First, regarding this paragraph:

The indices.fielddata.cache.size controls how much heap space is allocated
to fielddata. When you run a query that requires access to new field
values, it will load the values into memory and then try to add them to
fielddata. If the resulting fielddata size would exceed the specified size,
then other values would be evicted in order to make space

The last sentence is true ONLY when all of the 16 segments in the cache are
filled up. In reality the total size is divided by 16 and then checked on
a segment by segment basis. I have seen posts complaining that they set
the fielddata cache size and see evictions even though the cache as a whole
isn't filled up to the size they configured.

The evictions occur on a segment basis. If you see evictions even though
the cache isn't 'full', your use of segments is not evenly spread across
all 16 -- not that there is anything you can do about that! I suspect that
as ES deployments grow in scale the 16 segments would become more evenly

Second, there are the lines:

There is another setting which you may see online:

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.

I can imagine that the setting might not be a good idea or might even be
deprecated, but the reason given is wrong. The expire value and the
expiration process in the cache definitely compare to last accessed time --
which is updated every time the value is accessed. Thus if the values are
being accessed within the expiry window, they will NOT be evicted.


You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit
For more options, visit