What is the maximum JVM heap size on Linux?
843811May 12 2003 — edited May 12 2003Java: 1.4.1_01
OS: Red Hat Linux 7.3
Kernel: 2.4.18-27
I have an SMP system with 4GB of memory and I cannot get the heap size set higher than about "-Xms1845M -Xmx1845M -Xss96K". I have seen numerous postings and references to the heap settings for the JVM, but nothing definitive for Linux other than the following link which only talks about Java 1.3 and does not talk about a specific version of the Linux kernel, which judging by the post date and Java version probably meant a Linux 2.2.x version kernel--http://developer.java.sun.com/developer/bugParade/bugs/4435069.html.
I have tested this limit with increased swap at 2GB and 4GB, but it made no difference. In fact, the system reported that it never even touched the swap space, more than likely due to the 4GB of memory on the system. Will someone provide a definitive answer to this problem? Does this limitation still exist with the Linux 2.4.x version kernels? All the JVM documentation for Java 1.4+ states that it is no longer constrained by a 2GB heap. Will I be able to get bigger heaps (greater than 2GB) on a Linux system by moving to a 64 bit platform? Does anyone have experience with this?