-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Tracy,

Nelson, Tracy M. wrote:
> | From: Christopher Schultz [mailto:[EMAIL PROTECTED]
> | Sent: Wednesday, 14 March, 2007 10:37
> | 
> | The fact remains that you can't allocate a VM heap bigger than around
> | 1750MB on my 32-bit, 2.6 Linux kernel. Why not?
> 
> If, as you stated earlier, you only have 1G of physical and 1G of virtual
> memory, then that's probably the limit you're hitting.

Perhaps, but the JVM actually refuses to start right away. In my "eat
all my memory" tests, I was able to eat around 1.6GB before I brought my
machine to a crawl. It took more than a minute for my terminal to
respond to a CRTL-C (or perhaps the kernel killed my process for virtual
memory exhaustion). That process took at least a minute.

Then again, I was allocating my memory in 50MB chunks and then writing
to them. Perhaps Sun's JVM on Linux allocates the whole chunk of memory
at once (which doesn't do anything on Linux glibc) and then writes to
the last page to see that it can be used. That doesn't seem right, so
there must be some other voodoo going on here.

> Maybe for the sake of experimenting you could use a USB flash
> drive for a swap device.  Even if it's just 256MB, you should be able to see
> if it's a swap space limitation or something more sinister...

Not a bad idea, but sadly I don't have USB support available in my
kernel. I have a buddy with a 128MB ppc-Linux 2.6 box with 512MB swap
and java installed. I had him check, and his bombs (with a jvm panic!)
when asking for even 512MB. So, it looks like physical memory and swap
also have an effect. I would have expected the JVM to simply attempt to
allocate the memory and use it.

For instance, "java -Xmx512M -Xms512M -version" bombs on this little
box, even though the heap is pretty much never used. The JVM must check
to see if the heap request is ever going to be invalid and then simply
refuses to start. Not sure how it does that quickly, though. I know that
Linux will lie to a process that requests memory and indicate success
when it's possible that actually using that memory will fail.

- -chris

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFF+Cso9CaO5/Lv0PARAiT/AKCytag1TNFoOkV0oE0cp3HmhrxmWwCcD1fE
aKa8QlXjRcQhGCIPdV84Ngo=
=eAGf
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to