Knowledge Base

Optimizing Java Params

Last Modified:
10 May 2021
User Level:

On cloud-hosted installations of Terminalfour, we take steps to optimize the performance of the Terminalfour application. One of these is configuring the Java memory parameters. If you're hosting your own instance here are some of the steps you can take to increase performance. 

Before we tweak any settings you should know which version of Terminalfour you are using since this affects the versions of Java and Tomcat that are supported.

Terminalfour versionSupported Java version Supported Tomcat versionMemory allocation setting 
8.2+ Java 7 Tomcat 8.5 xmx
8.3+ Java 11 Tomcat 9 XX:MaxRAMPercentage

What you will configure in Tomcat 8.5 is the xmx. This is the maximum size of the memory allocation pool. This is a hard number.

In Tomcat 9 you can also a hard number with xmx but we recommend configuring the XX:MaxRAMPercentage which is a proportion of the available memory.

Below, based on our research, are the recommended values for optimum performance:

Tomcat type
Tomcat 8.5 -Xmx2g -Xmx5g -Xmx12g -Xmx24g
Tomcat 9 -XX:MaxRAMPercentage=50.0 -XX:MaxRAMPercentage=60.0 -XX:MaxRAMPercentage=75.0

We recommend not using xms, the minimum size of the memory allocation pool, as it's automatically configured by Tomcat and can cause memory performance issues.

Back to top