JMS tuning tips
WebSphere Application Server Version 5 supports 3 different JMS providers:
Tuning JMS involves the use of the JMS provider, design requirements of the applications, and the use of message driven beans (MDB). The JMS provider could be any of the three listed above. Application design depends on the requirements of the applications, which fall under two main categories:
When using IJP as the JMS provider, we highly recommend that you not change any settings, since WebSphere has a view of what it thinks is going on. The following tuning tips are applicable in case of both IJP and MQ series JMS
Non-persistent, non-durable and transaction-not-supported messages perform better, but at the cost that they are non-recoverable due to the lack of persistence.
D TRACE
Then use the stop trace global command to turn off the specific trace number
STOP TRACE (G) TNO(xxx)
Reuse connections and sessions.
MQ tuning tips
TRACSTR=NO, TRACING AUTO START X
Example:
//* //* Assemble step for CSQ6LOGP //* //LOGP EXEC PGM=ASMA90,PARM='DECK,NOOBJECT,LIST,XREF(SHORT)', // REGION=4M //SYSLIB DD DSN=MQSERIES.V5R3M0.SCSQMACS,DISP=SHR // DD DSN=SYS1.MACLIB,DISP=SHR //SYSUT1 DD UNIT=SYSDA,SPACE=(CYL,(1,1)) //SYSPUNCH DD DSN=&&LOGP;, // UNIT=SYSDA,DISP=(,PASS), // SPACE=(400,(100,100,1)) //SYSPRINT DD SYSOUT=* //SYSIN DD * CSQ6LOGP INBUFF=60, LOG INPUT BUFFER SIZE (KB) X MAXRTU=2, MAX ALLOCATED ARCHIVE LOG UNITS X DEALLCT=0, ARCHIVE LOG DEALLOCATE INTERVAL X MAXARCH=500, MAX ARCHIVE LOG VOLUMES X OFFLOAD=YES, ARCHIVING ACTIVE X OUTBUFF=4000, LOG OUTPUT BUFFER SIZE (KB) X TWOACTV=YES, DUAL ACTIVE LOGGING X TWOARCH=YES, DUAL ARCHIVE LOGGING X TWOBSDS=YES, DUAL BSDS X WRTHRSH=20 ACTIVE LOG BUFFERS END /* //* //* Assemble step for CSQ6ARVP //* //ARVP EXEC PGM=ASMA90,COND=(0,NE), // PARM='DECK,NOOBJECT,LIST,XREF(SHORT)', // REGION=4M //SYSLIB DD DSN=MQSERIES.V5R3M0.SCSQMACS,DISP=SHR // DD DSN=SYS1.MACLIB,DISP=SHR //SYSUT1 DD UNIT=SYSDA,SPACE=(CYL,(1,1)) //SYSPUNCH DD DSN=&&ARVP;, // UNIT=SYSDA,DISP=(,PASS), // SPACE=(400,(100,100,1)) //SYSPRINT DD SYSOUT=* //SYSIN DD * CSQ6ARVP ALCUNIT=BLK, UNITS FOR PRIQTY/SECQTY X ARCPFX1=WIT.MQ1.WITA, DSN PREFIX FOR ARCHIVE LOG 1 X ARCPFX2=WIT.MQ2.WITA, DSN PREFIX FOR ARCHIVE LOG 2 X ARCRETN=9999, ARCHIVE LOG RETENION TIME (DAYS) X ARCWRTC=(1,3,4), ARCHIVE WTO ROUTE CODE X ARCWTOR=NO, PROMPT BEFORE ARCHIVE LOG MOUNT X BLKSIZE=24576, ARCHIVE LOG BLOCKSIZE X CATALOG=YES, CATALOG ARCHIVE LOG DATA SETS X COMPACT=NO, ARCHIVE LOGS COMPACTED X PRIQTY=4320, PRIMARY SPACE ALLOCATION X PROTECT=NO, DISCRETE SECURITY PROFILES X QUIESCE=5, MAX QUIESCE TIME (SECS) X SECQTY=540, SECONDARY SPACE ALLOCATION X TSTAMP=YES, TIMESTAMP SUFFIX IN DSN X UNIT=DASD, ARCHIVE LOG DEVICE TYPE 1 X UNIT2= ARCHIVE LOG DEVICE TYPE 2 END /* //* //* Assemble step for CSQ6SYSP //* //SYSP EXEC PGM=ASMA90,COND=(0,NE), // PARM='DECK,NOOBJECT,LIST,XREF(SHORT)', // REGION=4M //SYSLIB DD DSN=MQSERIES.V5R3M0.SCSQMACS,DISP=SHR // DD DSN=SYS1.MACLIB,DISP=SHR //SYSUT1 DD UNIT=SYSDA,SPACE=(CYL,(1,1)) //SYSPUNCH DD DSN=&&SYSP;, // UNIT=SYSDA,DISP=(,PASS), // SPACE=(400,(100,100,1)) //SYSPRINT DD SYSOUT=* //SYSIN DD * CSQ6SYSP CTHREAD=600, TOTAL NUMBER OF CONNECTIONS X CMDUSER=CSQOPR, DEFAULT USERID FOR COMMANDS X EXITLIM=30, EXIT TIMEOUT (SEC) X EXITTCB=8, NUMBER OF EXIT SERVER TCBS X IDBACK=500, NUMBER OF NON-TSO CONNECTIONS X IDFORE=100, NUMBER OF TSO CONNECTIONS X LOGLOAD=900000, LOG RECORD CHECKPOINT NUMBER X OTMACON=(,,DFSYDRU0,2147483647,CSQ), OTMA PARAMETERS X QMCCSID=0, QMGR CCSID X QSGDATA=(,,,), QUEUE-SHARING GROUP DATA X RESAUDIT=YES, RESLEVEL AUDITING X ROUTCDE=1, DEFAULT WTO ROUTE CODE X SMFACCT=NO, GATHER SMF ACCOUNTING X SMFSTAT=NO, GATHER SMF STATS X STATIME=30, STATISTICS RECORD INTERVAL (MIN) X TRACSTR=NO, TRACING AUTO START X TRACTBL=99, GLOBAL TRACE TABLE SIZE X4K X WLMTIME=30, WLM QUEUE SCAN INTERVAL (SEC) X SERVICE=0 IBM SERVICE USE ONLY END /* //* //* LINKEDIT CSQARVP, CSQLOGP and CSQSYSP into a //* system parameter module. //* //LKED EXEC PGM=IEWL,COND=(0,NE), // PARM='SIZE=(900K,124K),RENT,NCAL,LIST,AMODE=31,RMODE=ANY' //* //* OUPUT AUTHORIZED APF LIBRARY FOR THE NEW SYSTEM //* PARAMETER MODULE. //* //SYSLMOD DD DSN=SYS1.WITA.LINKLIB,DISP=SHR //SYSUT1 DD UNIT=SYSDA,DCB=BLKSIZE=1024, // SPACE=(1024,(200,20)) //SYSPRINT DD SYSOUT=* //ARVP DD DSN=&&ARVP;,DISP=(OLD,DELETE) //LOGP DD DSN=&&LOGP;,DISP=(OLD,DELETE) //SYSP DD DSN=&&SYSP;,DISP=(OLD,DELETE) //* //* LOAD LIBRARY containing the default system //* parameter module (CSQZPARM). //* //OLDLOAD DD DSN=MQSERIES.V520.SCSQAUTH,DISP=SHR //SYSLIN DD * INCLUDE SYSP INCLUDE ARVP INCLUDE LOGP INCLUDE OLDLOAD(CSQZPARM) ENTRY CSQZMSTR NAME CSQZPARM(R) Your system parameter module name /*
The variable to set is as follows:
TRAXSTR=NO, START TRACE AUTOMATICALLY YES|NO
CTHREAD parameter of CSQ6SYSP (Maximum number of concurrent connections to MQ) IDBACK parameter of CSQ6SYSP (Maximum number of background concurrent threads connected to MQ)
CTHREAD is the maximum number of simultaneous connections to the queue manager. It should be greater than, or equal to, the sum of IDFORE and IDBACK. IDFORE is the number of concurrent TSO connections to WebSphere MQ, and IDBACK is the number of concurrent background connections, which includes jms threads. If any or all of these parameters are too low, applications will be unable to connect to the queue manager. These parameters are found in the CSQ6SYSP section of the MQ ZPARMS. You can update the MQ ZPARMS at any time; the updates will take effect the next time you restart the queue manager.
LOGLOAD parameter of CSQ6SYSP (number of log records written before a checkpoint) WRTHRSH parameter of CSQ6LOGP (Number of active log buffers)
When using persistent messages, it is particularly important to pay attention to logging characteristics. MQ logs should always be placed on high performance volumes with DASD fast write enabled. MQ logs are often the single most significant bottleneck when using persistent messages. The LOGLOAD parameter controls the number of log records written before a checkpoint (assuming, of course, that the log is large enough to hold this number of records). Checkpoints generally should occur no more frequently than every 5 or 6 minutes. If your MQ checkpoints are more frequent, you may need to increase either the size of the logs, the value of LOGLOAD, or both. In the laboratory, we use a LOGLOAD value of 900000 because we execute high throughput jms workloads that are very write-intensive. When the space on the log is exhausted, a log switch occurs which disrupts performance. You can avoid frequent log switches by increasing the size of the log(s).
WRTHRSH is the number of active log buffers, and determines how much data is held in memory before a log write occurs. If you have a high I/O rate to your log volume(s), you may wish to increase this parameter. In the laboratory, we use a value of 200.
Generally speaking, your message rate for persistent messages cannot exceed the bandwidth capacity of your slowest log volume. For example, if your were sending messages of 5KB at a throughput rate of 300 per second, you would be writing at least 1.9 MB of data per second to the log (this is roughly 1.3KB plus the user message size for each logged message).
SECQTY parameter of CSQ6ARVP (archive log space allocation) PRIQTY parameter of CSQ6ARVP (archive log space allocation) ALCUNIT parameter of CSQ6ARVP (archive Log allocation unit) TWOARCH parameter of CSQ6LOGP (dual archive logs)
The PRIQTY and SECQTY parameters control the size of the archive logs. Generally it is best to allocate them (ALCUNIT) in cylinders in lieu of blocks. Depending upon your data integrity requirements, you may or may not choose to have dual archive logging.
BUFFERS (number of buffers on the DEFINE BUFFERPOOL statement)
Use the DEFINE BUFFERPOOL statement to specify the number of buffers. It is important to insure the number of buffers is large enough to hold at least an entire message (and its headers). Otherwise, WebSphere MQ will be forced to write to the Page Data sets for every message. For example, a 100MB message requires at least 26000 pages in the bufferpool. MQ Buffer Manager statistics can be used to determine the number of times a buffer was unavailable. See Support Pac MP1B, MQSeries for OS/390 V5.2 - Interpreting accounting and statistics data.
INDXTYPE(NONE) (index specification for queue definitions) or INDXTYPE(CORRELID) DEFPSIST(NO)
Unless your applications retrieve messages by other than correlation ID (which is the case for jms publish/subscribe) or message ID, it is normally best not to specify message selectors on queue definitions. You should, however, make sure you have specified INDXTYPE(CORRELID) on the SYSTEM.JMS.ND/D queues, and/or on the SYSTEM.JMS.ND.CC / .D.CC queues, and/or on any shared message queues for publish/subscribe. Specify DEFPSIST(NO) unless you want messages on a particular queue to default to persistent. Since DEFPSIST(YES) will affect performance, make sure you really want persistent messages.
If your applications use message ID to access the message, we highly recommend indexing the queue on message ID. You can add the index either at the time of queue definition or on the fly by using the MQSeries command INDXTYPE(MSGID).
BATCHSZ parameter for queue definitions (Number of messages sent as a batch)
We did not modify the BATCHSZ parameter in the laboratory.