How can we monitor replication latency?

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #10961
    ggoodrich
    Keymaster

    Introduction

    Replication Latency can be divided into two parts Capture latency and Integrate latency. The following describes several ways to monitor the replication latency:

    HVRGUI

    The HVRGUI can be used to interactively monitor the replication latency. For each job the job table displays several relevant columns including:

    1. Latency
    2. Capture Start: the start of the oldest open transaction.
    3. Capture Emit: the time stamp of the latest record emitted from the capture job.
    4. Router Rows: the number of rows waiting to be integrated.
    5. Router Timestamp the oldest time stamp for the records waiting to be integrated.

    HVR Statistics

    HVR Statistics is a utility that analyses the HVR log files and produces statistics on the replication. These include minimum and maximum values for Capture and Integrate latency. It can be run interactively on the command line (using command hvrstatistics) or from the HVRGUI. Alternatively one can use the HVR Statistics channel. This channel periodically (e.g. hourly) runs the hvrstatistics as an agent and loads the resulting data into database table that e.g. may be used for reporting. For more information see Hvrstatistics

    HVR Maint

    HVR Maint is a utility that can be used for monitoring and maintenance of HVR, see Hvrmaint. It is able to send email or SNMP alerts if something an error occurs or if a certainly latency limits has been reached. Thresholds can be supplied for a specific location, job, channel or for the whole system. Example latency output for HVR Maint:

    ---------------------------Latencies over 10min limit---------------------------
    2h 44m latency for ch-integ-tgt
    ---------------------------------All latencies----------------------------------
    1s latency for ch-cap-src
    2h 44m latency for ch-integ-tgt
    ---------------------------------End of Latency---------------------------------
    

    HVR log files

    Both capture and integrate job show latency numbers in their output (log files).

    Capture latency:

     hvr_demo15-cap-db02: Scanned 304 transactions (5205440 bytes) from between 4 seconds and 2 seconds ago containing 1074 rows (150 del, 300 ins, 312 upd) for 6 tables in 0.69 seconds.
    

    Integrate latency:

     hvr_demo15-integ-db01: Integrated 127 changes from between 15 seconds and 13 seconds ago for 'dm15_tab2a' (25 del, 50 ins, 52 upd).
     hvr_demo15-integ-db01: Integrated 202 changes from between 15 seconds and 14 seconds ago for 'dm15_tab12b' (25 del, 50 ins, 127 upd).
     hvr_demo15-integ-db01: Integrated 127 changes from between 15 seconds and 14 seconds ago for 'dm15_tab6' (25 del, 50 ins, 52 upd).
     hvr_demo15-integ-db01: Integrated 202 changes from between 15 seconds and 13 seconds ago for 'dm15_tab12a' (25 del, 50 ins, 127 upd).
     hvr_demo15-integ-db01: Integrated 127 changes from between 15 seconds and 13 seconds ago for 'dm15_tab2b' (25 del, 50 ins, 52 upd).
     hvr_demo15-integ-db01: Integrated 127 changes from between 15 seconds and 13 seconds ago for 'dm15_tab4' (25 del, 50 ins, 52 upd).
     hvr_demo15-integ-db01: Integrate cycle used 10 transactions for 282 capture transactions from between 15 seconds and 13 seconds ago and took 1.71 seconds.
    

    State files and state tables

    Capture latency from cap_state file

    With log-based capture, the capture latency for each job can be monitored in it’s *.cap_state file. This file is located in $HVR_CONFIG/router/<hub>/<channel>/loc_<cap>/. It has a binary format but can be printed as XML using hvrrouterview (Hvrrouterview):

       $hvrrouterview hubdb hvr_demo15 hvr_config/router/hubdb/hvr_demo15/loc_db02/55f198c5_b913b-55f198c6.cap_state
       <?xml version="1.0" encoding="UTF-8"?>
       <!DOCTYPE hvr_private SYSTEM "lib/hvr_private.dtd">
       <hvr_private version="1.0">
           <file name="hvr_config/router/hubdb/hvr_demo15/loc_db02/55f198c5_b913b-55f198c6.cap_state"/> <!-- revealed 2015-09-10 16:50:45 -->
           <list>
                <!-- scan_load --> <int>1441896606</int> <!-- 2015-09-10 16:50:06 -->
                <!-- scan_start_tstamp --> <int>1441896645</int> <!-- 2015-09-10 16:50:45 -->
                <!-- scan_start_addr --> <str>0x003cba.000044e8.0010</str>
                <!-- emit_seq --> <str>25325752877057</str>
                <!-- scan_start_seq --> <str>25325752745985</str>
                <!-- emit_tstamp --> <int>1441896646</int> <!-- 2015-09-10 16:50:46 -->
                <!-- emit_addr --> <str>0x003cba.000044ed.01dc</str>
           </list>
       </hvr_private>
    

    Integrate latency from state table

    In the target database the integrate job maintains the Integrate Receive Timestamp Table (see Integrate Receive Timestamp Table). The trailer_cap_begin timestamp gives you the replication latency. When this timestamp e.g. shows 09:05 AM, this means that all changes from before this timestamp made in all of the source database for this channel have been integrated into this location. There is a table for each channel.

Viewing 1 post (of 1 total)
  • The forum ‘Expert Notes’ is closed to new topics and replies.

© 2020 HVR

Test drive Contact us