We have a Java application running in openjdk8 whose max heap memory changes at runtime - what might be the reason of that?
I have found question Why the heap is changing in java which points to the article which explains difference between max
and committed
memory. It seems that in our case these two are usually the same, but not always - see at 11:53 on screenshots below.
Heap can be also changed be young generation serial collector (-XX:MaxHeapFreeRatio
, see Encourage the JVM to GC rather than grow the heap?), however we use parallel collector so this is not the case.
The memory related JVM parameters that we run the application with:
-XX:MaxMetaspaceSize=200M -Xms2000m -Xmx2000m
Not sure if it's related, the application was doing parallel mark sweep on old generations between 11:55 and 11:58 - at this time there was over 200MB free memory available and we cannot see any reason for that behaviour.