tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jess Holle <>
Subject Re: two instances of Tomcat in same machine
Date Wed, 16 May 2012 13:09:08 GMT
On Windows 32-bit JVMs are often limited to less than 1.3GB of heap due 
to fragmentation of the 32-bit address space.  Sometimes one cannot even 
get 1GB of heap!

For any hefty server process on Windows you really want a 64-bit JVM for 
this reason.

On other OS's one can often allocate much more heap under 32-bit 
addressing.  How much depends on the OS, etc, but generally is much more 
like 3GB.

Jess Holle

On 5/16/2012 8:04 AM, André Warnier wrote:
> Miguel Gonzalez wrote:
>> there wasn't a limit of 32 bits OS for running JVM for more than 1.5 Gb?
> Not exactly.  I'm not sure that my knowledge is totally accurate here, 
> but here is my take on it :
> - a "32 bit OS" generally means that the total address space available 
> to *a process* running at any point in time under that OS is 2^32 = 
> 4,294,967,296 bytes, which is 4 GB (give or take :-)).
> - this includes the memory accupied by the resident part of the OS, so 
> that in the practice nowadays, a process can use only a fraction of 
> that, say 2-3 GB.
> - that available addressable space is shared between the code of the 
> process, and the in-memory data needed by that process
> - the JVM (which runs Tomcat) is one such process.  The code of the 
> JVM itself occupies some memory. For the JVM, the Tomcat code and your 
> application code is data, which uses a part of the addressable space 
> available to the JVM process. The JVM also allocates some space for 
> the data that Tomcat and your applications use, dynamically, as needed 
> and requested by Tomcat and your applications.  In Java, most of that 
> "work memory" is allocated in a memory structure called the Heap.
> - in the practice thus, if you are running a Java application under a 
> Java JVM under a 32-bit OS, the maximum size of the Heap that your 
> application will be able to use is likely to limited to around 2-2.5 
> GB.  OS-specific characteristics may further reduce this.
> On hardware that can use 64-bit addresses, and with an OS that can use 
> a 64-bit address space, these limits are much higher (2^64 = 
> 18,446,744,073,709,551,616 bytes), so that in the practice you would 
> run out of money long before your run out of Heap space.
> (And you would also run out of time before you fill up all that memory).
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message