Sun's 1.5 JVM: the -XX:DefaultMaxRAM option and its cousins
- From: fredakers907@xxxxxxxxx
- Date: 11 Dec 2006 16:06:52 -0800
Sun's 1.5 JVM has some heap size configuration parameters that are not
available in their 1.4 and earlier JVMs.
For Sun's 1.5 JVM (not 1.4), there is the following documentation on
If not otherwise set on the command line, the sizes of the initial
heap and maximum heap are calculated based on the size of the physical
memory. If phys_mem is the size of the physical memory on the
platform, the initial heap size will be set to phys_mem /
DefaultInitialRAMFraction. DefaultInitialRAMFraction is a command line
option with a default value of 64.
Similarly the maximum heap size will be set to phys_mem /
DefaultMaxRAMFraction has a default value of 4.
<end of fragment>
Does the second to the last line, in the above fragment, have a typo?
Shouldn't it read:
"Similarly the maximum heap size will be set to phys_mem /
I am thinking it's a typo because I just looked at:
You can further control the heap size through the following new
DefaultInitialRAMFraction has a default value of 64.
DefaultMaxRAMFraction has a default value of 4. The default initial
size of the heap is the size of physical RAM divided by
DefaultInitialRAMFraction. You can either set the maximum size
explicitly with DefaultMaxRAM
or use DefaultMaxRAMFraction to set the value proportionally.
Also, why did they create the "-XX:DefaultMaxRAM" option, when there is
"-Xmx" option that is available in 1.5 (and was also available in
earlier JVMs) ? I can see the reason for the
"-XX:DefaultInitialRAMFraction" and the "-XX:DefaultMaxRAMFraction"
options, but the "XX:DefaultMaxRAM" option seems redundant with the
You would think Sun would do a better job of documenting these options.