Max JVM Memory on Windows XP Home

F

Frank Cisco

Is there anyway of increasing the maximum allocated memory -Xms & -Xmx for
Java in Windows XP Home above 2GB? I can get 1600MB max even though there's
3GB available. OK the OS takes up a few 100MB, but there's plenty left - how
do you use it? Do I need to switch to a 64bit OS and 64bit JVM?
 
A

Arne Vajhøj

Frank said:
Is there anyway of increasing the maximum allocated memory -Xms & -Xmx for
Java in Windows XP Home above 2GB? I can get 1600MB max even though there's
3GB available. OK the OS takes up a few 100MB, but there's plenty left - how
do you use it? Do I need to switch to a 64bit OS and 64bit JVM?

Xms and Xmx is virtual memory not RAM.

In 32 bit windows the process can max. get 2 GB virtual memory
(or 3 GB if started with /3GB).

Java on 32 bit windows can not get more than 1.6-1.7 GB of heap
space.

And for SUN Java it does not even help to use /3GB because
it requires contiguous heap space and something get in at the
2 GB mark.

BEA (now Oracle) JRockit is supposed to be able to utilize up
to the 3 GB.

But the bottom line is: time to go 64 bit !!

Arne
 
F

Frank Cisco

Arne Vajhøj said:
Xms and Xmx is virtual memory not RAM.

In 32 bit windows the process can max. get 2 GB virtual memory
(or 3 GB if started with /3GB).

Java on 32 bit windows can not get more than 1.6-1.7 GB of heap
space.

And for SUN Java it does not even help to use /3GB because
it requires contiguous heap space and something get in at the
2 GB mark.

BEA (now Oracle) JRockit is supposed to be able to utilize up
to the 3 GB.

But the bottom line is: time to go 64 bit !!

Arne

Cheers. Why can BEA JRockit do 3GB yet Sun (the makers of Java in the 1st
place) can't?? Is it to do with $$? Has 64bit JVM on 64bit OS got any
limits?
 
A

Arne Vajhøj

Frank said:
Cheers. Why can BEA JRockit do 3GB yet Sun (the makers of Java in the 1st
place) can't??

They have spend the effort to support a non contiguous heap.

SUN could do it as well. But why bother. 2->3 GB is nothing compared
to the 64 bit world.
Is it to do with $$? Has 64bit JVM on 64bit OS got any
limits?

I don't know.

I believe that current x86-64 CPU's will limit you to 256 TB minus what
is reserved for OS.

The JVM's may have smaller limits.

I am confident that performance will come to a halt due to
lack of RAM before you hit the limit.

Arne
 
F

Frank Cisco

Arne Vajhøj said:
They have spend the effort to support a non contiguous heap.

SUN could do it as well. But why bother. 2->3 GB is nothing compared
to the 64 bit world.


I don't know.

I believe that current x86-64 CPU's will limit you to 256 TB minus what
is reserved for OS.

The JVM's may have smaller limits.

I am confident that performance will come to a halt due to
lack of RAM before you hit the limit.

Arne

256TB. That will probably do at the moment.
SUN could do it as well. But why bother. 2->3 GB is nothing compared
to the 64 bit world.

Because most stuff is still 32bit?
 
F

Frank Cisco

Peter Duniho said:
Care to clarify what you mean? If a program is "using" memory at all, it
has to be in physical memory; the whole point of virtual memory is to
allow data to be removed from physical memory when a program isn't "using"
it. At the same time, the only thing a program knows is its virtual
memory. As far as its concerned, it's always "using" virtual memory.

You seem to have some third type of "memory" in mind, which is neither
physical nor virtual. Perhaps you'd like to explain what that memory is.

Programs running on Windows (or any similar OS) only use virtual memory.
You have to go _well_ out of your way to make memory allocations from
physical memory, and doing so in a program like the JVM is a great way to
cripple your computer system. The normal memory allocation API available
to programs is only providing virtual memory to that program.

Of course, for a program to do anything with its virtual memory, the OS
has to map that virtual memory to some physical memory. But that's an
implementation detail; the program is still using virtual memory, even in
that case.

Thus Arne's comment. You have no control at all of physical memory used
by Java; that's up to the OS. But you do have control over the virtual
memory used, and that's what those switches specify. Far from being
"incorrect", Arne's post was exactly right.

Pete

OK can we just distinguish between virtual and physical memory. AFAIK
virtual memory on Windows is and area on HDD that is used when there's no
room left in RAM. Virtual memory with the JVM is different? And physical
memory is RAM of course?
 
L

Lew

Steve W. Jackson wrote:
Peter Duniho wrote:
Arne said:
[various opinions on the definition of "virtual memory"]

According to Wikipedia,
Virtual memory is a computer system technique which [sic]
gives an application program the impression that it has
contiguous working memory (an address space),
while in fact it may be physically fragmented
and may even overflow on to [sic] disk storage.

So the notion of swap space is not essential to the notion of virtual
memory.

Arne wins.
 
L

Lew

Peter said:
Viewing it as a competition can't be productive.  The important thing  
should be to get the facts straight, and everyone wins once we achieve  
that, even those who originally were wrong about their facts.

Do I really need to provide a smiley-face for that kind of remark?
Really?

Come on.
 
B

blue indigo

Why are we in this handbasket? :)

And why is it so darn hot??? Someone turn on the A/C!

* It's Friday the 13th! And when it's not, it's usually September...
 
F

Frank Cisco

Peter Duniho said:
I don't think he "suggested". He stated plainly.


I don't know the people of whom you speak, or the phrase "swap space".


That's true. But the heap is allocated from virtual memory, _only_.
That's what Arne is talking about.

His reply was suitable to the question. He points out that the amount of
physical RAM installed (which I believe is what Frank was describing when
he wrote "even though there's 3GB available") isn't relevant to limits on
memory allocations (including those used to allocate the JVM heap); only
the limits that apply to virtual memory are, and that's exactly what is
affected when one uses the -Xms and -Xmx switches (i.e. you'll only be
able to specify and receive a JVM heap as large as can be allocated from
virtual memory, no matter how large the physical memory is).

You can successfully allocate 1GB or more of memory, even if you only have
512MB (or less!) installed as physical RAM. Conversely, even if you have
32TB of physical RAM installed, you're only ever going to get a process to
see 2GB or 3GB of virtual memory (depending on configuration) if you're
running 32-bit Windows.

Again, the -Xms and -Xmx switches affect the _virtual_ memory side of this
equation, and have no relevance to the physical RAM installed. No matter
how much physical RAM you have installed, as a theoretical matter a
process isn't going to get more than 2GB of virtual memory allocated, and
as a practical matter, due to fragmentation and other uses of the virtual
address space, it isn't going to get much more than 1.5GB (Arne says
"1.6-1.7 GB", another person may see more or less, but it's going to be in
that general ballpark). Add about 1GB to those numbers for 32-bit Windows
configured with the 3GB option.

This is what Arne's talking about when he points out that it's virtual
memory, not physical memory, that's relevant when it comes to those
switches.

I read your first reply to him as a non-sequitur. Yes, you're right...the
switches control the Java heap size. But first you wrote that Arne was
"incorrect", when he never wrote anything that would suggest that the
switches _don't_ refer to the heap size, and in fact clearly describes the
_practical_ limit of heap size on a normal, 2GB-limited installation of
32-bit Windows. And then you wrote something that implied that a process
might use something _other_ than virtual memory, which is a) not correct,
and b) is itself not relevant to the question of what the switches do, nor
to whether Arne's statement was correct or not.


It's unfortunate that's what you were taught. Because your programs were,
in that scenario, always allocating virtual memory.


I hope that you now understand better what those terms actually mean.

Pete

OK. And to clear up

Physical Memory - RAM
Virtual Memory - Software dependent allocation of physical memory space (may
include swap space)

Correct?
 
A

Arne Vajhøj

Steve said:
This is incorrect. These figures specify minimum and maximum amounts of
memory to allocate to the JVM's heap. The underlying OS will determine
when it can use real RAM and and when to use virtual memory.

Nonsense.

Programs on a system that uses virtual memory (and that is practically
all systems today) can only access virtual memory.

That virtual memory can be backed by one or more of:
- RAM
- page/swap file
- program files and memory mapped files

Arne
 
A

Arne Vajhøj

Frank said:
OK can we just distinguish between virtual and physical memory. AFAIK
virtual memory on Windows is and area on HDD that is used when there's no
room left in RAM.

No.

Virtual memory - is memory addresses used by the application that
are mapped to something typical RAM or page/swap file by the
operating system.

For reasons unknown to me MS choose to put the control of page
file under the label "Virtual Memory", but considering this is
a programming group I think we can ignore that.

Arne
 
A

Arne Vajhøj

Steve said:
Arne's post suggested (my interpretation) that those two switches only
refer to virtual memory,

That is correct.

And it is true.
which I take to mean what so many people call
"swap space".

Hopefully not too many programmers.

Because that is not what virtual memory means.

Arne
 
A

Arne Vajhøj

Steve said:
I clearly explained how I learned and have always used the terms, and my
statements clarify just exactly what the switches mean in that context.
That is *not* nonsense. That is completely accurate within the given
context. We clearly had different understanding of the specific
terminology. When I claimed that what you said was incorrect, it was
based on my own understanding of the terms and lack of understanding of
how you used them. Continuing to call my explanation nonsense and
promote your own preferred terms gains nothing.

You were correct in what you said if your use of the terms is presumed.
That's that.

I can also define that I consider up to be towards the earth and
down to be towards the sky and then claims that water fall up.

But it does not make any sense, because there is a common definition
of up and down and picking a personal definition that contradicts
the general definition just creates confusion.

The term virtual memory has a well defined meaning in the context
of operating systems and programming.

(the fact that the average home computer user has a different
definition due to how MS chose to label some screens in Windows
should be irrelevant in a programming forum)

And your statement was wrong according to the general definition.

Arne
 
A

Arne Vajhøj

Larry said:
I see that Paul has now infected individual.net as well as aioe,
motzarella, and google groups.

He's also getting a little smarter about header-spoofing, or else he
went and bought himself a mac. Given the opinions he's occasionally
expressed about macs, I rather suspect the former.

But the steadfast refusal to accept correction by Arne and others is
quite enough to know him by.

I am not convinced.

There are similarities, but it does not have the correct
level of absurdity.

Arne
 
L

Larry K. Wollensham

Arne said:
I am not convinced.

There are similarities, but it does not have the correct
level of absurdity.

Do I need to break out the ticklist?

OK, OK, I guess I do.

Windows-centrism? Check.
Oddly spotty programming-knowledge cluelessness? Check.
Open mouth, insert foot? Check.
Stubborn clinging to his beliefs? Check.
Tries to weasel out of admitting an error by painting it as a difference
of opinion or of terminology? Check. (To both.)
Posts through GG from Bell Canada DSL, or through a public newsserver
that hides his IP? Check. (The latter this time.)

Heck, the first item is also further evidence that the user-agent header
in his post was spoofed.

But of course the final clincher will be when he replies to all of this
to strenuously deny being Paul and tell us all that none of the nasty
things that we've said are true. Which I predict will happen within the
week, and quite possibly within the next few hours.
 
J

Jerry Gerrone

Steve said:
You were correct in what you said if your use of the terms is presumed.  
That's that.

I see that Paul has now [implied insult deleted] individual.net as well
as aioe, motzarella, and google groups.

[implied insults deleted][promotes Macintosh computers?][insult
deleted]

I feel inspired to [numerous implied insults deleted]

As explained previously, I find it necessary to assume that all
insults aimed at "Paul" here are actually intended for me, and respond
in both of our defense. To set the record straight:

* I am not Paul. Nor am I Steve.
* None of the nasty things that you have said or implied are
true of me.
* I don't know whether the insults are true of Paul, or of
Steve, or whether Steve is Paul, but I very much doubt
that either would appreciate your insulting or speculating
about him.
 

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,769
Messages
2,569,582
Members
45,062
Latest member
OrderKetozenseACV

Latest Threads

Top