JVM Settings for 3DOrchestrate Station

You can change the JVM memory/performance settings for the 3DOrchestrate Station program.

The 3DOrchestrate Station program is started using the following Windows batch file or Linux shell script:

<station_install_dir>/<os>/code/command/SMAExeStation

Executing this command starts the station by following the execution sequence below (on Windows):

<station_install_dir>\win_b64\code\command
   .\SMAExeStation
              |
              +---------- CALL --------> .\SMAExeClientEnv
              |
              +---------- CALL --------> .\SMAExeClientLaunch
                                                 |
                                                 +---> java ...

The SMAExeClientEnv file is key in the startup because it configures the Java environment and settings for all types of stations (regular, substation, transtation). The default performance settings are:

  • An explicit minimum heap size of 256 megabytes of memory
  • An explicit maximum heap size of 2 gigabytes of memory
  • No explicit garbage collector, so the Java ergonomics will select parallel Stop The World (STW) garbage collection (GC) algorithm for both young (-XX:+UseParallelGC) and old (-XX:+UseOldParallelGC) generation objects

If this configuration is not appropriate for your station execution environment, you can override these defaults by explicitly specifying the necessary settings. To do this, you define two optional external environment variables named SMAEXE_JVMPARMS and SMAEXE_MEM. These environment variables are supported by the station program and are defined at the beginning of the SMAExeClientEnv Windows batch file as follows:

...
rem   SMAEXE_JVMPARMS- extra flags for the Java command, such as '-verbose:gc'
...
rem   SMAEXE_MEM     - Size of Java heap, in Megabytes.
rem                    Default is 2G increased from 512MB, which is correct for station.
...

First, SMAEXE_JVMPARMS lets you append any JVM command line options for running the station program. For example, the following command sequence displays the effective JVM settings in the command prompt window when starting the station (on Windows):

cd <station_install_dir>
set SMAEXE_JVMPARMS=-XshowSettings:vm -XX:+PrintCommandLineFlags –showversion
.\win_b64\code\command\SMAExeStation.bat

Starting the station in this way produces output like this:

-XX:InitialHeapSize=268435456 -XX:MaxHeapSize=2147483648 -XX:+PrintCommandLineFlags -XX:+UseCompressedClassPointers 
-XX:+UseCompressedOops -XX:-UseLargePagesIndividualAllocation -XX:+UseParallelGC
VM settings:
    Min. Heap Size: 256.00M
    Max. Heap Size: 2.00G
    Ergonomics Machine Class: client
    Using VM: Java HotSpot(TM) 64-Bit Server VM

java version "1.8.0_66"
Java(TM) SE Runtime Environment (build 1.8.0_66-b18)
Java HotSpot(TM) 64-Bit Server VM (build 25.66-b18, mixed mode)

Tip: The commands shown above must be manually entered on the command line to display the desired output. Starting the station from the 3DOrchestrate Deployment Utility hides the JVM's text output; however, the values of SMAEXE_JVMPARMS and SMAEXE_MEM will be taken into account if they are set before you start the deployment utility.

For example, if 2 GB of memory is not appropriate (too small or too large) for the station computer, you can define SMAEXE_MEM with the desired value and units since this environment variable provides the exact equivalent of the Java -Xmx option:

cd <station_install_dir>
set SMAEXE_JVMPARMS=-XshowSettings:vm -XX:+PrintCommandLineFlags –showversion
set SMAEXE_MEM=3072M                          (or set SMAEXE_MEM=3G)
.\win_b64\code\command\SMAExeStation.bat

This startup sequence produces output like this:

-XX:InitialHeapSize=268435456 -XX:MaxHeapSize=2147483648 -XX:+PrintCommandLineFlags -XX:+UseCompressedClassPointers 
-XX:+UseCompressedOops -XX:-UseLargePagesIndividualAllocation -XX:+UseParallelGC
VM settings:
    Min. Heap Size: 256.00M
    Max. Heap Size: 3.00G
    Ergonomics Machine Class: client
    Using VM: Java HotSpot(TM) 64-Bit Server VM

java version "1.8.0_66"
Java(TM) SE Runtime Environment (build 1.8.0_66-b18)
Java HotSpot(TM) 64-Bit Server VM (build 25.66-b18, mixed mode)

Additionally, if the default garbage collection algorithm is inefficient for the execution environment, you can change it again using SMAEXE_JVMPARMS as follows:

cd <station_install_dir>
set SMAEXE_JVMPARMS=-XshowSettings:vm -XX:+UseG1GC -XX:+PrintCommandLineFlags –showversion
set SMAEXE_MEM=3072M                                  (or set SMAEXE_MEM=3G)
.\win_b64\code\command\SMAExeStation.bat

Finally, it is possible to capture a comprehensive list of all JVM settings of the station for diagnostic purposes as follows:

cd <station_install_dir>
set SMAEXE_JVMPARMS=-XshowSettings:all -XX:+PrintCommandLineFlags -XX:+PrintFlagsFinal –showversion
.\win_b64\code\command\SMAExeStation.bat loglevel:debug

This startup sequence produces output like this:

-XX:InitialHeapSize=268435456 -XX:MaxHeapSize=2147483648 -XX:+PrintCommandLineFlags -XX:+PrintFlagsFinal 
-XX:+UseCompressedClassPointers -XX:+UseCompressedOops -XX:-UseLargePagesIndividualAllocation -XX:+UseParallelGC

[Global flags]
    uintx AdaptiveSizeDecrementScaleFactor          = 4                                   {product}
    uintx AdaptiveSizeMajorGCDecayTimeScale         = 10                                  {product}
    uintx AdaptiveSizePausePolicy                   = 0                                   {product}
    uintx AdaptiveSizePolicyCollectionCostMargin    = 50                                  {product}

    ...

    uintx YoungGenerationSizeSupplement             = 80                                  {product}
    uintx YoungGenerationSizeSupplementDecay        = 8                                   {product}
    uintx YoungPLABSize                             = 4096                                {product}
     bool ZeroTLAB                                  = false                               {product}
     intx hashCode                                  = 5                                   {product}
VM settings:
    Min. Heap Size: 256.00M
    Max. Heap Size: 2.00G
    Ergonomics Machine Class: client
    Using VM: Java HotSpot(TM) 64-Bit Server VM

Property settings:
    awt.toolkit = sun.awt.windows.WToolkit
    file.encoding = Cp1252
    file.encoding.pkg = sun.io
    file.separator = \

...

    user.language = en
    user.name = SPMREL
    user.script =
    user.timezone =
    user.variant =

Locale settings:
    default locale = English
    default display locale = English (United States)

...

java version "1.8.0_66"
Java(TM) SE Runtime Environment (build 1.8.0_66-b18)
Java HotSpot(TM) 64-Bit Server VM (build 25.66-b18, mixed mode)