# Virtual memory usage of elasticsearch

**URL:** <https://discuss.elastic.co/t/virtual-memory-usage-of-elasticsearch/19357>\
**Category:** Elasticsearch\
**Created:** [August 20, 2014, 7:36am UTC](https://discuss.elastic.co/t/virtual-memory-usage-of-elasticsearch/19357 "2014-08-20T07:36:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gokul\_nath](https://avatars.discourse-cdn.com/v4/letter/g/e56c9b/32.png) [@Gokul\_nath](https://discuss.elastic.co/u/Gokul_nath)\
**Post date:** [August 20, 2014, 7:36am UTC](https://discuss.elastic.co/t/virtual-memory-usage-of-elasticsearch/19357/1 "2014-08-20T07:36:42Z")

</div>

Hi,

when i see top command virtual memory usage for ElasticSearch is high. I  
have allocated min 1G and max 2G heap size for it. How can i control the  
virtual memory usage? I am getting OOM frequently on ElasticSearch log.

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND  
3721 elastics 20 0 87.4g 2.1g 119m S 66.2 14.3  
29:45.90 java

Thanks  
Gokul

--  
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/4fbb3426-f8d3-4cee-a6d6-d0d8003fd8b9%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/4fbb3426-f8d3-4cee-a6d6-d0d8003fd8b9%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:** [August 20, 2014, 7:50am UTC](https://discuss.elastic.co/t/virtual-memory-usage-of-elasticsearch/19357/2 "2014-08-20T07:50:31Z")

</div>

If you get OOM, you should take a look at RSS (resident set size) of the  
process. The VIRT (virtual memory) can span GB or TB, it does not matter at  
all.

Jörg

On Wed, Aug 20, 2014 at 9:36 AM, Gokul nath [gokularjunan@gmail.com](mailto:gokularjunan@gmail.com) wrote:

> Hi,
> 
> when i see top command virtual memory usage for Elasticsearch is high. I  
> have allocated min 1G and max 2G heap size for it. How can i control the  
> virtual memory usage? I am getting OOM frequently on Elasticsearch log.
> 
> PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND  
> 3721 elastics 20 0 87.4g 2.1g 119m S 66.2 14.3  
> 29:45.90 java
> 
> Thanks  
> Gokul
> 
> --  
> 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/4fbb3426-f8d3-4cee-a6d6-d0d8003fd8b9%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/4fbb3426-f8d3-4cee-a6d6-d0d8003fd8b9%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/4fbb3426-f8d3-4cee-a6d6-d0d8003fd8b9%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/4fbb3426-f8d3-4cee-a6d6-d0d8003fd8b9%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/CAKdsXoEMf\_K1%3DV7Rsz0BTi9Tdzj7kQ3CM-FXHeFn1q4UKdt96g%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoEMf_K1%3DV7Rsz0BTi9Tdzj7kQ3CM-FXHeFn1q4UKdt96g%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Gokul\_nath](https://avatars.discourse-cdn.com/v4/letter/g/e56c9b/32.png) [@Gokul\_nath](https://discuss.elastic.co/u/Gokul_nath)\
**Post date:** [August 21, 2014, 10:03am UTC](https://discuss.elastic.co/t/virtual-memory-usage-of-elasticsearch/19357/3 "2014-08-21T10:03:43Z")

</div>

Thanks Jorg. I will look into that.

On Wednesday, 20 August 2014 13:20:38 UTC+5:30, Jörg Prante wrote:

> If you get OOM, you should take a look at RSS (resident set size) of the  
> process. The VIRT (virtual memory) can span GB or TB, it does not matter at  
> all.
> 
> Jörg
> 
> On Wed, Aug 20, 2014 at 9:36 AM, Gokul nath \<[gokula...@gmail.com](mailto:gokula...@gmail.com)  
> \<javascript:\>\> wrote:
> 
> > Hi,
> > 
> > when i see top command virtual memory usage for Elasticsearch is high. I  
> > have allocated min 1G and max 2G heap size for it. How can i control the  
> > virtual memory usage? I am getting OOM frequently on Elasticsearch log.
> > 
> > PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND  
> > 3721 elastics 20 0 87.4g 2.1g 119m S 66.2 14.3  
> > 29:45.90 java
> > 
> > Thanks  
> > Gokul
> > 
> > --  
> > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/4fbb3426-f8d3-4cee-a6d6-d0d8003fd8b9%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/4fbb3426-f8d3-4cee-a6d6-d0d8003fd8b9%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/4fbb3426-f8d3-4cee-a6d6-d0d8003fd8b9%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/4fbb3426-f8d3-4cee-a6d6-d0d8003fd8b9%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/341063ae-4a61-4ea9-a308-3d3005c8e019%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/341063ae-4a61-4ea9-a308-3d3005c8e019%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, 1:07am UTC](https://discuss.elastic.co/t/virtual-memory-usage-of-elasticsearch/19357/4 "2017-07-06T01:07:13Z")

</div>


