After Java 17 upgrade, JVM heap memory started to increase. When we check the memory metrics, sizes of the Eden Space and the Old Generation fluctuating and peak values are increasing.
There seems no increase in lower values of Old Gen but the problem is it is increasing so fast and the peak value is also increasing.
When I inspect the memory dumps, there seems no potential leak. Can we say that there is a memory leak in here?
EDIT:
We have upgraded from Java 11 to 17.
I don't see any unusual activity in GC metrics.




Identify Increased
Heap Memory Vs Memory LeaksituationJava 17changed the defaultgarbage collector (GC) from Parallel GC to G1 GC. -G1 GCdivides the heap into smaller regions and adapts the size and number of regions based on the application's behavior & has a different way of handling young and old generations, which may affect the heap usage patternsTo verify run your application with different
GCsand compare the results. e.g.XX:+UseParallelGCoption to switch back toParallel GC, or try other GCs such asZGC or Shenandoah GCUse the
-Xlog:gcoption to enableGC loggingand analyze the GC behavior in more detail.If the GC is not the cause of your increased heap memory usage, poss.
memory leakin your application i.e. an object is no longer needed by the application, but it is still referenced by other objects and cannot be reclaimed by the GC. To detect this use tools such asEclipse Memory Analyzer, to analyze memory dumps