The reason for this is that the default -Xmx value is 64MB. On Linux
you can not treat
(1) reserving part your addresss space and
(2) comitting swap to it
as two different ops. You get both at one shot. (This is my
understanding, I could be wrong, please correct me if you are better
informed about kernel land).
On Solaris you can do this in two stages (see mmap man page, and look
for MAP_NORESERVE). So having a default -Xmx of 64MB works well. ps
and other proc tools will show that you are using only part of the
-Xmx value (the parts for which swap has been committed).
You didn't see this on 1.1.x because the default -Xmx value is 16MB.
Java 2 SDK on Linux should probably use 32M as the default.
Another bad side effect of this limitation is that the famous "return
memory to OS" bug can not be implemented on Linux (ie, there is no
heap "shrinking").
There are two ways in which we can fix the problem in the long run:
-- MAP_NORESERVE is implemented in the Linux kernel (notice that
Win32 supports a similar feature, so we are not talking a
Solarism here).
-- The JVM's garbage collector is made to work with discontiguous
heaps. The discontiguous heap has not been tested in a long
time and I'm very certain it don't work. But someone can always
fix it.
Personally I prefer the former solution because:
-- we end up using the same code on Linux as we do on Solaris,
ie, more testing
-- discontiguous heaps has performance implications for the tight
loops that the GC runs
-Anand.
"C.J. Beyer" <[EMAIL PROTECTED]> writes:
> I noticed the linux jdk1.2 now has a 70 meg footprint in ram
> (as opposed to 6 meg for 1.1.7).
> Is this because it was built with special debugging info or
> should I expect it to remain this big (necessitating the purchase
> of another 64M of ram)?
>
> C.J. Beyer
> [EMAIL PROTECTED]
> http://styx.phy.vanderbilt.edu/~cj/
>
>
>
> ----------------------------------------------------------------------
> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]