Tune Java messaging service
Overview
You can tune Java messaging service (JMS) run-time components, resources, and the embedded messaging server through the administrative console with the following parameters:
- Configuring the message listener service.
- Adjust the Thread pool parameter as described in Message listener service.
- Set the NON.ASF.RECEIVE.TIMEOUT Custom property as described in Message listener service custom properties.
- Adjust the listener port Maximum sessions parameter as described in Listener port settings.
- Adjust the listener port Maximum messages parameter as described in Listener port settings.
- Configure JMS resources.
- Set XA enabled as described in WebSphere MQ queue connection factory settings.
- Set the Connection pool size as described in Generic JMS connection factory settings.
- Set the WebSphere MQ queue connection factory transport type and topic connection factory transport type as described in WebSphere MQ Provider queue connection factory settings for application clients.
- Specify the Transaction log directory as explained in Transaction service settings.
- WebSphere MQ
- Description: Includes the WebSphere MQ folder where WebSphere MQ is installed and indirectly where its data files reside since they are always under the directory WebSphereMQHome/data. Use this parameter during installation when extra disks are available.
- How to view or set: To view, search your system for a folder named WebSphere MQ. Set during installation.
- Default value: c:\Program Files\IBM\WebSphere MQ\
- Recommended value: Locate this directory away from any other disk input or output, on the fastest disk available. Redundant Array of Inexpensive Disks (RAID) is recommended.
- Log buffer pages
- Description: Controls the size of the queue manager buffer to log file writes in number of pages. Use this parameter when high volumes of messages are being sent through a server.
- How to view or set: In the registry, navigate to HKEY_LOCAL_MACHINE > SOFTWARE > IBM > MQSeries > CurrentVision > Configuration > QueueManager > QM_name > Log > LogBufferPages. For embedded JMS, edit the createmq.properties setting LogFilePages in the install_root\properties directory to the desired value. Run the deletemq and createmq commands to delete or recreate the queue manager. For external JMS, set LogFilePages to the desired value. Do this before creating the queue manager in the registry. Run the amqmdain regsec command to secure the registry value and create the queue manager.
- Default value: 0
- Recommended value: There is no performance penalty for setting this value too high. Therefore, set the value to its maximum of 512 pages.
- Log primary files
- Description: Controls the number of primary or permanent log files for the queue manager. Use this parameter when high volumes of messages are being sent through a server.
- How to view or set: In the registry, navigate to HKEY_LOCAL_MACHINE > SOFTWARE > IBM > MQSeries > CurrentVision > Configuration > QueueManager > QM_name > Log > LogPrimaryFiles. For embedded JMS, edit the createmq.properties setting LogFilePages in the install_root\properties directory to the desired value. Run the deletemq and createmq commands to delete or recreate the queue manager. For external JMS, set LogPrimaryFiles to the desired value. Do this before creating the queue manager in the registry. Run the amqmdain regsec command to secure the registry value and create the queue manager.
- Default value: External: 3, embedded: 0
- Recommended value: There is no performance penalty for setting this value too high. Set the value to its maximum of 63 pages.
- Log secondary files
- Description: Controls the number of secondary log files for the queue manager. Secondary files are files created when the primary files are not enough and deleted when they are no longer needed.
- How to view or set: In the registry, navigate to HKEY_LOCAL_MACHINE > SOFTWARE > IBM > MQSeries > CurrentVision > Configuration > QueueManager > QM_name > Log > LogSecondaryFiles. For embedded JMS, edit the createmq.properties setting LogSecondaryFiles in the install_root\properties directory to the desired value. Run the deletemq and createmq commands to delete or recreate the queue manager. For external JMS, set LogPrimaryFiles to the desired value. Do this before creating the queue manager in the registry. Run the amqmdain regsec command to secure the registry value and create the queue manager.
- Default value: External: 2, embedded: 60
- Recommended value: There is a limit of 63 total files from the primary and secondary combined and because secondary logs are slower, setting this 0 is ideal for performance.
- Log default path
- Description: Controls the location of the queue manager log files. Use this parameter when high volumes of messages are sent through a server.
- How to view or set: In the registry, navigate to HKEY_LOCAL_MACHINE > SOFTWARE > IBM > MQSeries > CurrentVision > Configuration > QueueManager > QM_name > Log > LogDefaultPath. For embedded JMS, edit the createmq.properties setting LogPath in the install_root\properties directory to the desired value. Run the deletemq and createmq commands to delete or recreate the queue manager. For external JMS, set LogDefaultPath to the desired value. Do this before creating the queue manager in the registry. Run the amqmdain regsec command to secure the registry value and create the queue manager.
- Default value: WebSphereMQHome\log
- Recommended value: It is ideal to have a disk dedicated to this task because WebSphere MQ tries to keep the head of the disk positioned at the place in the file where it needs to write next. A fast RAID volume is best.
- Default queue buffer size
- Description: Controls the size in bytes of an in-memory buffer for nonpersistent queues. Use this parameter when large message sizes are used, or large bursts of messages cause the queue to back up. If the queue backs up past this buffer, messages are flushed out to the disk.
- How to view or set: In the registry, navigate to HKEY_LOCAL_MACHINE > SOFTWARE > IBM > MQSeries > CurrentV> Configuration > QueueManager > QM_name > TuningParameters > DefaultQBufferSize. Embedded JMS is not currently supported; you need MQ5.3 CSD2 and an accompanying V5.0 fix. For external JMS, set DefaultQBufferSize to the desired value. Do this before creating the queue manager. Run the amqmdain regsec command to secure the registry value and create the queue manager.
- Default value: 64K (registry key does not exist)
- Recommended value: Set this parameter to accommodate the typical number of messages sitting on the queue at any given time. This should be numberOfMessages*(500+messageSizeInBytes). The maximum value is 100MB, but typically 1MB is enough.
- Default persistent queue buffer size
- Description: Controls the size in bytes of an in-memory buffer for nonpersistent queues. Use this parameter whenever memory is available.
- How to view or set: In the registry, navigate to HKEY_LOCAL_MACHINE > SOFTWARE > IBM > MQSeries > CurrentV> Configuration > QueueManager > QM_name > TuningParameters > DefaultPQBufferSize. Embedded JMS is not currently supported; you need MQ5.3 CSD2 and an accompanying V5.0 fix. For external JMS, set DefaultPQBufferSize to the desired value. Create the queue manager. This is a permanent queue setting. To make a change, delete and recreate the queue.
- Default value: 0 (registry key does not exist)
- Recommended value: Set this parameter to accommodate the number of typical concurrently processed messages, plus a little more for read-ahead capabilities. Do this by calculating numOfCocurrentMessages*(msgSizeInBytes+500)*2. Typically, 1MB is enough.
- Maximum channels
- Description: Controls the allowable number of concurrent CLIENT transport clients. Use this parameter when large numbers of clients are being used.
- How to view or set: In the registry, navigate to HKEY_LOCAL_MACHINE > SOFTWARE > IBM > MQSeries > CurrentV> Configuration > QueueManager > QM_name > Channels > MaxChannels. Embedded JMS is not currently supported; you need MQ5.3 CSD2 and an accompanying V5.0 fix. For external JMS, set MaxChannels to the desired value. Restart the queue manager.
- Default value: External: 100 (registry key does not exist), embedded: 1000
- Recommended value: Set this parameter high enough to contain the maximum number of concurrent JMS clients.
- Channel application bind type
- Description: Controls if the channel application is an MQ FASTPATH application. Use this parameter at all times.
- How to view or set: In the registry, navigate to HKEY_LOCAL_MACHINE > SOFTWARE > IBM > MQSeries > CurrentV> Configuration > QueueManager > QM_name > Channels > MQIBindType. Embedded JMS is not currently supported; you need MQ5.3 CSD2 and an accompanying V5.0 fix. For external JMS, set MQIBindType to the desired value. Restart the queue manager.
- Default value: Not FASTPATH (registry key does not exist)
- Recommended value: FASTPATH
- Configure resources for the embedded WebSphere JMS provider.
- Number of threads
- Description: With the embedded JMS publications and subscriptions broker, this value is the number of threads used to match publications to subscribers. Use this parameter when concurrent publications and subscriptions exist that would exceed the capacity of the default value.
- How to view or set:
- Open the administrative console.
- Click Servers > Application Servers > server.
- Click the Server Component > JMS servers.
- Click Apply or OK.
- Click Save.
- Stop and restart the appserver.
- Default value: 1
- Recommended value: The number of concurrent threads should only be set to a small number. (Set this value a little higher than the number of concurrent message publishers.)