Confused on determining TOTAL java heap memory usage
843811Jul 23 2002 — edited Mar 17 2003K, I'm confused. I'm seeing what I believe to be two different definitions of how to calcuate total java heap memory. My specific confusion is the relationship between the -Xmx and MaxPermSize switches.
1) Is MaxPermSize seperate from mx - outside of what mx defines?
2) Is MaxPermSize taken "from" mx?
Tim Cramer says #1
"Tuning Garbage Collection with Java 1.3.1" says #2
First, interview with TimCramer:
http://developer.java.sun.com/developer/community/chat/JavaLive/2001/jl0327.html
At the very end of the interview he says:
TimCramer: For 1.3 here's the formula:
TotalHeapSize = -Xmx setting + MaxPermSize
The heap is further divided into Young and Old generation: -XX:MaxNewSize is taken from the -Xmx setting, thus, - Xmx1024m -XX:NewSize=256m -XX:MaxPermSize=32m yields a 1056m heap, with 768m in the old and 256 in the new generation.
Then there is:
http://java.sun.com/docs/hotspot/gc/index.html
In the "Sizing Generations" section, it graphically shows MaxPerSize is taken from what mx defines.