Java Heap Size

Modify the Transformer Java heap size as necessary, based on the resources available on the host machine. By default, the Java heap size is 1024 MB.By default, Transformer uses 50 percent of the available memory on the host machine as the Java heap size. In most cases, the default percentage value is sufficient.

The Java heap size determines the heap size allocated to Transformer and affects the amount of memory Transformer can use when it runs a pipeline. For example, with a heap size of 2048 MB, you can configure a pipeline to use up to 65% - that's 1331 MB of memory.

Use the following Java options to define the Java heap size:
  • Xmx - Defines the maximum heap size.
  • Xms - Defines the minimum heap size.
To modify the Java heap size, first select the JVM memory strategy to use:
  • Percentage - Allocates a percentage of the available memory on the host machine as the Java heap size.
  • Absolute - Allocates an absolute number in megabytes as the Java heap size.

Based on your selection, configure the minimum and maximum Java heap size in percentage or in an absolute value in megabytes. To avoid constant recalculation of the allocated heap size, set both the minimum and maximum properties to the same value.

Tip: To avoid constant recalculation of the allocated heap size, set both the minimum and maximum properties to the same value. To define the unit of measure, use m for MB and g for GB.

Transformer requires a heap size of at least 1024 MB to run. As a result, the engine always uses a minimum of 1024 MB for the heap size, regardless of the configured size.

Define the heap size based on your installation:
Tarball or RPM installation

Define the heap size in the TRANSFORMER_JAVA_OPTS environment variable.

For example, to double the heap size, increase the Xmx and Xms settings as follows:

export TRANSFORMER_JAVA_OPTS="${TRANSFORMER_JAVA_OPTS} -Xmx2048m -Xms2048m -server"
Modify environment variables using the method required by your installation type.
Note: In the pipeline properties, you can use the jvm:maxMemoryMB() function to help define the percentage of the heap size the pipeline uses.