Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

When your web application is using large memory as this memory size default setting can be too small, 64MB by default,thus the application becomes slower because the garbage collector is invoked more often, and it can even run out of memory (outofmemory / heap space error ). One way to address this problem is to set a larger heap size . In Windows system, this can be done by editing / adding JAVA_OPTS variable (should be early in the file) in CATALINA_HOME/bin/catalina.bat or catalina.sh for Linux/Unix systems.Parameters to be added are , let say you want to increase it to 256 MB (as you required but make sure you have enough amount of physical memory/RAM and for 32bit system , use no more than 1-1.2 GB heap space size ) , use '-Xms256m -Xmx256m' .In some cases , it is better to set slightly lower size for -Xms . There are other parameters can be added , some of them :'-XX:MaxNewSize -XX:NewSize -XX:MaxPermSize' , depending on your application and requirements .

...

No Format
 JAVA_OPTS='-Xms256m -Xmx256m' 

For other parameters , go to

and Google and Yahoo are your friends.