JVM process memory and Java GC
843811Sep 16 2003 — edited Sep 19 2003 Hi,all:
I'm throughly confused by memory.
Java version: Sun JDK 1.3.1_09
Application Server: WebLogic 7.0
OS: Redhat 7.2
Startup Parameter: -server -Xms512m -Xmx512m -XX:NewSize=196m -X:MaxNewSize=196m
-XX:PermSize=64m -XX:MaxPermSize=64m
I found when jvm started with the parameter listed above, JVM will only initialize part of ms(512m), around 100M. At the same time,each time Java use gc to collect the garbage, I found much space freed in the heap.However, I can not see any change on PROCESS memory usage at os level(use "top" and check the "RSS" column of the process). sometimes the process memory increased after gc finished(even much space freed at java level).
I don't know if I can explain like this:
Even I use the parameter like "-Xms512m -Xmx512m", it will not initialize all
memory for java at the first time(How much will it initialize?). When more memory will be used for the heap, the memory usage at OS level will be increased. Even java use gc to collect the garbage, the memory usage (at os level) will not be decreased(because it only be freed at Heap level, not OS level?). When all the
JVM memory(512M) be initialized, the memory usage at OS level will not be increased any more?
Hope your help...
Thanks Lumin