JVM Sizing

Discussion in 'Java' started by Gilbert Ostlethwaite, Dec 18, 2006.

  1. Hi

    Is there a maximum amount of memory that can be addressed by the JVM
    and, if so, does it vary by JVM version?

    Regards
    Gilbert Ostlethwaite, Dec 18, 2006
    #1
    1. Advertising

  2. In article <>,
    "Gilbert Ostlethwaite" <> wrote:

    > Hi
    >
    > Is there a maximum amount of memory that can be addressed by the JVM
    > and, if so, does it vary by JVM version?
    >
    > Regards


    Yes, there is a maximum. It varies by platform, I know. As far as I'm
    aware, it didn't change between 1.4.x and 1.5, and I don't think it has
    for 1.6. But what it is depends on the underlying architecture.
    --
    Steve W. Jackson
    Montgomery, Alabama
    Steve W. Jackson, Dec 18, 2006
    #2
    1. Advertising

  3. Gilbert Ostlethwaite wrote:
    > Hi
    >
    > Is there a maximum amount of memory that can be addressed by the JVM
    > and, if so, does it vary by JVM version?


    It varies with the -Xmx commandline parameter. E.g. -Xmx 256m gives it
    256 megs (a quarter gig). Usually enough for anything.
    John Ersatznom, Dec 18, 2006
    #3
  4. "John Ersatznom" <> wrote in message
    news:em6ulp$ud7$...
    > Gilbert Ostlethwaite wrote:
    >> Hi
    >>
    >> Is there a maximum amount of memory that can be addressed by the JVM
    >> and, if so, does it vary by JVM version?

    >
    > It varies with the -Xmx commandline parameter. E.g. -Xmx 256m gives it 256
    > megs (a quarter gig). Usually enough for anything.


    Famous last words, like who could use more than 640K on a computer?

    Matt Humphrey http://www.iviz.com/
    Matt Humphrey, Dec 19, 2006
    #4
  5. Matt Humphrey wrote:
    > "John Ersatznom" <> wrote in message
    > news:em6ulp$ud7$...
    >
    >>Gilbert Ostlethwaite wrote:
    >>
    >>>Hi
    >>>
    >>>Is there a maximum amount of memory that can be addressed by the JVM
    >>>and, if so, does it vary by JVM version?

    >>
    >>It varies with the -Xmx commandline parameter. E.g. -Xmx 256m gives it 256
    >>megs (a quarter gig). Usually enough for anything.

    >
    >
    > Famous last words, like who could use more than 640K on a computer?


    I'm not claiming it's "all you'll ever need", just that it's usually
    enough for *current* stuff. :)
    John Ersatznom, Dec 19, 2006
    #5
  6. >
    > Yes, there is a maximum. It varies by platform, I know. As far as I'm
    > aware, it didn't change between 1.4.x and 1.5, and I don't think it has
    > for 1.6. But what it is depends on the underlying architecture.
    >


    Do you know where this might be documented - I've not been able to find
    anything to date.

    Regards
    Gilbert Ostlethwaite, Dec 19, 2006
    #6
  7. In article <>,
    "Gilbert Ostlethwaite" <> wrote:

    > >
    > > Yes, there is a maximum. It varies by platform, I know. As far as I'm
    > > aware, it didn't change between 1.4.x and 1.5, and I don't think it has
    > > for 1.6. But what it is depends on the underlying architecture.
    > >

    >
    > Do you know where this might be documented - I've not been able to find
    > anything to date.
    >
    > Regards


    First, let me qualify this by saying that I'm talking about the largest
    value that can be used with the -Xmx switch. Other respondents mention
    the JVM's default maximum heap size, which is not what I thought the
    original query wanted.

    I haven't seen any written documentation on the allowable values for
    this setting, but I have experimented with it because of questions and
    issues I've dealt with. So I know, for instance, that the Java mailing
    list for Mac developers has discussed it and concluded that the largest
    setting is 2108m. I don't recall the largest value in a Linux setting,
    but I've experimented on Windows XP and found that it's 1612m. I
    learned this using the command "java -Xmx####m" and playing a sort of
    high-low game until I got the maximum value.

    = Steve =
    --
    Steve W. Jackson
    Montgomery, Alabama
    Steve W. Jackson, Dec 19, 2006
    #7
  8. "Gilbert Ostlethwaite" <> burped up warm pablum

    in news::

    > Hi
    >
    > Is there a maximum amount of memory that can be addressed by the JVM
    > and, if so, does it vary by JVM version?
    >
    > Regards
    >


    Well, a 32 bit JVM could address up to 4 GB of memory. A 64 bit JVM could
    address up to 2^34 GB of memory.

    --
    Tris Orendorff
    [Q: What kind of modem did Jimi Hendrix use?
    A: A purple Hayes.]
    Tris Orendorff, Dec 21, 2006
    #8
  9. Gilbert Ostlethwaite

    Tim Slattery Guest

    Tris Orendorff <> wrote:

    >"Gilbert Ostlethwaite" <> burped up warm pablum
    >
    >in news::
    >
    >> Hi
    >>
    >> Is there a maximum amount of memory that can be addressed by the JVM
    >> and, if so, does it vary by JVM version?
    >>
    >> Regards
    >>

    >
    >Well, a 32 bit JVM could address up to 4 GB of memory. A 64 bit JVM could
    >address up to 2^34 GB of memory.


    Why 2**34, that's only two bits more address space than the 4GB 32-bit
    version?

    --
    Tim Slattery

    http://members.cox.net/slatteryt
    Tim Slattery, Dec 21, 2006
    #9
  10. Gilbert Ostlethwaite

    Lew Guest

    Tris Orendorff <> wrote:
    >> Well, a 32 bit JVM could address up to 4 GB of memory. A 64 bit JVM could
    >> address up to 2^34 GB of memory.


    Tim Slattery wrote:
    > Why 2**34, that's only two bits more address space than the 4GB 32-bit
    > version?


    2^34 is substantially larger than 4. Both were in units of GB.

    - Lew
    Lew, Dec 22, 2006
    #10
  11. Gilbert Ostlethwaite

    Tim Slattery Guest

    Lew <> wrote:

    >Tris Orendorff <> wrote:
    >>> Well, a 32 bit JVM could address up to 4 GB of memory. A 64 bit JVM could
    >>> address up to 2^34 GB of memory.

    >
    >Tim Slattery wrote:
    >> Why 2**34, that's only two bits more address space than the 4GB 32-bit
    >> version?

    >
    >2^34 is substantially larger than 4. Both were in units of GB.


    2**32 = 4,294,967,296. 2**34 = 17,179,869,184 or 4 times 2**32.
    substantially larger, yes, but 64-bit Windows systems, for example,
    implement a 37-bit address space which allows for 137,438,953,472
    bytes (128GB). Far more than anybody today contemplates installing in
    their computer, but miniscule compared to an actual 64-bit address
    space.

    I just wondered why a 64-bit JVM expands the address space by only two
    bits? I agree there's no reason to go all the way to 64-bits at this
    point, but 34 bits doesn't seem reasonable to me.

    --
    Tim Slattery

    http://members.cox.net/slatteryt
    Tim Slattery, Dec 22, 2006
    #11
  12. Tim Slattery wrote:
    > Lew <> wrote:
    >
    >> Tris Orendorff <> wrote:
    >>>> Well, a 32 bit JVM could address up to 4 GB of memory. A 64 bit JVM could
    >>>> address up to 2^34 GB of memory.

    >> Tim Slattery wrote:
    >>> Why 2**34, that's only two bits more address space than the 4GB 32-bit
    >>> version?

    >> 2^34 is substantially larger than 4. Both were in units of GB.

    >
    > 2**32 = 4,294,967,296. 2**34 = 17,179,869,184 or 4 times 2**32.
    > substantially larger, yes, but 64-bit Windows systems, for example,
    > implement a 37-bit address space which allows for 137,438,953,472
    > bytes (128GB). Far more than anybody today contemplates installing in
    > their computer, but miniscule compared to an actual 64-bit address
    > space.
    >
    > I just wondered why a 64-bit JVM expands the address space by only two
    > bits? I agree there's no reason to go all the way to 64-bits at this
    > point, but 34 bits doesn't seem reasonable to me.


    Read it again. He said:
    32 bits gives 4 GB (4 gibibytes, actually)
    64 bits gives 2^34 GB (again, it should be GiB)

    2^34 GiB = 16,777,216 tebibytes = 16,384 pebibytes = 16 exbibytes

    --
    John W. Kennedy
    "The blind rulers of Logres
    Nourished the land on a fallacy of rational virtue."
    -- Charles Williams. "Taliessin through Logres: Prelude"
    John W. Kennedy, Dec 22, 2006
    #12
  13. John W. Kennedy wrote:
    > 32 bits gives 4 GB (4 gibibytes, actually)
    > 64 bits gives 2^34 GB (again, it should be GiB)
    >
    > 2^34 GiB = 16,777,216 tebibytes = 16,384 pebibytes = 16 exbibytes


    My one-year-old niece says things like "gibibytes", usually when we're
    baking cookies and she's visiting.

    Whoever came up with those ... words has managed the impossible:
    outdoing the Académie Française and won the Year's Most Boneheaded
    Top-Down Language-Engineering Attempt Award at the 2006 Chomskys,
    finally ending the illustrious French Academy's 370-year-long winning
    streak. Or would have, if they had Chomsky awards, and I were impaneled
    as a judge. (The Academy's suggested translation of "iPod" made it a
    very close thing, mind you.)

    P.S. Some references:
    http://netjmc.typepad.com/globally_local/2006/08/to_google_or_to.html
    http://techdirt.com/article.php?sid=20061215/003106
    John Ersatznom, Dec 23, 2006
    #13
  14. Gilbert Ostlethwaite wrote:
    > Is there a maximum amount of memory that can be addressed by the JVM
    > and, if so, does it vary by JVM version?


    It depends on the JVM.

    But if you mean SUN Win32 32 bit JVM then the
    limit is about 1.5 GB.

    Arne
    =?ISO-8859-1?Q?Arne_Vajh=F8j?=, Dec 24, 2006
    #14
    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. Fabrizio

    ASPX page sizing

    Fabrizio, Nov 27, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    328
    Teemu Keiski
    Nov 27, 2003
  2. Tim Marsden

    Sizing and positioning of dynamic controls

    Tim Marsden, Feb 25, 2004, in forum: ASP .Net
    Replies:
    4
    Views:
    2,954
    Steven Cheng[MSFT]
    Mar 2, 2004
  3. Kevin Hooke

    Re: Handling both MS JVM and Sun JVM

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

    MS JVM and Sun JVM problem

    Young-Jin Lee, Jan 20, 2004, in forum: Java
    Replies:
    3
    Views:
    566
    Mickey Segal
    Jan 21, 2004
Loading...

Share This Page