Skip to main content

JVM Options

Configuring the JVM is an important step of a project. Here we discuss the mandatory and preferred JVM options to get the best performance out of Atoti Server.

Mandatory​

ActivePivot needs access to some internal modules to function properly, which are now protected in JDK 17, so the following argument is necessary:

--add-opens java.base/java.util.concurrent=ALL-UNNAMED

Additionally, to use Arrow as a source or an export format, the following option is required in JDK 17 by Arrow :

--add-opens java.base/java.nio=ALL-UNNAMED

Memory​

Configuring how much memory is allocated to your application is usually necessary. You can control it through these options:

-Xmx<max on-heap memory>
-Xms<min on-heap memory>
-XX:MaxDirectMemorySize=<max off-heap memory>

If you are running ActivePivot on several NUMA nodes but have not configured its NUMA properties, using the JVM NUMA option will result in better performance:

-XX:+UseNUMA

Garbage Collection​

A poorly-configured garbage collector can make a significant dent in your application's performance and uptime. We recommend using these options:

-XX:+UseG1GC
-XX:+ExplicitGCInvokesConcurrent
-XX:MetaspaceSize=500m

Logging GC info may help fine-tune performance. You can enable logging with the following option:

-Xlog:gc*=info,safepoint*=warning:file=<path to log file>/gc-$(date +%Y_%m_%d-%H_%M).log