JVM Sizing

  • Thread starter Gilbert Ostlethwaite
  • Start date
G

Gilbert Ostlethwaite

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
 
S

Steve W. Jackson

"Gilbert Ostlethwaite said:
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.
 
J

John Ersatznom

Gilbert said:
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.
 
M

Matt Humphrey

John Ersatznom said:
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 (e-mail address removed) http://www.iviz.com/
 
J

John Ersatznom

Matt said:
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. :)
 
G

Gilbert Ostlethwaite

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
 
S

Steve W. Jackson

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[/QUOTE]

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 =
 
T

Tris Orendorff

"Gilbert Ostlethwaite" <[email protected]> burped up warm pablum

in
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.
 
T

Tim Slattery

Lew said:
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
(e-mail address removed)
http://members.cox.net/slatteryt
 
J

John W. Kennedy

Tim said:
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
 
J

John Ersatznom

John 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

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
 
?

=?ISO-8859-1?Q?Arne_Vajh=F8j?=

Gilbert said:
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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top