Default language.

Setting the Java heap size


As a starting point, set the Java heap size to a minimum of 16 GB for a medium environment. After upgrading, you should monitor the memory usage to ensure that Java does not run out of memory. For complete recommendations, see Hardware-requirements.

Perform the following steps to set the Java heap size:

(Windows)

  1. Navigate to <Tomcat Install_Directory>/bin directory.
  2. Open the Tomcatxw.exe file.
  3. Navigate to Java tab and increase the Java heap size according to your system size. For information on configuration size, see the knowledge article 000232571.

(UNIX)

  1. Navigate to <Tomcat Install_Directory>/bin directory.
  2. Edit the catalina.sh file.
  3. Set the -Xmx parameter to increase the Java heap size:

    JAVA_OPTS=%JAVA_OPTS% -Xms512m Xmx2048m -XX:PermSize=256m -XX:MaxPermSize=512m -XX:+UseCompressedOops -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:MaxMetaspaceSize=3200m

    The preceding command contains sample values of heap size and perm size. You must increase the size according to your system size. For information on configuration size, see the knowledge article 000232571.