# ES\_HEAP\_SIZE is set but still see -Xms256m -Xmx1g

**URL:** <https://discuss.elastic.co/t/es-heap-size-is-set-but-still-see-xms256m-xmx1g/21857>\
**Category:** Elasticsearch\
**Created:** [January 27, 2015, 10:46pm UTC](https://discuss.elastic.co/t/es-heap-size-is-set-but-still-see-xms256m-xmx1g/21857 "2015-01-27T22:46:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ali\_Kheyrollahi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ali_kheyrollahi/32/945_2.png) [@Ali\_Kheyrollahi](https://discuss.elastic.co/u/Ali_Kheyrollahi)\
**Post date:** [January 27, 2015, 10:46pm UTC](https://discuss.elastic.co/t/es-heap-size-is-set-but-still-see-xms256m-xmx1g/21857/1 "2015-01-27T22:46:44Z")

</div>

Hi,

I have an ES cluster running on Ubuntu 14 and created a file in  
/etc/profile.d/es\_vars.sh with this content:

export ES\_HEAP\_SIZE=7g

I have 14GB of memory so giving 7GB to ES heap but I can see in ps aux:

...  
elastic+ 1474 17.0 2.2 5929120 325284 ? Sl 22:33 0:38  
/usr/lib/jvm/java-7-oracle/bin/java _-Xms256m -Xmx1g_ -Xss256k  
-Djava.awt.headless=true -XX:+UseParNewGC -  
...

So it seems it is still running with Xms 256MB and Xmx of 1GB. I also once  
got _memory circuit breaker_ for using 600MB RAM for fields so _confirming  
that my Max memory is only 1GB_.

I am sure environment variable is there:

$ES\_HEAP\_SIZE  
$7g

Is there something I am missing?

Thanks in advance

--  
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/6105e526-f399-4324-8d15-843eb4881c39%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/6105e526-f399-4324-8d15-843eb4881c39%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Ali\_Kheyrollahi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ali_kheyrollahi/32/945_2.png) [@Ali\_Kheyrollahi](https://discuss.elastic.co/u/Ali_Kheyrollahi)\
**Post date:** [January 27, 2015, 10:48pm UTC](https://discuss.elastic.co/t/es-heap-size-is-set-but-still-see-xms256m-xmx1g/21857/2 "2015-01-27T22:48:38Z")

</div>

Sorry missed _echo_ $ES\_HEAP\_SIZE

--  
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/65b8ce31-c0df-4cd3-a85c-99cb563becae%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/65b8ce31-c0df-4cd3-a85c-99cb563becae%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:** [January 27, 2015, 11:58pm UTC](https://discuss.elastic.co/t/es-heap-size-is-set-but-still-see-xms256m-xmx1g/21857/3 "2015-01-27T23:58:34Z")

</div>

If you are installing using the deb, just use /etc/default/elasticsearch to  
set it.

On 28 January 2015 at 09:48, Ali Kheyrollahi [aliostad@gmail.com](mailto:aliostad@gmail.com) wrote:

> Sorry missed _echo_ $ES\_HEAP\_SIZE
> 
> --  
> 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/65b8ce31-c0df-4cd3-a85c-99cb563becae%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/65b8ce31-c0df-4cd3-a85c-99cb563becae%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/65b8ce31-c0df-4cd3-a85c-99cb563becae%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/65b8ce31-c0df-4cd3-a85c-99cb563becae%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/CAEYi1X8oM7MtKZZ1gHDi5\_9UgNRKsXa%2B4%3DHVig97Y0Wmud3WkQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAEYi1X8oM7MtKZZ1gHDi5_9UgNRKsXa%2B4%3DHVig97Y0Wmud3WkQ%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, 12:36am UTC](https://discuss.elastic.co/t/es-heap-size-is-set-but-still-see-xms256m-xmx1g/21857/4 "2017-07-06T00:36:18Z")

</div>


