Taming Java on Ubuntu 64-bit
Posted by mholmes on 03 May 2010 in R & D, Activity log, Documentation
For some time, I've been experiencing freezes on my machine when running both Tomcat and oXygen at the same time. Today we worked hard to find a fix for this, and we seem to have a working solution:
- Restrict the memory available to Tomcat by adding this to the top of [tomcat]/bin/catalina.sh:
JAVA_OPTS=-Xms128M" "-Xmx256M" "-XX:MaxPermSize=256m
Tomcat had been eating up an amazing 18GB of virtual memory. - Prevent oXygen from using its own JRE, by renaming the "jre" directory in the oXygen directory so that it can't find the local one, and falls back on the system VM. oXygen is still using lots of memory (13 GB of virtual memory), but it's not bringing the machine to its knees.
We think the heart of the problem was running two relatively unrestricted Java apps each using a different VM on the same system.