Legacy platform

IBM MQ parameters

You can review the specific guidelines on implementing, configuring and tuning IBM® MQ.

Depending on your processing volumes and the number of MQ queue consumers and producers you expect to start, you may have to change the log and channel parameters in the qm.ini or mqs.ini file.

Channel

Each thread started that reads from or writes to the MQ queues requires a channel. If you were to start 20 JVMs with 5 threads each, you need at least 100 channels (which is the default). You may also have to increase the number of channels if you have workloads that open and close the JMS connections rapidly.

If you experience messages indicating that the max channels have been reached, do the following:

  • Check to see if there is a connection or channel leak. Run the following command to see how many active channels are used:
    
       echo "dis chs(*)" | runmqsc | grep RUNNING | wc -l 
       
    
  • You may have to run each workload at peak production loads in your test environment to diagnose channel leaks.
  • If you suspect that channels are not getting reclaimed fast enough or if your TCP/IP connection is not reliable, you should set the following parameters. The KeepAlive parameter tells the queue manager to check the existence of the client. If the client is not there, the queue manager reclaims the channel. The MaxChannels defaults to 100. In production settings, that parameter could grow to a much higher number like 300 or 500:
    
       TCP:
          KeepAlive=YES
       
    Channels: 
          MaxChannels=300
          MaxActiveChannels=100
    

Log files

MQ uses log files to maintain message integrity in the event of a queue manager restart or a media failure.

The number of log files depends on your configuration, the size of the messages, the logging type, and the message volumes. You should performance test your application at or above peak production loads to see if the default MQ log settings are sufficient. If you are using CIRCULAR logging, the following may be reasonable starting values:


   Log:
      LogPrimaryFiles=4
      LogSecondaryFiles=2
      LogFilePages=65535
      LogType=CIRCULAR
      LogBufferPages=0

If you use LINEAR logging (for example, to be able to survive media failure), you must set LogPrimaryFiles higher.