Am 30.11.2011 12:08, schrieb j...@gniffelnieuws.net:
On Wed, 30 Nov 2011 16:14:45 +0530, Choudhury wrote
Hello ,
         The question is not why I would use 32 bit JVM , the
question is whether there is any maximum limit on memory for Tomcat
and if yes why ? Regards,

The limit is the JVM, not Tomcat itself

It depends on the windows version used actually. From what I remember this is
limited to maximum 2GB for user processes. The easiest way to test is, is with
a small app that shows some memory information like:
public class MaxMemory {
     public static void main(String[] args) {
         Runtime rt = Runtime.getRuntime();
         long totalMem = rt.totalMemory();
         long maxMem = rt.maxMemory();
         long freeMem = rt.freeMemory();
         double megs = 1048576.0;

         System.out.println ("Total Memory: " + totalMem + " (" +
(totalMem/megs) + " MiB)");
         System.out.println ("Max Memory:   " + maxMem + " (" + (maxMem/megs) +
" MiB)");
         System.out.println ("Free Memory:  " + freeMem + " (" + (freeMem/megs)
+ " MiB)");
     }
}

Try to run it with different options for the heap. I would be surprised if you
would get over 1600MB.

This is what we experienced: up to 1GB Heap (Xmx) was stable on all servers.
Heaps larger were very prone to crashes. We've seen a maximum of 1.2GB Heap on Windows with 32bit JVMs

That's why we have switched to 64bit JVMs on all machines. No need to swap JVM editions when applications require more memory - just increase Xmx as long as RAM is available.

  Stefan

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

Reply via email to