# Index.fielddata.cache 'soft' or 'resident'

**URL:** https://discuss.elastic.co/t/index-fielddata-cache-soft-or-resident/12972
**Category:** Elasticsearch
**Created:** [July 28, 2013, 11:01am UTC](https://discuss.elastic.co/t/index-fielddata-cache-soft-or-resident/12972 "2013-07-28T11:01:39Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![subin](https://avatars.discourse-cdn.com/v4/letter/s/58956e/32.png) [@subin](https://discuss.elastic.co/u/subin)
#### Post date: [July 28, 2013, 11:01am UTC](https://discuss.elastic.co/t/index-fielddata-cache-soft-or-resident/12972/1 "2013-07-28T11:01:39Z")

</div>

Hi group,

I've an ES server (0.90.0) with 3.2G dedicated to the JAVA heap memory. I'd  
like to utilize bulk of the memory equally for  
indexing and searching (from web end- Kibana). In this situation what  
should be the appropriate value for index.fielddata.cache?  
Soft or resident?

Please advise as to how to decide this value.

PS: ES is a part of Logstash setup.

Thanks,  
Subin

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)
#### Post date: [July 28, 2013, 12:48pm UTC](https://discuss.elastic.co/t/index-fielddata-cache-soft-or-resident/12972/2 "2013-07-28T12:48:50Z")

</div>

If you want all field data in the cache to be resident, including OOM  
messages, choose 'resident' (which is the default).

If you want to let the JVM garbage collection decide about heap usage for  
your cache values, choose 'soft'. The risk of OOM is low, but performance  
will not be well, because cache rebuilding takes additional time.

Jörg

On Sun, Jul 28, 2013 at 1:01 PM, subin [ksubins321@gmail.com](mailto:ksubins321@gmail.com) wrote:

> Hi group,
> 
> I've an ES server (0.90.0) with 3.2G dedicated to the JAVA heap memory.  
> I'd like to utilize bulk of the memory equally for  
> indexing and searching (from web end- Kibana). In this situation what  
> should be the appropriate value for index.fielddata.cache?  
> Soft or resident?
> 
> Please advise as to how to decide this value.
> 
> PS: ES is a part of Logstash setup.
> 
> Thanks,  
> Subin
> 
> --  
> 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).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![radu\_gheorghe](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/radu_gheorghe/32/556_2.png) [@radu\_gheorghe](https://discuss.elastic.co/u/radu_gheorghe)
#### Post date: [July 30, 2013, 4:21pm UTC](https://discuss.elastic.co/t/index-fielddata-cache-soft-or-resident/12972/3 "2013-07-30T16:21:54Z")

</div>

Just to add to what Jörg said, since you're using 0.90, you can limit the  
fielddata cache size:

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

Which should prevent OOMs, and it should give you better performance than  
having soft caches. The best way to know for sure is to test and monitor.

Best regards,  
Radu

On Sun, Jul 28, 2013 at 3:48 PM, [joergprante@gmail.com](mailto:joergprante@gmail.com) \<  
[joergprante@gmail.com](mailto:joergprante@gmail.com)\> wrote:

> If you want all field data in the cache to be resident, including OOM  
> messages, choose 'resident' (which is the default).
> 
> If you want to let the JVM garbage collection decide about heap usage for  
> your cache values, choose 'soft'. The risk of OOM is low, but performance  
> will not be well, because cache rebuilding takes additional time.
> 
> Jörg
> 
> On Sun, Jul 28, 2013 at 1:01 PM, subin [ksubins321@gmail.com](mailto:ksubins321@gmail.com) wrote:
> 
> > Hi group,
> > 
> > I've an ES server (0.90.0) with 3.2G dedicated to the JAVA heap memory.  
> > I'd like to utilize bulk of the memory equally for  
> > indexing and searching (from web end- Kibana). In this situation what  
> > should be the appropriate value for index.fielddata.cache?  
> > Soft or resident?
> > 
> > Please advise as to how to decide this value.
> > 
> > PS: ES is a part of Logstash setup.
> > 
> > Thanks,  
> > Subin
> > 
> > --  
> > 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).  
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> 
> --  
> 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).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
[http://sematext.com/](http://sematext.com/) -- Elasticsearch -- Solr -- Lucene

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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, 2:23am UTC](https://discuss.elastic.co/t/index-fielddata-cache-soft-or-resident/12972/4 "2017-07-06T02:23:42Z")

</div>


