# Cache not freed up timely on elasticsearch nodes

**URL:** https://discuss.elastic.co/t/cache-not-freed-up-timely-on-elasticsearch-nodes/20824
**Category:** Elasticsearch
**Created:** [November 19, 2014, 1:05am UTC](https://discuss.elastic.co/t/cache-not-freed-up-timely-on-elasticsearch-nodes/20824 "2014-11-19T01:05:05Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Nidhi\_Gupta](https://avatars.discourse-cdn.com/v4/letter/n/b9e5f3/32.png) [@Nidhi\_Gupta](https://discuss.elastic.co/u/Nidhi_Gupta)
#### Post date: [November 19, 2014, 1:05am UTC](https://discuss.elastic.co/t/cache-not-freed-up-timely-on-elasticsearch-nodes/20824/1 "2014-11-19T01:05:05Z")

</div>

_Issue - Alerts for low memory on elasticsearch nodes._

we have a 8 node elasticsearch cluster with 3 master eligible nodes.

Total RAM on each server is 70GB , from which 30GB is allocated to ES.  
which is used 30-40% by elasticsearch most of the times. The field data  
cache / filter cache are well in bounds.

The rest 40GB is available for kernel. no other process is running on the  
machine.

sometime back we started getting low memory alerts on all these nodes ,  
where dentry cache was taking up more then 30G and was not freeing up for  
other system processes in timely manner. I understand system is using all  
available RAM , which is a desired behavior but its not freeing it up  
timely.

we initially thought its a system issues, so increased VFS cache pressure,  
which helped a little but not much. then we added a script to drop\_cache if  
free memory goes below a certain limit. this workaround is working ok, but  
it causes some latency when the drop\_cache gets executed.

But the main reason fro posting this question here is - we have several  
other applications with much higher load , but only the 2 services with  
elasticsearch cluster are getting this memory issue on the servers.

Mlockall , file descriptor counts, mmap count etc are setup as per  
elasticsearch documentation suggestion. we don't have a swap partition so  
swapiness is set as default - 60. Garbage collection is not running very  
often and no OOM for ES.

I was wondering if someone else has faced the similar issue with  
elasticsearch and have a suggestion.

Thanks,

Nidhi

--  
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/e77b1351-5dcf-493c-9f47-0951dd94d64e%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/e77b1351-5dcf-493c-9f47-0951dd94d64e%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![haizaar](https://avatars.discourse-cdn.com/v4/letter/h/3d9bf3/32.png) [@haizaar](https://discuss.elastic.co/u/haizaar)
#### Post date: [March 15, 2016, 9:38pm UTC](https://discuss.elastic.co/t/cache-not-freed-up-timely-on-elasticsearch-nodes/20824/2 "2016-03-15T21:38:25Z")

</div>

Hi Nidhi,

Have you managed to solve this issue?

---

<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 5, 2017, 11:08pm UTC](https://discuss.elastic.co/t/cache-not-freed-up-timely-on-elasticsearch-nodes/20824/3 "2017-07-05T23:08:08Z")

</div>


