# Elasticsearch cache configuration

**URL:** https://discuss.elastic.co/t/elasticsearch-cache-configuration/16034
**Category:** Elasticsearch
**Created:** [February 26, 2014, 2:02pm UTC](https://discuss.elastic.co/t/elasticsearch-cache-configuration/16034 "2014-02-26T14:02:09Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Hediye\_Delkhosh](https://avatars.discourse-cdn.com/v4/letter/h/b9e5f3/32.png) [@Hediye\_Delkhosh](https://discuss.elastic.co/u/Hediye_Delkhosh)
#### Post date: [February 26, 2014, 2:02pm UTC](https://discuss.elastic.co/t/elasticsearch-cache-configuration/16034/1 "2014-02-26T14:02:09Z")

</div>

Hello.  
I've installed Elasticsearch on web server and it use most part of memory,  
I searched and finally found cache module and it's configuration but I  
don't know how config Elasticsearch. Where should I insert below  
configurations???

index.cache.field.max\_size: 50000  
index.cache.field.expire: 10m  
index.cache.field.type: soft

should I enabale Cache module?? and where??

Thank you so much 🙂

--  
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/0fcf6faf-caf2-4b16-b4b3-249ffc4cee4f%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/0fcf6faf-caf2-4b16-b4b3-249ffc4cee4f%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![Binh\_Ly\_2](https://avatars.discourse-cdn.com/v4/letter/b/d07c76/32.png) [@Binh\_Ly\_2](https://discuss.elastic.co/u/Binh_Ly_2)
#### Post date: [February 26, 2014, 2:59pm UTC](https://discuss.elastic.co/t/elasticsearch-cache-configuration/16034/2 "2014-02-26T14:59:04Z")

</div>

For ES 1.0, the field data settings are here:

[http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/index-modules-fielddata.html](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/index-modules-fielddata.html)

The filter cache settings are here:

[http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/index-modules-cache.html](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/index-modules-cache.html)

The easiest way is to set these in the elasticsearch.yml file.

I would caution that you'll probably need to first investigate and  
understand your memory usage before trying to change any of these settings.

--  
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/9b5779a7-8839-42d4-af20-1d9b720ff242%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/9b5779a7-8839-42d4-af20-1d9b720ff242%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![Hediye\_Delkhosh](https://avatars.discourse-cdn.com/v4/letter/h/b9e5f3/32.png) [@Hediye\_Delkhosh](https://discuss.elastic.co/u/Hediye_Delkhosh)
#### Post date: [February 26, 2014, 3:19pm UTC](https://discuss.elastic.co/t/elasticsearch-cache-configuration/16034/3 "2014-02-26T15:19:40Z")

</div>

@Binh Ly thank you for reply.  
I don't know where should I insert this configs.  
I've installes FOS-elastica in my project, there is a elasticsearch.yml in  
my project and another one is in /etc/elasticsearch. where should I insert  
configs?

I've tested server memory usage. Elasticserach service use memory alot.

Thank you 🙂

On Wednesday, February 26, 2014 6:29:04 PM UTC+3:30, Binh Ly wrote:

> For ES 1.0, the field data settings are here:
> 
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/index-modules-fielddata.html)
> 
> The filter cache settings are here:
> 
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/index-modules-cache.html)
> 
> The easiest way is to set these in the elasticsearch.yml file.
> 
> I would caution that you'll probably need to first investigate and  
> understand your memory usage before trying to change any of these settings.

--  
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/7ebf2e93-7f38-47fc-9cc0-c1eee98e60c2%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/7ebf2e93-7f38-47fc-9cc0-c1eee98e60c2%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![polyfractal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/polyfractal/32/48162_2.png) [@polyfractal](https://discuss.elastic.co/u/polyfractal)
#### Post date: [February 26, 2014, 3:51pm UTC](https://discuss.elastic.co/t/elasticsearch-cache-configuration/16034/4 "2014-02-26T15:51:07Z")

</div>

If you simply want to decrease the amount of memory that Elasticsearch is  
using, you need to change your heap size (via the HEAP\_SIZE environment  
variable). That controls the total memory allocated to Elasticsearch.

Echoing what Binh said...try not to change the field-data settings unless  
you know what you are doing. You should not enable soft references for  
field-data, this is a very bad option. It causes excessive GC thrashing  
and is not needed (especially now that 1.0 has circuit breaker logic built  
in). Similarly, the time expiration on field-data is typically a poor  
option, since it unnecessarily thrashes the GC too.

On Wednesday, February 26, 2014 10:19:40 AM UTC-5, Hediye Delkhosh wrote:

> @Binh Ly thank you for reply.  
> I don't know where should I insert this configs.  
> I've installes FOS-elastica in my project, there is a elasticsearch.yml in  
> my project and another one is in /etc/elasticsearch. where should I insert  
> configs?
> 
> I've tested server memory usage. Elasticserach service use memory alot.
> 
> Thank you 🙂
> 
> On Wednesday, February 26, 2014 6:29:04 PM UTC+3:30, Binh Ly wrote:
> 
> > For ES 1.0, the field data settings are here:
> > 
> > [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/index-modules-fielddata.html)
> > 
> > The filter cache settings are here:
> > 
> > [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/index-modules-cache.html)
> > 
> > The easiest way is to set these in the elasticsearch.yml file.
> > 
> > I would caution that you'll probably need to first investigate and  
> > understand your memory usage before trying to change any of these settings.

--  
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/325c57fb-7cef-4805-8708-c59ef14f6d73%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/325c57fb-7cef-4805-8708-c59ef14f6d73%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [February 26, 2014, 10:10pm UTC](https://discuss.elastic.co/t/elasticsearch-cache-configuration/16034/5 "2014-02-26T22:10:10Z")

</div>

Configuration settings go in your elasticsearch.yml file.

Regards,  
Mark Walkom

Infrastructure Engineer  
Campaign Monitor  
email: [markw@campaignmonitor.com](mailto:markw@campaignmonitor.com)  
web: [www.campaignmonitor.com](http://www.campaignmonitor.com)

On 27 February 2014 02:51, Zachary Tong [zacharyjtong@gmail.com](mailto:zacharyjtong@gmail.com) wrote:

> If you simply want to decrease the amount of memory that Elasticsearch is  
> using, you need to change your heap size (via the HEAP\_SIZE environment  
> variable). That controls the total memory allocated to Elasticsearch.
> 
> Echoing what Binh said...try not to change the field-data settings unless  
> you know what you are doing. You should not enable soft references for  
> field-data, this is a very bad option. It causes excessive GC thrashing  
> and is not needed (especially now that 1.0 has circuit breaker logic built  
> in). Similarly, the time expiration on field-data is typically a poor  
> option, since it unnecessarily thrashes the GC too.
> 
> On Wednesday, February 26, 2014 10:19:40 AM UTC-5, Hediye Delkhosh wrote:
> 
> > @Binh Ly thank you for reply.  
> > I don't know where should I insert this configs.  
> > I've installes FOS-elastica in my project, there is a elasticsearch.yml  
> > in my project and another one is in /etc/elasticsearch. where should I  
> > insert configs?
> > 
> > I've tested server memory usage. Elasticserach service use memory alot.
> > 
> > Thank you 🙂
> > 
> > On Wednesday, February 26, 2014 6:29:04 PM UTC+3:30, Binh Ly wrote:
> > 
> > > For ES 1.0, the field data settings are here:
> > > 
> > > [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/en/elasticsearch/)  
> > > reference/current/index-modules-fielddata.html
> > > 
> > > The filter cache settings are here:
> > > 
> > > [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/en/elasticsearch/)  
> > > reference/current/index-modules-cache.html
> > > 
> > > The easiest way is to set these in the elasticsearch.yml file.
> > > 
> > > I would caution that you'll probably need to first investigate and  
> > > understand your memory usage before trying to change any of these settings.
> > 
> > --  
> > 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/325c57fb-7cef-4805-8708-c59ef14f6d73%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/325c57fb-7cef-4805-8708-c59ef14f6d73%40googlegroups.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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAEM624ZFCJxuRZWZsg69tmHcWmFX0bn5YBxjHAqTS%2BMYirHYeA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAEM624ZFCJxuRZWZsg69tmHcWmFX0bn5YBxjHAqTS%2BMYirHYeA%40mail.gmail.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, 1:46am UTC](https://discuss.elastic.co/t/elasticsearch-cache-configuration/16034/6 "2017-07-06T01:46:59Z")

</div>


