i have run a springboot example project to observe the jvm memory ,but it Makes me confused is that in the result of jstat:
OGC(Current old generation capacity . kB) 19848
NGC(Current new generation capacity kB) 9984
MC (Metaspace capacity kB) 35456
but the result of top the RES(A task's currently used share of available physical memory) is 127M so its my question :
why OGC+MNC+MC= 63.7578125M != RES 127M
NGCMN NGCMX NGC S0C S1C EC OGCMN OGCMX OGC OC MCMN MCMX MC CCSMN CCSMX CCSC YGC FGC
5440.0 83968.0 9984.0 960.0 960.0 8064.0 10944.0 167936.0 19848.0 19848.0 0.0 1081344.0 35456.0 0.0 1048576.0 4480.0 80 2
top:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
18267 wks 20 0 2242.5m 127.8m 13.0m S 0.0 13.1 0:54.99 java