Skip to content

Memory configuration

Tomcat 9 (or older)

For Tomcat 9, you need to adjust the memory parameters for optimal performance:

We recommend using a 64-bit Tomcat application server and Java machine.

If Tomcat is installed as a service:

  • Open the Tomcat configuration console
  • Go to the tab "Java"
  • In the area "Java Options" add the following lines: -Xrs -XX:MaxPermSize=256m
  • Set the parameter Initial memory pool to 128
  • Set the parameter Maximum memory pool according to recommendations given in the pre-requisites
    • 64-bit Tomcat+JVM example: 4096 (no limit for a 64-bit JVM)
    • 32-bit Tomcat+JVM example: 1024 (32-bit JVM is limited to 1536)

If Tomcat starts as a script (for example "startup.bat"):

  • Edit the file <GGO_TOMCAT_HOME>/bin/catalina.bat
  • At the beginning of the script, add the line:
    • 64-bit Tomcat+JVM example: set JAVA_OPTS=%JAVA_OPTS% -Xmx4096m -Xrs -XX:MaxPermSize=256m
    • 32-bit Tomcat+JVM example: set JAVA_OPTS=%JAVA_OPTS% -Xmx1024m -Xrs -XX:MaxPermSize=256m

Tomcat 10 / Tomcat 11

For Tomcat 10, the memory configuration is simplified (Java 17+ does not use MaxPermSize):

If Tomcat is installed as a service:

  • Open the Tomcat configuration console
  • Go to the tab "Java"
  • In the area "Java Options" add the following line: -Xrs
  • Set the parameter Initial memory pool to 128
  • Set the parameter Maximum memory pool according to recommendations given in the pre-requisites
    • 64-bit Tomcat+JVM example: 4096 (no limit for a 64-bit JVM)
    • 32-bit Tomcat+JVM example: 1024 (32-bit JVM is limited to 1536)

If Tomcat starts as a script (for example "startup.bat"):

  • Edit the file <GGO_TOMCAT_HOME>/bin/catalina.bat
  • At the beginning of the script, add the line:
    • 64-bit Tomcat+JVM example: set JAVA_OPTS=%JAVA_OPTS% -Xmx4096m -Xrs
    • 32-bit Tomcat+JVM example: set JAVA_OPTS=%JAVA_OPTS% -Xmx1024m -Xrs