Skip to main content Skip to complementary content

(Optional) Customizing Java setup and optimization for Remote Engine services

Optimize engine service's performance and compatibility with Java settings:

  • Configure Java instances for engine startup and artifact execution
  • Adjust Java heap size to fine-tune performance

Changing Java instances for Remote Engine services

You can still change Java instances to be used by a Talend Remote Engine service after installing it.

Remote Engine uses two types of Java instances:

  1. Engine startup Java instance:

    • Java 17 required for engine startup.
    • Configured in talend-remote-engine-service and talend-remote-engine-wrapper.conf.
  2. Artifact execution Java instances:

    • Used to run Jobs or Microservices.
    • Configuration depends on your engine version:
      • Talend Remote Engine v2.13.9 onwards: Adaptive mode automatically selects appropriate Java version.
      • Older versions: Manual specification of a single Java version required.

This section explains how to change the Java instance for engine startup. For details about configuring Java instances for artifact executions, see Setting up compatible Java versions to run Jobs or Microservices.

Procedure

  1. Stop the engine service.
  2. Update JAVA_HOME with the Java instance to be used for engine startup.
    Information noteTip: If you are not using Talend Remote Engine as a system service, updating JAVA_HOME is sufficient to change the Java instance used for engine startup.
  3. Update the Java location in the engine service configuration files:

    Example

    • In <remote-engine-installation>/etc/talend-remote-engine-wrapper.conf,
      set.JAVA_HOME=<new-java-instance-location>
    • In <remote-engine-installation>/bin/talend-remote-engine-service,
      JAVA_HOME=<new-java-instance-location>
  4. Restart the engine service.

Results

This process ensures that the Remote Engine uses the updated Java instance for its startup.

As explained at the beginning of the section, when executing artifacts, the engine defaults to the adaptive mode to select the appropriate Java instance.

To verify which Java instance is used by the adaptive mode and make updates if necessary, see Setting up compatible Java versions to run Jobs or Microservices.

Specifying Java heap size for a Remote Engine service

When you have installed Talend Remote Engine as a system service, you can adjust the Java heap size (the JVM memory) allocated to it.

The recommended Java heap size is 1 GB.
Information noteTip: If you do not install Talend Remote Engine as service, the default allocated memory is calculated by a JVM instance itself to be one quarter of the available memory. In this case, if you need to adjust the maximum heap size, use the -Xmx option such as -Xmx1024M or -Xmx1G in an environment variable, for example JAVA_OPTS or EXTRA_JAVA_OPTS, or modify <remote_engine_installation>/setenv/setenv.bat.

Procedure

  1. Stop the engine.
  2. Browse to <remote_engine_installation>/etc and open the talend-remote-engine-wrapper.conf file.
  3. Change the value of the wrapper.java.maxmemory property to 1024.
    Note that the maximum allowed heap size is 4096 MB (about 4 GB). If you set a size larger than this, only 4096 MB is allocated.
    Information noteTip: If you need to work around this limitation, add a wrapper.java.additional.xx parameter with the desired heap size. Replace xx with a unique number to differentiate it from other wrapper.java.additional.xx parameters. For example, use wrapper.java.additional.12 = -Xmx8196m if eleven other wrapper.java.additional.xx parameters already exist.
  4. Start the engine.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!