Using the dashboard to track latency
Low latency is one of the defining characteristics of Q replication, and the Q Replication Dashboard gives you several tools to keep close tabs on how quickly transactions are moving between source and target.
You can set an alert threshold so that the dashboard signals with icons when latency drops below your maximum desired value. When a threshold is exceeded, you can easily view details that show where replication might be slower than expected, and use the analysis to help you tune your system for lower latency.
Follow these steps to drill down on latency:
- From the Summary page of your dashboard view, make sure the configurations table is expanded.
- Look in the row for the SEND_RECVQ_LON_TOKYO combined send and receive queue
in the LONDON.ASN > TOKYO.ASN configuration. Depending on your system
speed, the icon in the Latency column might be red or green. Here is how the
icon is determined:
- You set the alert threshold for end-to-end latency when you create or change a dashboard view. (The default threshold is 3 seconds.)
- If the average end-to-end latency exceeded the threshold the last time the dashboard looked at replication program performance information, a red square icon is shown. Otherwise, a green diamond displays.
Figure 20. Latency value that exceeds the alert threshold
- Click the table cell for the SEND_RECVQ_LON_TOKYO in the Latency column. A
details window opens:
Figure 21. Latency details window
The window gives you quick statistics on the three types of latency that together make up end-to-end latency:
Table 7. Latency types Type Description Q Capture latency The time between a transaction being read in the DB2 log and the message containing the transaction being put on the send queue. MQ latency The time between Q Capture putting a message on a send queue and Q Apply getting the message from the receive queue. Q Apply latency The time between Q Apply getting the message from the receive queue and applying it to the target table.
In this case, for the most recent instance that the latency alert threshold was exceeded, Q Capture latency was the main factor in exceeding the threshold. However, the dashboard helps you look more closely at latency factors before reaching any conclusions.
- On the latency details window, click on the arrow next to the "Time interval" field, and select Last 10 minutes of available data.
- Select Generate Report.
Figure 22. Latency report
A red line is set at the alert threshold. Each individual bar is divided into three colors that represent the three components of end-to-end latency, but in a more dynamic and visual way.
It's easy to see that the Q Capture latency (green portion of each bar) accounts for most of the elapsed time. You also get more detail about how many times the latency threshold was exceeded during the reporting period and the best and highest latency values.
You can also click on Recommendations on the latency details report to generate an analysis of factors that might contribute to higher-than-expected latency.
Now that you've seen the speed of transactions replicating from source to target, let's take a look at how the dashboard helps pinpoint problems that can occur in a replication environment.