Improved performance - basic configuration
How you set up a basic scenario for improved performance using shared queues on IBM® MQ.
About this task
This scenario describes the use of SCM to increase the number of messages that can be stored on a shared queue without incurring the performance cost of using SMDS.
- Queue sharing group,
IBM1
, that contains a single queue manager,CSQ3
. In addition to the administration structure, the queue sharing group defined a single application structure,SCEN2
. - Coupling facility (CF)
CF01
, in which theSCEN2
application structure is stored as theIBM1SCEN2
structure. This structure has a maximum size of 2 GB. - Single shared queue,
SCEN2.Q
, which is configured to use the application structure.
Furthermore, assume that queue manager CSQ3
is already the only member of queue
sharing group IBM1
.
You must add the definition for structure IBM1SCEN2
to the coupling facility
resource manager (CFRM) policy. For simplicity, the structure is defined so that it can be created
in only a single coupling facility, CF01
, by specifying
PREFLIST(CF01)
.
IBM1SCEN2
:
STRUCTURE
NAME(IBM1SCEN2)
SIZE(2048M)
INITSIZE(2048M)
ALLOWAUTOALT(YES)
FULLTHRESHOLD(85)
PREFLIST(CF01)
ALLOWREALLOCATE(YES)
DUPLEX(DISABLED)
ENFORCEORDER(NO)
Both the INITSIZE and SIZE keywords have the value 2048M
so that the structure cannot resize.
Procedure
Results
You have created the basic configuration. You can now obtain an idea of the baseline performance of your configuration using whatever method you select.
What to do next
- Use a PCF application to request the current depth ( CURDEPTH ) value for
SCEN2.Q
every five seconds. The output can be used to plot the depth of the queue over time. - A single threaded getting application repeatedly gets messages from
SCEN2.Q
, using a get with an infinite wait. To simulate processing of the messages that were removed, the getting application pauses for four milliseconds for every ten messages that it removed. - A single threaded putting application puts a total of one million 4 KB non-persistent messages
to
SCEN2.Q
. This application does not pause between putting each message so messages are put onSCEN2.Q
faster than the getting application can get them.As a result, when the putting application is running, the depth of
SCEN2.Q
increases.When structure
IBM1SCEN2
is filled, and the putting application receives a MQRC_STORAGE_MEDIUM_FULL reason code, the putting application sleeps for five seconds before attempting to put the next message to the queue.