I have a java spring boot service running as java -Xms1024m -Xmx6144m. When the service first starts the server (k8s pod) shows memory around 2.5GB and after a load it get increase to like 7GB and stays that value even after no load. Max memory pod can goes it 8GB. Below is how NR looks as of now. The JVM actually memory consumption is around 2990MB only.
Even Garbage collector ran for like 1 mint still the PS Used old gen heap also didn't get reduced. That means the service consume that memory memory anyway.
I assume its because the xms value of 6GB set at start up java command and it cause committed heap to be set as 6GB shown in NR. But then why the pod memory is not shows as around 7GB just after deploy when running without load. Should not the pod memory has to be reduce back since jvm only consume 2990MB only?