Sun's 1.5 JVM: the -XX:DefaultMaxRAM option and its cousins

Discussion in 'Java' started by fredakers907@yahoo.com, Dec 12, 2006.

  1. Guest

    Hi.

    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
    sun's website:
    http://java.sun.com/docs/hotspot/gc5.0/gc_tuning_5.html#0.0.0.0.Out-of-Memory Exceptions|outline


    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 /
    DefaultMaxRAM.
    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 /
    DefaultMaxRAMFraction"

    ------------

    I am thinking it's a typo because I just looked at:

    http://java.sun.com/developer/JDCTechTips/2005/tt0216.html

    You can further control the heap size through the following new
    options:

    -XX:DefaultInitialRAMFraction=VALUE
    -XX:DefaultMaxRAM=VALUE
    -XX:DefaultMaxRAMFraction=VALUE

    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
    already the
    "-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
    "-Xmx" option.

    You would think Sun would do a better job of documenting these options.
    , Dec 12, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kevin Hooke

    Re: Handling both MS JVM and Sun JVM

    Kevin Hooke, Aug 26, 2003, in forum: Java
    Replies:
    2
    Views:
    865
  2. Lasse
    Replies:
    1
    Views:
    683
    Jon A. Cruz
    Jan 5, 2004
  3. Young-Jin Lee

    MS JVM and Sun JVM problem

    Young-Jin Lee, Jan 20, 2004, in forum: Java
    Replies:
    3
    Views:
    564
    Mickey Segal
    Jan 21, 2004
  4. Replies:
    0
    Views:
    2,854
  5. bob smith

    Java cousins

    bob smith, Jan 24, 2013, in forum: Java
    Replies:
    6
    Views:
    266
Loading...

Share This Page