Wednesday, August 20, 2008

How to set heap size for tomcat on Linux.

I was searching about the subject on internet. But unable to find a exact answer. Finally I manage to solve my probe with below mentioned work round.This is a quick tip to change heap size for tomcat.

Fist set the CATALINA_OPTS as follows.
export CATALINA_OPTS="-Xms256m -Xmx900m"

Then start the tomcat server by > sh startup.sh

The two JVM options for heap size are

-Xms - is the minimum or initial size of your heap
-Xmx - is the maximum size of your heap.

No comments: