I am trying to solve a problem where the heap memory is going beyond 90 percent in my java service.
Below is the heap configuration I am using,
-Xms6144m \
-Xmx6144m \
-verbose:gc \
-XX:G1HeapRegionSize=2097152 \
-XX:+PrintGC \
-XX:+PrintFlagsFinal \
-XX:InitiatingHeapOccupancyPercent=40 \
-XX:NewRatio=2 \
-XX:+PrintGCDetails \
-XX:+PrintGCDateStamps \
-XX:+PrintAdaptiveSizePolicy \
-XX:+PrintTenuringDistribution \
-XX:+UseGCLogFileRotation \
-XX:NumberOfGCLogFiles=10 \
-XX:GCLogFileSize=50M \
-XX:+UnlockExperimentalVMOptions \
-XX:+UseG1GC -XX:+UseStringDeduplication \
-XX:+UseCGroupMemoryLimitForHeap \
-XX:+ParallelRefProcEnabled
-XX:+OptimizeStringConcat
-XX:MaxRAMFraction=2 \
-XshowSettings:vm
The problem is my old gen is gradually getting filled up and over the time the lower point to which the heap is going after GC is increasing, my graph looks something like this :
Can you suggest if my heap params are correct and are they conflicting in the way they are configured or how can I reduce the max heap getting used?