I am trying to understand some system memory concepts.
If I have a Java program and its Max heap size is 5657m
And its heap used size as below: (around between 954M ~ 2.3G)
As far as I understand, if its heap size once reached 2.3G, the memory allocation would be at this level even though it went down to 954M internally within the JVM.
From system TOP command, this process current has RES of 2.7G.
*PID USER PR NI VIRT **RES** SHR S %CPU **%MEM** TIME+ COMMAND*
*13523 cloud-u+ 20 0 13.8g **2.7g** 7000 S 5.6 **8.7***
So can I conclude that:
RES 2.7G = This Java process "Max of Heap size currently ever reached" + "non-Heap part" size?
Since Heap ever reached 2.3G, the RES would never less than 2.3G ?
Since the max heap is 5657m, the max of RES = 5657m + "non-Heap part" ?