Tuning the JVM

Performance considerations related to Java™ include the size of the Java heap, whether JIT (Just In Time compiler) is enabled, and whether client applications are using persistent connections.

Maximum heap size

If your system requires large numbers of connection manager threads you might need to increase the heap size to improve performance; but see Memory use increases over time for information about potential problems if the heap size is too large. For more information, see Configuring Java shared classes.

System environment statistics are available to show the following Java statistical information:

  • Region storage usage on IBM® z/OS®
  • JVM minimum and maximum heap settings
  • JVM heap size after last garbage collection (GC)
  • Garbage collection statistics

Just-In-Time (JIT) compiler

Use the java -version command to find whether the JIT is enabled; it is enabled by default. Immediately after a CICS starts, performance might be relatively slow because of JIT overheads. See your JVM documentation for information about JIT techniques.

JavaGateway objects

Performance is better if you flow multiple requests using the same JavaGateway object than if you create a JavaGateway object with each request. Whenever you create and destroy a new JavaGateway object you use additional system resources for creation and destruction of the object itself, creation and destruction of any associated sockets, and garbage collection.

Client connections

Performance is improved if client applications that flow multiple requests to the CICS TG use the same connection for all of the requests. Whenever a connection is closed and reopened there is an overhead of cleaning up the resources from the old connections and allocating new resources for the new connection.

Examples for the different methods of setting JVM options

For information and examples about the different methods of setting JVM options, see Setting Gateway daemon JVM options.

Performance considerations for CICS TG JSON Webservices

CICS TG does not support a way to set minimum number of WebServices threads running at same time. This may lead to performance degradation due to new Web service thread creation. CICS TG has introduced a support of liberty parameter coreThreads and can be passed as JVM argument as follows:

Add the following to the Java environment:

-j-Dcorethreads=<minimum number of corethreads>

For more details refer APAR PH36197