Monday, October 18, 2010

Setting Tomcat JVM heap size as a percentage of total ram

Put at start of "bin/startup.sh"

export CATALINA_OPTS="-Xmx`cat /proc/meminfo | grep MemTotal | awk '{ print $2*0.75 } '`k"


..to use 75% of your total system memory for JVM.
Add to /bin/tomcat.sh or whatev's

No comments: