# Why not auto release the memory

**URL:** <https://discuss.elastic.co/t/why-not-auto-release-the-memory/16308>\
**Category:** Elasticsearch\
**Created:** [March 12, 2014, 2:54am UTC](https://discuss.elastic.co/t/why-not-auto-release-the-memory/16308 "2014-03-12T02:54:07Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![David\_shi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/david_shi/32/1125_2.png) [@David\_shi](https://discuss.elastic.co/u/David_shi)\
**Post date:** [March 12, 2014, 2:54am UTC](https://discuss.elastic.co/t/why-not-auto-release-the-memory/16308/1 "2014-03-12T02:54:07Z")

</div>

I use the \_bulk interfaces concurrent writes 10M stress test, but after  
the memory footprint has been stubbornly high, unless I restart the  
elasticsearch.

How to make JVM automatically frees memory.

bigdesk screenshot

[https://lh3.googleusercontent.com/-mdCKBVgQwTk/Ux\_LRAs\_zVI/AAAAAAAAAT4/xHMZHC4lCqo/s1600/Bigdesk.png](https://lh3.googleusercontent.com/-mdCKBVgQwTk/Ux_LRAs_zVI/AAAAAAAAAT4/xHMZHC4lCqo/s1600/Bigdesk.png)

--  
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/e0837fa0-84f3-41ff-95e7-ea4fd55d5904%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/e0837fa0-84f3-41ff-95e7-ea4fd55d5904%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![otisg](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/otisg/32/492_2.png) [@otisg](https://discuss.elastic.co/u/otisg)\
**Post date:** [March 12, 2014, 3:20am UTC](https://discuss.elastic.co/t/why-not-auto-release-the-memory/16308/2 "2014-03-12T03:20:04Z")

</div>

Hi,

Are you seeing OOMs? Or long GC pauses? If not, don't worry - let the JVM  
make use of the memory you let it use with -Xmx.

Conceptually similar to [http://www.linuxatemyram.com/](http://www.linuxatemyram.com/)

## Otis

Performance Monitoring \* Log Analytics \* Search Analytics  
Solr & Elasticsearch Support \* [http://sematext.com/](http://sematext.com/)

On Tuesday, March 11, 2014 10:54:07 PM UTC-4, David shi wrote:

> I use the \_bulk interfaces concurrent writes 10M stress test, but after  
> the memory footprint has been stubbornly high, unless I restart the  
> elasticsearch.
> 
> How to make JVM automatically frees memory.
> 
> bigdesk screenshot
> 
> [https://lh3.googleusercontent.com/-mdCKBVgQwTk/Ux\_LRAs\_zVI/AAAAAAAAAT4/xHMZHC4lCqo/s1600/Bigdesk.png](https://lh3.googleusercontent.com/-mdCKBVgQwTk/Ux_LRAs_zVI/AAAAAAAAAT4/xHMZHC4lCqo/s1600/Bigdesk.png)

--  
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/ac1621bd-1f17-4f1e-96bf-3572408ad393%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/ac1621bd-1f17-4f1e-96bf-3572408ad393%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![george\_monroe](https://avatars.discourse-cdn.com/v4/letter/g/bbce88/32.png) [@george\_monroe](https://discuss.elastic.co/u/george_monroe)\
**Post date:** [March 12, 2014, 8:38am UTC](https://discuss.elastic.co/t/why-not-auto-release-the-memory/16308/3 "2014-03-12T08:38:00Z")

</div>

Looks normal, especially under concurrent stress. You could try turning off  
or stretching the refresh rate while you're indexing in concurrent bulks.  
But let the JVM do it's job.

On Tuesday, March 11, 2014 7:54:07 PM UTC-7, David shi wrote:

> I use the \_bulk interfaces concurrent writes 10M stress test, but after  
> the memory footprint has been stubbornly high, unless I restart the  
> elasticsearch.
> 
> How to make JVM automatically frees memory.
> 
> bigdesk screenshot
> 
> [https://lh3.googleusercontent.com/-mdCKBVgQwTk/Ux\_LRAs\_zVI/AAAAAAAAAT4/xHMZHC4lCqo/s1600/Bigdesk.png](https://lh3.googleusercontent.com/-mdCKBVgQwTk/Ux_LRAs_zVI/AAAAAAAAAT4/xHMZHC4lCqo/s1600/Bigdesk.png)

--  
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/1b596a44-6f99-4d77-8426-c3dbdc743cbc%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/1b596a44-6f99-4d77-8426-c3dbdc743cbc%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:** [March 12, 2014, 8:55am UTC](https://discuss.elastic.co/t/why-not-auto-release-the-memory/16308/4 "2014-03-12T08:55:19Z")

</div>

There is more than enough free memory on the heap. Why are you bothering?

Jörg

On Wed, Mar 12, 2014 at 3:54 AM, David shi [fackweb@gmail.com](mailto:fackweb@gmail.com) wrote:

> I use the \_bulk interfaces concurrent writes 10M stress test, but after  
> the memory footprint has been stubbornly high, unless I restart the  
> elasticsearch.
> 
> How to make JVM automatically frees memory.
> 
> bigdesk screenshot
> 
> [https://lh3.googleusercontent.com/-mdCKBVgQwTk/Ux\_LRAs\_zVI/AAAAAAAAAT4/xHMZHC4lCqo/s1600/Bigdesk.png](https://lh3.googleusercontent.com/-mdCKBVgQwTk/Ux_LRAs_zVI/AAAAAAAAAT4/xHMZHC4lCqo/s1600/Bigdesk.png)
> 
> --  
> 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/e0837fa0-84f3-41ff-95e7-ea4fd55d5904%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/e0837fa0-84f3-41ff-95e7-ea4fd55d5904%40googlegroups.com)[https://groups.google.com/d/msgid/elasticsearch/e0837fa0-84f3-41ff-95e7-ea4fd55d5904%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/e0837fa0-84f3-41ff-95e7-ea4fd55d5904%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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/CAKdsXoFuqNnc5efXyh-445%3DraZ8Orb2rVCGQQGc%3DqnaEAhcvKA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoFuqNnc5efXyh-445%3DraZ8Orb2rVCGQQGc%3DqnaEAhcvKA%40mail.gmail.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, 1:43am UTC](https://discuss.elastic.co/t/why-not-auto-release-the-memory/16308/5 "2017-07-06T01:43:58Z")

</div>


