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

Francis,

On 11/29/11 10:28 AM, Francis GALIEGUE wrote:
> On Tue, Nov 29, 2011 at 16:26, hi tanin <hi_ta...@yahoo.com>
> wrote:
>> Thanks for your reply. If i upgrated into 64-bit system
> 
> __AND__ 64bit JDK...

Yes, this is the important part. You can certainly run a 32-bit JVM on a
64-bit OS and you'll still have the same memory restrictions.

If you're going to use a 64-bit JVM, consider looking into options like
"use compressed OOPs" -- just Google for it a do a bit of reading to see
if it makes sense in your environment.

>> then what will be the memory limit for Tomcat 5.0.27? Is there
>> any way to find out the mamimum memoery limit ?
> 
> More than you will be able to buy!

Yup. 2^64 is a *lot* of memory.

It's worth noting that this is not a Tomcat limit at all... this has
to do with the JVM itself and the realities of a 32-bit OS.

A 32-bit OS provides a 4GiB (that's 2^32 if you didn't know)
addressable memory space to (most) every process, a portion of which
is mapped into kernel space for buffers and stuff like that, a portion
which is used for stack space and a portion which is used for heap space.

The JVM further confuses the issue by having settings for "heap space"
which is the Java Object heap and not technically the process's heap.
There are things that go into the process's heap that aren't in the
Java "heap" so it's easy to get confused.

In order to run, the JVM (and the OS) must allocate (or at least
reserve, or map, or whatever) the following memory regions (and
probably many more):

* kernel memory (buffers, process and thread management)
* process memory (4GiB - kernel memory) - this is what the JVM
  can use
* JVM: internal structures to manage the JVM including management
       of all the heaps, memory regions, and GC
* JVM: perm gen space
* JVM: heap space
* JVM: thread stack space (which may overlap with the kernel thread
       mgmt stuff)

As you can see, the Java "heap" is only one of many things that take
up memory in the process. If you start with 4GiB (and, on Windows, I
think you really start at either 3GiB or 2GiB for some reason), then
everything else chips-away at your process's memory space until the
heap gets it's chunk. That usually tops out somewhere around the 2GiB
mark, depending on a *lot* of factors (see above).

I hope that helps,
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk7U/NsACgkQ9CaO5/Lv0PCaywCdGa97lyHHn4dlN/KUT9BDxvsx
BY4An3Kmm0m11WnT7wBpwFYzBk/WZ3L1
=GxZg
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to