Garbage Collection

You can define the Java garbage collector that Transformer uses. By default, Transformer uses the Concurrent Mark Sweep (CMS) garbage collector.

For example, if you configure Transformer to use a large heap size, you might want to use the G1 garbage collector. If you define another garbage collector, test and evaluate Transformer performance before making the same change in a production environment. Garbage collector performance depends on each particular use case.

Define the garbage collector by modifying the Java Options property in the Java configuration properties. To use the G1 garbage collector, add the following option to the property:

-XX:+UseG1GC

Define the garbage collector based on your installation:
Tarball or RPM installation
Define the garbage collector in the TRANSFORMER_JAVA_OPTS environment variable.

For example, the default garbage collector is defined as follows:

export TRANSFORMER_JAVA_OPTS=${TRANSFORMER_JAVA_OPTS:-"-XX:+UseConcMarkSweepGC -XX:+UseParNewGC"}

To use the G1 garbage collector, set the option as follows:

export TRANSFORMER_JAVA_OPTS=${TRANSFORMER_JAVA_OPTS:-"-XX:+UseG1GC"}
Modify environment variables using the method required by your installation type.

Logging

Transformer enables garbage collector logging by default to facilitate troubleshooting. Log files are written to $TRANSFORMER_LOG/gc.log. You can disable logging.

Disable garbage collector logging based on your installation:

Tarball or RPM installation
Set the TRANSFORMER_GC_LOGGING environment variable to false. For example:
export TRANSFORMER_GC_LOGGING=false
Modify environment variables using the method required by your installation type.