# ES not using all the memory assigned to it

**URL:** <https://discuss.elastic.co/t/es-not-using-all-the-memory-assigned-to-it/39321>\
**Category:** Elasticsearch\
**Created:** [January 15, 2016, 12:06pm UTC](https://discuss.elastic.co/t/es-not-using-all-the-memory-assigned-to-it/39321 "2016-01-15T12:06:32Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sheker](https://avatars.discourse-cdn.com/v4/letter/s/958977/32.png) [@Sheker](https://discuss.elastic.co/u/Sheker)\
**Post date:** [January 15, 2016, 12:06pm UTC](https://discuss.elastic.co/t/es-not-using-all-the-memory-assigned-to-it/39321/1 "2016-01-15T12:06:32Z")

</div>

Hi,  
I'm running ES (1.6) for development on my MacBook PRO and I am trying to give ES more memory to use for improving query speed

I've tried  
export ES\_HEAP\_SIZE=2g

The process is named:  
/usr/bin/java -Xms2g -Xmx2g -Djava.awt.headless=true -  
so it's it's getting the message but it still only uses 1gb of memory even if there is free memory

Does any one know what is the reason?

---

<div class="post-metadata">

**Author:** ![jasontedor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jasontedor/32/66992_2.png) [@jasontedor](https://discuss.elastic.co/u/jasontedor)\
**Post date:** [January 15, 2016, 2:50pm UTC](https://discuss.elastic.co/t/es-not-using-all-the-memory-assigned-to-it/39321/2 "2016-01-15T14:50:26Z")

</div>

> [@Sheker](#):
>
> but it still only uses 1gb of memory even if there is free memory

How are you verifying this?

---

<div class="post-metadata">

**Author:** ![Sheker](https://avatars.discourse-cdn.com/v4/letter/s/958977/32.png) [@Sheker](https://discuss.elastic.co/u/Sheker)\
**Post date:** [January 15, 2016, 4:04pm UTC](https://discuss.elastic.co/t/es-not-using-all-the-memory-assigned-to-it/39321/3 "2016-01-15T16:04:42Z")

</div>

Hi, thanks for answering but I realized I was wrong  
It just took a while until it started using all the memory I gave it  
thanks again

---

<div class="post-metadata">

**Author:** ![jasontedor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jasontedor/32/66992_2.png) [@jasontedor](https://discuss.elastic.co/u/jasontedor)\
**Post date:** [January 15, 2016, 4:23pm UTC](https://discuss.elastic.co/t/es-not-using-all-the-memory-assigned-to-it/39321/4 "2016-01-15T16:23:27Z")

</div>

> [@Sheker](#):
>
> Hi, thanks for answering but I realized I was wrong It just took a while until it started using all the memory I gave itthanks again

Right. For future reference, you can check the allocated heap size of an Elasticsearch server through a variety of methods that I've outlined [previously](https://discuss.elastic.co/t/how-to-check-es-heap-size/36613/6). Note that since you're on Elasticsearch 1.6 I am not sure if all of them will work, but at least some of them will. 🙂

---

<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:24pm UTC](https://discuss.elastic.co/t/es-not-using-all-the-memory-assigned-to-it/39321/5 "2017-07-05T23:24:02Z")

</div>


