Configuring JVM options

Starting an execution group creates a Java Virtual Machine (JVM). You can configure this JVM by using broker functionality to change some of the JVM options.

Broker options include:

You can also use the Non-broker option for passing parameters to a brokers' JVM.

Setting the verbose environment variable

Setting the verbose environment variable enables you to pass JVM verbose options to the broker.

You can set the mqsijverbose environment variable before the broker starts. You can then pass JVM verbose options to the broker. However, you cannot use this environment variable to pass any other parameters to the JVM. Example commands you can use to set the mqsijverbose environment variable are shown below:

export MQSI_RUN_ATTACHED=1
export MQSIJVERBOSE=-verbose:class,gc,jni
mqsistart brokerName
The JVM verbose options specified above will cause JVM information to be written for class and object garbage collection and will also write information for Java Native Interface (JNI) events. This information is directed to SYSOUT. You can set the MQSI_RUN_ATTACHED environment so that the information is written to the console. To do this for Windows, edit the DataFlowEngine service so that its runs under the system user ID and set it to output information to a window as follows:
  1. In the Services panel, right click and select Properties.
  2. Click the Log on tab.
  3. Check the Local System Account radio button.
  4. Check the Allow service to interact with desktop button.

The environment variable mqsijverbose will apply to every broker that you start in the environment in which it is set. If you only want to apply it to one broker, set the value just before you start the broker. Setting the variable applies to every execution group for that broker.

Setting the JVM heap size

When you start an execution group, it creates a JVM for executing a Java user plugin node. You can pass parameters to the JVM to set the minimum and maximum heap sizes. To give more capacity to a message flow that is going to process large messages, you can reduce the minimum JVM heap size to allow the main memory heap to occupy more address space.

The JVM is created with a minimum of 128MB of space allocated and reserved for its use. If the message flows in the execution group do not make heavy use of Java, you can reduce the size of the JVM heap to a value of, for example, 8MB or 16MB.

Use the mqsiservice command to set the minimum and maximum heap sizes, for example, to set the minimum JVM heap size to 16MB, use the following command:
mqsiservice brokerName -r MinJVMHeapSize=16777216 
To set the maximum heap size to, for example, 2GB, use the following command:
mqsiservice brokerName -r MaxJVMHeapSize=2097152000 
These entries will apply to every execution group for the named broker.

You do not need to increase the maximum heap size unless you are going to heavily use Java with, for example, plug-ins or XMLT transformation nodes.

Use caution when you set the maximum heap size because the Java runtime environment takes the values for its initial, maximum, and current heap sizes to calculate how frequently it drives garbage collection. A large maximum heap size will drive garbage collection less frequently within the brokers' JVM. If garbage collection is driven less frequently, the DataFlowEngine heap size will continue to grow. When garbage collection then runs, memory that can be cleaned will have paged out and will therefore need to be swapped back in.

Non-broker option for passing parameters to a brokers' JVM

IBM supports the use of the IBM_JAVA_OPTIONS environment variable. Set this variable before the broker is started to pass options to any JVM created within its scope. Note that this a Java option and is not broker functionality. Use this non-broker method with caution as you may inadvertently cause problems with broker operations.

Related concepts
Stack storage
JVM heap sizing
Configuring JVM options
Related tasks
Optimizing message flow response times
Related reference
Message flows