|
Setting
|
Description
|
||
|---|---|---|---|
|
-server
|
Explicitly tells the JVM to run in server mode. This is true by default when using 64-bit JDK, but it is best practice to declare it.
|
||
|
-d64
|
Explicitly tells the JVM to run in 64-bit mode. The current JVM automatically detects this, but it is best practice to declare it.
|
||
|
XX:+UseG1GC
|
Tells the JVM to use the Garbage First Garbage Collector.
|
||
|
-Dfile.encoding=UTF-8
|
Tells the JVM to use UTF-8 as the default character set so that non-Western alphabets are displayed correctly.
|
||
|
-Djava.library.path
|
Specifies the path to the native library.
|
||
|
-Xms3072m (for a system with 4GB of memory)
|
Tells the JVM to allocate a minimum of 3072MB of memory to the Tomcat process. This should be set to 75% of the available system memory.
|
||
|
-Xmx3072m (for a system with 4GB of memory)
|
Tells the JVM to limit the maximum memory to the Tomcat process. This should be set to 75% of the available system memory.
|
||
|
-XX:MaxDirectMemorySize
|
Sets the maximum amount of off heap memory for direct byte buffers. If you do not specify this option, it uses the same value as Xmx. This can cause out of memory errors in systems that use off heap memory such as Ignite or Netty. Off heap memory is outside the Java heap and is managed by the operating system.
Start with 1 gigabyte for development environments with less than 20 gigabytes of total memory. Increase in 512 megabyte increments for larger workloads.
|
||
|
-Dlog4j2.formatMsgNoLookups=true
|
|
Setting
|
Description
|
|---|---|
|
-Dcom.sun.management.jmxremote
|
Notifies the JVM that you plan to remote monitor it via JMX
|
|
-Dcom.sun.management.jmxremote.port=22222
|
The port the JVM should open up for monitoring.
|
|
-Dcom.sun.management.jmxremote.ssl=false
|
No SSL usage.
|
|
-Dcom.sun.management.jmxremote.authenticate=false
|
No authentication required.
|
|
-Djava.rmi.server.hostname=<host or IP>
|
The hostname or IP that the underlying RMI client connection will use.
|

