Recently, I upgraded a Docker image from opendjk:11-jre to eclipse-temurin:17-jre, and since the change has been performed I've just realised that the heap memory consumption has grown significantly (60MiB to 140MiB in some cases). I was wondering, is this a memory leak or misconfiguration in the flags when launching the image?
Also, I noticed that GC takes place way less times than before.
In Java 11, I had these options enabled so that memory consumption was uniform and no restarts due to OOMs were identified: -XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled, but now those options are long gone and cannot be used in Java 17.
Is there a clear reason for the increase in memory consumption and restarts due to OOMs? Am I missing some flags in Java 17?