Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / December 2006

Tip: Looking for answers? Try searching our database.

JVM Sizing

Thread view: 
Gilbert Ostlethwaite - 18 Dec 2006 10:33 GMT
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
Steve W. Jackson - 18 Dec 2006 20:44 GMT
> 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.
Signature

Steve W. Jackson
Montgomery, Alabama

Gilbert Ostlethwaite - 19 Dec 2006 11:50 GMT
> 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
Steve W. Jackson - 19 Dec 2006 16:02 GMT
> > 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
[quoted text clipped - 4 lines]
>
> 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 =
Signature

Steve W. Jackson
Montgomery, Alabama

John Ersatznom - 18 Dec 2006 20:47 GMT
> 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.
Matt Humphrey - 19 Dec 2006 01:59 GMT
>> Hi
>>
[quoted text clipped - 3 lines]
> 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 matth@ivizNOSPAM.com http://www.iviz.com/
John Ersatznom - 19 Dec 2006 02:20 GMT
>>>Hi
>>>
[quoted text clipped - 5 lines]
>
> 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. :)
Tris Orendorff - 21 Dec 2006 13:24 GMT
> 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.

Signature

Tris Orendorff
[Q: What kind of modem did Jimi Hendrix use?
A: A purple Hayes.]

Tim Slattery - 21 Dec 2006 18:41 GMT
>> Hi
>>
[quoted text clipped - 5 lines]
>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
Slattery_T@bls.gov
http://members.cox.net/slatteryt
Lew - 22 Dec 2006 00:23 GMT
Tris Orendorff <triso@remove-me.cogeco.ca> 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.

> 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
Tim Slattery - 22 Dec 2006 14:05 GMT
>Tris Orendorff <triso@remove-me.cogeco.ca> wrote:
>>> Well, a 32 bit JVM could address up to 4 GB of memory.  A 64 bit JVM could
[quoted text clipped - 4 lines]
>
>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
Slattery_T@bls.gov
http://members.cox.net/slatteryt
John W. Kennedy - 22 Dec 2006 21:40 GMT
>> Tris Orendorff <triso@remove-me.cogeco.ca> wrote:
>>>> Well, a 32 bit JVM could address up to 4 GB of memory.  A 64 bit JVM could
[quoted text clipped - 13 lines]
> 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

Signature

John W. Kennedy
"The blind rulers of Logres
Nourished the land on a fallacy of rational virtue."
  -- Charles Williams.  "Taliessin through Logres: Prelude"

John Ersatznom - 23 Dec 2006 13:48 GMT
>  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
Arne Vajhøj - 24 Dec 2006 03:02 GMT
> 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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.