# Replicas and Field Data Cache

**URL:** <https://discuss.elastic.co/t/replicas-and-field-data-cache/20606>\
**Category:** Elasticsearch\
**Created:** [November 6, 2014, 12:50pm UTC](https://discuss.elastic.co/t/replicas-and-field-data-cache/20606 "2014-11-06T12:50:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jason\_Gilman](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jason_gilman/32/1126_2.png) [@Jason\_Gilman](https://discuss.elastic.co/u/Jason_Gilman)\
**Post date:** [November 6, 2014, 12:50pm UTC](https://discuss.elastic.co/t/replicas-and-field-data-cache/20606/1 "2014-11-06T12:50:39Z")

</div>

We're trying to estimate the amount of memory we'll need for the fielddata  
cache. Do replicas increase the amount of fielddata cache used? I imagine  
that they would but I wanted to get confirmation of this. If I have 3  
documents indexed with a string field of 1 character each in a single node  
with 1 replica I would expect about the following amount of field data  
cache is used:

2 bytes for a single character string \* 3 documents = 6 bytes.

If replicas of that data add to the field cache then it would double to 12  
bytes.

That doesn't account for Object references, wrappers or whatever is holding  
memory but I wanted to make sure the basic logic is correct for estimating  
the fielddata cache size. I want to test this theory but I wanted to check  
first with others who might be more familiar with the fielddata cache  
implementation.

--  
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 [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/96e9b561-1467-47d9-b25a-23fb78e0b0d0%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/96e9b561-1467-47d9-b25a-23fb78e0b0d0%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 12:51am UTC](https://discuss.elastic.co/t/replicas-and-field-data-cache/20606/2 "2017-07-06T00:51:49Z")

</div>

Closed on July 6, 2017, 12:51am UTC


