# Elasticsearch 5.x use heap size not go to the max 32g?

**URL:** <https://discuss.elastic.co/t/elasticsearch-5-x-use-heap-size-not-go-to-the-max-32g/97510>\
**Category:** Elasticsearch\
**Created:** [August 18, 2017, 4:45am UTC](https://discuss.elastic.co/t/elasticsearch-5-x-use-heap-size-not-go-to-the-max-32g/97510 "2017-08-18T04:45:37Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![zqc0512](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zqc0512/32/32141_2.png) [@zqc0512](https://discuss.elastic.co/u/zqc0512)\
**Post date:** [August 18, 2017, 4:45am UTC](https://discuss.elastic.co/t/elasticsearch-5-x-use-heap-size-not-go-to-the-max-32g/97510/1 "2017-08-18T04:45:37Z")

</div>

in x-pack monitoring  
why the use heap size line not like a straight line,can't use the max 32g when go to 24g the next secondes go to 9.2g

how i can change it

![image](https://us1.discourse-cdn.com/elastic/original/3X/8/9/89d7556b24b382c99a79c532d2258103e62de41e.png)

![image](https://us1.discourse-cdn.com/elastic/original/3X/7/0/70efbe92b6fba00c7bf8fe1e0e95d6f1b6a196a9.png)

---

<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:** [August 18, 2017, 4:52am UTC](https://discuss.elastic.co/t/elasticsearch-5-x-use-heap-size-not-go-to-the-max-32g/97510/2 "2017-08-18T04:52:03Z")

</div>

It'll only use what it needs, so this is not bad.

---

<div class="post-metadata">

**Author:** ![zqc0512](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zqc0512/32/32141_2.png) [@zqc0512](https://discuss.elastic.co/u/zqc0512)\
**Post date:** [August 18, 2017, 4:53am UTC](https://discuss.elastic.co/t/elasticsearch-5-x-use-heap-size-not-go-to-the-max-32g/97510/3 "2017-08-18T04:53:43Z")

</div>

but the use max can't go to 32g  
where to set can use max can go to 32g.

---

<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:** [August 18, 2017, 4:54am UTC](https://discuss.elastic.co/t/elasticsearch-5-x-use-heap-size-not-go-to-the-max-32g/97510/4 "2017-08-18T04:54:22Z")

</div>

It can go to 32, it just doesn't need to.

---

<div class="post-metadata">

**Author:** ![zqc0512](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zqc0512/32/32141_2.png) [@zqc0512](https://discuss.elastic.co/u/zqc0512)\
**Post date:** [August 18, 2017, 5:01am UTC](https://discuss.elastic.co/t/elasticsearch-5-x-use-heap-size-not-go-to-the-max-32g/97510/5 "2017-08-18T05:01:37Z")

</div>

chage the gc not use cms use g1gc can slove it?

---

<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:** [August 18, 2017, 5:02am UTC](https://discuss.elastic.co/t/elasticsearch-5-x-use-heap-size-not-go-to-the-max-32g/97510/6 "2017-08-18T05:02:44Z")

</div>

There's nothing to solve.

The JVM will use the entire heap _only if it needs to_. If it doesn't then why waste resources?

---

<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:** [September 15, 2017, 5:03am UTC](https://discuss.elastic.co/t/elasticsearch-5-x-use-heap-size-not-go-to-the-max-32g/97510/7 "2017-09-15T05:03:05Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
