-Xmx<size> issues
843798Nov 14 2005 — edited Nov 14 2005Quick Overview of Application:
I have wrote an applet that uses JAI to display and manipulate images on screen. At any point in time there will be 2 - 15 1MB+ images loaded into memory and being displayed for editing.
I have managed to optimize it down to use about 150MB - 300MB of ram.
--
When I run the applet I am setting the -Xmx<size> setting for the JVM using the java control panel.
The problem I am having is determining the maximum value for the Xmx switch.
On some computers I can set the value to the total amount of ram. On other computers it can only be about 60% of the amount of ram.
Sometimes if the setting is to high the JVM wont start and will say "Several java virtual machines running in the same process caused an error".
Sometimes it will appear to work but the applet throws OutOfMemory erros at 96MB.
Other times, it will work fine.
There are no common factors that I can find to reproduce this problem. I have tested this applet on the following computers.
win xp - p4 2.4Ghz - 768MB ram - max Xmx=512m
win xp - p4 3Ghz - 1024MB ram - max Xmx=1024m
win xp - p2 586Mhz - 192MB ram - max Xmx=192m
win xp - p3 1.05Ghz - 962MB ram - max Xmx=??? (never works)
win xp - p4 2.4Ghz - 768MB ram - max Xmx=768m
--
How do I go about determining the maximum value for this setting???
Why are these issues occuring?
Thanks,
Matt