GridGain Developers Hub

Jvm Tuning

Below is the list of recommended JVM options for high performance GridGain installations in embedded mode:

-server
-XX:+AlwaysPreTouch
-XX:+HeapDumpOnOutOfMemoryError \
-XX:+ExitOnOutOfMemoryError"
-XX:HeapDumpPath=/path/to/dump \
-Xlog:gc=info:file=/path/to/gc-%t.log::filecount=10,filesize=100m" \
-Xms16g \
-Xmx16g \
-XX:+UseG1GC \
-XX:G1HeapRegionSize=32m \
-XX:+PerfDisableSharedMem

Garbage collector tuning

G1 is a recommended collector for GridGain.

Normally G1 collector doesn’t require any special tuning due to its adaptive behavior and works fine out of the box.

However, you can try other collectors, like ZGC and see if they work better for you workload. Collectors availability depends on JVM vendor.

-XX:+UseG1GC \
-XX:G1HeapRegionSize=32m \

Thread Pools Tuning

All worker pools are sized automatically and don’t require special tuning.

NUMA-Aware Memory Allocation

G1 garbage collector is NUMA-aware since release 14. It can be enabled with:

-XX:+UseNUMA