# Elasticsearch heap usage increase after switching from Oracle Java 8 to OpenJDK11

**URL:** <https://discuss.elastic.co/t/elasticsearch-heap-usage-increase-after-switching-from-oracle-java-8-to-openjdk11/205034>\
**Category:** Elasticsearch\
**Created:** [October 24, 2019, 9:43am UTC](https://discuss.elastic.co/t/elasticsearch-heap-usage-increase-after-switching-from-oracle-java-8-to-openjdk11/205034 "2019-10-24T09:43:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![A\_B](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/a_b/32/17104_2.png) [@A\_B](https://discuss.elastic.co/u/A_B)\
**Post date:** [October 24, 2019, 9:43am UTC](https://discuss.elastic.co/t/elasticsearch-heap-usage-increase-after-switching-from-oracle-java-8-to-openjdk11/205034/1 "2019-10-24T09:43:27Z")

</div>

Hello all,

I have started testing of running Elasticsearch on OpenJDK11 and noticed that the jvm heap usage has changed.

I changed the JAVA version and had to adjust `jvm.options`. I'm using Elasticsearch version 6.8.2.

Heap usage has become much more regular but has gone up by ~20%  
I'm using the default `jvm.options` that is distributed with Elasticsearch (version 7.3 I think, I know it is not the same version as I use but it should be good for OpenJDK11)

I have set

```
-Xms16g
-Xmx16g

```

JVM heap usage used to max out at about 12G, now it is a pretty constant 14,2G.

Is this expected? I assume this is due to differences in garbage collection between JAVA versions. JVM heap usage is much more constant now and CPU usage seems to be slightly lower (as reported by Kibana monitoring).

I have 1400+ shards per instance, which I know is over the _soft limit_ for Elasticsearch 7.+, so I should do something about that. Other than that, is this anything to worry about?

I appreciate any info, tips, tricks 🙂  
-AB

---

<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:** [November 21, 2019, 9:43am UTC](https://discuss.elastic.co/t/elasticsearch-heap-usage-increase-after-switching-from-oracle-java-8-to-openjdk11/205034/2 "2019-11-21T09:43:32Z")

</div>

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