performance / tuning tips. to the point.                
About Us | Site Map | Privacy
Disclaimer | Feedback
About RSS Feed | Useful Links
Search Partner Links
Original Blog
Add to My Yahoo!
Google Reader or Homepage
del.icio.us performancewiki.com Latest Items


© 2005-2012 PerformanceWiki.com
All Rights Reserved.


Tuning WebSphere MQ for Performance on Windows and UNIX

Not many people want to deal with MQ performance tuning: it is a backbone or one-time setup that requires special kind of understanding, and once setup, we rarely go back again and mess with it.

But this is also why we miss a lot of low-hanging fruits that can potentially give you a large boost in performance, especially when volume of MQ messages is huge.

Why a default queue manager is not optimal

As an illustration of the how the default values for the queue manager differ from the values you might typically want to set when tuning a queue manager, this section describes the default values created for a queue manager on UNIX.

Here is a qm.ini file for a default queue manager on UNIX. The queue manager was created with the command crtmqm MyQueueManager, which means that all parameter values default:

#*******************************************************************#
#* Module Name: qm.ini                                             *#
#* Type       : WebSphere MQ queue manager configuration file      *#
#  Function   : Define the configuration of a single queue manager *#
#*                                                                 *#
#*******************************************************************#
#* Notes      :                                                    *#
#* 1) This file defines the configuration of the queue manager     *#
#*                                                                 *#
#*******************************************************************#
ExitPath:
   ExitsDefaultPath=/var/mqm/exits/
   ExitsDefaultPath64=/var/mqm/exits64/
#*                                                                 *#
#*                                                                 *#
Log:
	LogPrimaryFiles=3
	LogSecondaryFiles=2
	LogFilePages=1024
	LogType=CIRCULAR
	LogBufferPages=0
	LogPath=/var/mqm/log/MyQueueManager/
	LogWriteIntegrity=TripleWrite
Service:
	Name=AuthorizationService
	EntryPoints=13
serviceComponent:
	Service=AuthorizationService
	Name=MQSeries.UNIX.auth.service
	Module=/usr/mqm/lib64/amqzfu
	ComponentDataSize=0

Whilst this configuration will specify a perfectly functional queue manager capable of processing non-persistent and persistent messages, performance is not optimised:

  • LogPrimaryFiles is set to 3 only. We would typically want a higher value.
  • LogSecondaryFiles is set to 2 only. We would typically want a higher value.
  • LogType is set to circular. This is OK assuming we do not want linear logging.
  • LogBufferPages is set to 0, which in practice is a value of 128. This is small if we want to process at a high message rate or process large persistent messages.
  • LogWriteIntegrity is set to TripleWrite. Ideally we would want the log on a reliable device and then we could use a value of SingleWrite.
  • There is no channel stanza. As such channels will as run as standard applications unless the environment variable MQ_CONNECT_TYPE=FASTPATH is established.
  • There is no TuningParameters stanza to allow the value of the default queue buffer size to be changed. As such all queues will have a default buffer size of 64K(32 bit operating system)/128K(64 bit operating system) for non-persistent message and 128K(32 bit operating system)/256K(64 bit operating system) for persistent messages. Dependent on the size of messages being processed this may be adequate or not.

So here are the set of tuned values you should try in your environment (adjust accordingly per the availability of memory on the system).

#*******************************************************************#
#* Module Name: qm.ini                                             *#
#* Type       : WebSphere MQ queue manager configuration file      *#
#  Function   : Define the configuration of a single queue manager *#
#*                                                                 *#
#*******************************************************************#
#* New and potentially better settings for your env                *#
#*                                                                 *#
#*******************************************************************#
ExitPath:
   ExitsDefaultPath=/var/mqm/exits/
   ExitsDefaultPath64=/var/mqm/exits64/
#*                                                                 *#
#*                                                                 *#
Log:
	LogPrimaryFiles=10
	LogSecondaryFiles=10
	LogFilePages=65535
	LogType=CIRCULAR
	LogBufferPages=4096
	LogPath=/var/mqm/log/MyQueueManager/
	LogWriteIntegrity=SingleWrite
Service:
	Name=AuthorizationService
	EntryPoints=13
serviceComponent:
	Service=AuthorizationService
	Name=MQSeries.UNIX.auth.service
	Module=/usr/mqm/lib64/amqzfu
	ComponentDataSize=0
Channels:
	MQIBindType=FASTPATH
	MQ_CONNECT_TYPE=FASTPATH
TuningParameters:
	DefaultQBufferSize=52428800
	DefaultPQBufferSize=52428800

** Note: 1048576 specifies a buffer size of 1 MB, so the above sets it at 50MB.

Happy tuning!

    

Couldn't find what you need? Check out our blog entries.