Re: How much of your RAM can you use with the -Xmx option?
- From: "Kent Paul Dolan" <xanthian@xxxxxxxx>
- Date: Tue, 10 Jan 2006 08:51:37 +0000 (UTC)
"Roedy Green"
<my_email_is_posted_on_my_website@xxxxxxxxxxxxxx>
wrote:
> Adam Funk <a24061@xxxxxxxxx> wrote:
>> What proportion of the RAM on a machine can you
>> give to the java -Xmx option?
You give a quantity of memory, but it isn't
specifically virtual or real (RAM) memory, best I
can understand, just "memory".
> You can give any percent you want.
Careful. If you give more than 2^31 bytes, at least
on a 32 bit hardware CPU (that's -Xmx2048m), you'll
get an error message about exceeding the addressing
limit. Most default setups won't let you have even
that much because the swap region isn't that big by
default.
> Since RAM is virtual
Umm, nope, but someone else told you that. "RAM" is
"Random Access Memory", the hardware stuff. It can
be _organized_ as (part of) virtual memory, with some
paging scheme, but it is inherently real memory itself.
[Virtual memory isn't "Random Access Memory", you get
a whole page, or you get nothing at all, you can't
ask for a smaller fraction of a page to be loaded
from the swap space.]
> you can give more than you have. You will
> discover by experiment the optimal amount. It
> depends on what other programs you want to run at
> the same time, your OS and the relative speed of
> your disk/cpu/ram.
Yes, but -- the main factor is how much you want to
sacrifice to cut down the frequency of Java garbage
collection pauses (and yes, I know there are obscure
ways to spread them out, in theory, to be nearly
indetectable), backed up by the even more stringent
requirement of how much you have to give to allow
your application to run at all. My toy Traveller
lets me eat memory at will, just by increasing
either the problem size or the (genetic algorithm)
population size, or both, and it is trivial to
overrun the 64MBytes which is the Java heap space
default. I usually run with -Xmx512m or -Xmx1024m,
depending on the size of the hard drive swap area
I've reserved on the particular computer, which
Works For Me but might drive others nuts.
FWIW
xanthian.
--
Posted via Mailgate.ORG Server - http://www.Mailgate.ORG
.
- Follow-Ups:
- Re: How much of your RAM can you use with the -Xmx option?
- From: Roedy Green
- Re: How much of your RAM can you use with the -Xmx option?
- References:
- How much of your RAM can you use with the -Xmx option?
- From: Adam Funk
- Re: How much of your RAM can you use with the -Xmx option?
- From: Roedy Green
- How much of your RAM can you use with the -Xmx option?
- Prev by Date: Each client gets the same port number
- Next by Date: Re: How to restore a minimized window application
- Previous by thread: Re: How much of your RAM can you use with the -Xmx option?
- Next by thread: Re: How much of your RAM can you use with the -Xmx option?
- Index(es):
Relevant Pages
|