Tuning the mqweb server JVM
By default, the mqweb server Java virtual machine (JVM) uses platform-specific defaults for configuration parameters such as the minimum and maximum size of the heap, and the size of the class cache. We might need to change the default values to improve performance or to resolve problems. For example, if a java.lang.OutOfMemoryError is thrown by the mqweb server, we must increase the maximum size of the heap. Or if we are experiencing issues with the display of dashboard configuration information in the IBM MQ Console, we must set a variable that determines the file encoding of the configuration. We can change the default values in the jvm.options file.
Procedure
-
Open the jvm.options file.
The jvm.options file can be found in one of the following directories:
- On UNIX, Linux, and Windows: MQ_DATA_PATH/web/installations/installationName/servers/mqweb
- On z/OS :
WLP_user_directory/servers/mqweb
where WLP_user_directory is the directory that was specified when the crtmqweb script ran to create the mqweb server definition.
- Optional:
Set the maximum heap size by adding the following line to the file:
-XmxMaxSizem
Where MaxSize specifies the maximum size of the heap, in MB. For example, the following line sets the maximum heap size to 1GB:-Xmx1024m
- Optional:
Set the minimum heap size by adding the following line to the file:
-XmsMinSizem
Where MinSize specifies the minimum size of the heap, in MB. Increasing the minimum heap size from the default can reduce the time it takes to start the mqweb server. For example, the following line sets the minimum heap size to 512MB:-Xms512m
- Optional:
Set the size of the class cache by adding the following line to the file:
-XscmxSizem
Where Size specifies the class cache size, in MB. For example, the following line sets the class cache size to 100MB:-Xscmx100m
The Java shared class cache is used to store data such as loaded classes and Ahead-Of-Time (AOT) compiled code.The class cache significantly reduces the time taken to start the mqweb server. The first time the mqweb server is started the class cache is created and the server can take a significant time to start. Subsequent restarts of the server will be much quicker as classes can be loaded from the shared class cache.
Increasing the size of the class cache from the default can reduce the time it takes to start the mqweb server.
The class cache is recreated when the mqweb server is started on a different z/OS system. Therefore, starting the mqweb server on a different z/OS system in a sysplex can take significantly longer than restarting the server on the same system.
Note that changes to this value take effect only when the class cache is created. The class cache is created when the mqweb server is first started, or after the class cache has been destroyed using the Java class cache utility.
- Optional: Set the file encoding that is used for the
user dashboard configuration information in the IBM MQ Console by adding the following line to the file:
-Dfile.encoding=UTF-8
-
Restart the mqweb server.
On z/OS, stop and restart the mqweb server started task.
On all other platforms, enter the following commands on the command line:endmqweb strmqweb
Parent topic: Configure the IBM MQ Console and REST API