We are working on a (big) system that runs as a Java Web Start application. Thus, the user downloads the JNLP file, and runs it on his or her computer.
We have had issues with some users claiming that the application hangs when they open a few windows. We have made some tests and the reason is clear and repeatable:
- If a user opens the JNLP file using the 32 bit JVM, the max memory sticks to 256 MB, and once this threshold is surpassed, the application goes 0% free memory and hangs.
- If the same user opens the same JNLP file using the 64 bit JVM, the max memory starts at 256 MB, but as the system needs more memory, the JVM reserves and uses it freely, up to more than 1 GB if needed.
We made several tests and the situation is always the same.
Is there any way for the 32 bit JVM to behave exactly as the 64 bit? I know we can set a max heap size, but the final user may have 1GB, 2GB or 3GB of free memory, and we would like him or her to be able to use them if needed, which is exactly what happens with the 64 bit.
We are using Java 8, update 201.
The application's memory needs depend on how many windows do you open. For a normal use, 256MB-512MB would be more than enough, but some users would benefit from being able to open 7-10 screens, and that could go up to 800MB-1GB of RAM.