Q Replication is a component of IBM Data Replication (IIDR). QREP is a product with two parts.
- The capture part reads DB2 logs on one systems - puts the data into MQ messages which get sent to a remote site.
- The QREP apply part reads the MQ messages and applies the changes to a database at the remote site.
QREP is used by GDPS AA to replicate DB2 data from a z/OS primary site to a secondary site. It is also used to replicate data from z/OS to a distributed database.
The scenario is high throughput and time sensitive; there is some tuning you can do in this environment.
- Do not mix QREP and non-QREP workloads on the same queue manager
- Where there is significant distance between the capture and apply parts, have a separate queue manager for each and link the two with MQ sender and receiver channels
- You get maximum throughput when you use multiple transmission queues and multiple channels. This is known as the parallel sendqs feature in QREP 4 is a good number for many people - in our test systems, the maximum throughput we saw used 8 channels. The optimal number of channels may be a function of distance. One customer had 4 channels with a distance of 1000 kilometers another customer used 2 channels at 100 kilometers
- On the capture side have one transmission queue per page set
- At the apply side there is only one queue - this needs its own page set. It must have an index on MSGID defined.
- Some people allocate a big pageset, or cause expansion to the size they need, to hold the expected peak number of messages before they run QREP in production.
- Use MQ V8 with large buffer pools defined above the 64 bit bar. LOCATION(ABOVE) . For maximum performance used page-fixed buffers, PAGECLAS(FIXED4KB)
- Make the buffer pool size the size of the page set + 20%. If the buffer pool gets over 85% full it starts writing pages to the pageset.
- Check the DASD response times for the logs and page sets during peak time
- Start with configuring MQ channels for QREP with BATCHSZ(200) and BATCHLIM(100000) so 100MB for Batchlim.
- Make sure your network is using large TCP send and receive buffers ( 2MB). See what's new in TCP 2.2
- Set TCP buffer sizes to be used by MQ. See CHINTCPRBDYNSZ and CHINTCPSBDYNSZ in Getting the best throughput with MQ TCPIP channels
- With MQ V8 and above, the tuning QREP set PRUNE_BATCH_SIZE of 1000 messages on apply side generally works well.
- Depending on the workload profile using QREP QREP MAX_MESSAGE_SIZE of 1MB may give improvements in throughput.
- There are some MQ tuning parameters specificaly for QREP. READAHEAD(ON) and RAHGET(ON) on both source and target q manager, the default are OFF for both parms. See the QREP documentation