Salesforce

How is the "Repl Server behind Source DB by" value calculated in the dsrutil monitor utility?

« Go Back

Information

 
TitleHow is the "Repl Server behind Source DB by" value calculated in the dsrutil monitor utility?
URL NameP150500
Article Number000134864
EnvironmentProduct: OpenEdge
Version: 10.1C01, 10.2B, 11.x, 12.x
OS: All supported platforms
Question/Problem Description
How is the "Repl Server behind Source DB by" value calculated in the DSRUTIL monitor utility?
How are latency values calculated in the DSRUTIL monitor utility?
Steps to Reproduce
Clarifying Information
Error Message
Defect Number
Enhancement Number
Cause
Resolution

DSRUTIL -C monitor, Option A.  Replication agent status, latency information: 

During normal source database activity with OpenEdge Replication running, all AI blocks written to an AI extent are sent to the OpenEdge Replication Server (RPLS). These AI blocks are placed in a queue waiting for the RPLS to send to the RPLA on the target server. The RPLS then sends the AI blocks to all configured OpenEdge Replication Agents (RPLA).

Repl Server behind Source DB by value is the number of seconds difference between the timestamp of the last AI block write on the server and the timestamp of the last transaction end note or after image extent switch note received by the agent. It is effectively the delay between AI block writes and the RPLS being able to flush the RPLS-Q as this information is acknowledged by the RPLA when it has processed these notes. To provide a simplified schematic:
User-added image

This time sent to the agent from the server in the AI block and is used when calculating latency:

  1. The time of the AI block write is saved into each AI block that is written. This is the timestamp of the AI buffer flush on the source database when this AI Block message is sent by the replication server to the replication agent. 
  2. The time of an AI switch is recorded in the first AI block of the new AI extent.
  3. AI transaction notes also record the timestamp of begin and end notes for the transaction id.
The “Repl Server behind Source DB by” is calculated as the difference in seconds between:
The time of of the last transaction end note applied to the target database, recorded when that ai transaction note was originally written to that AI block on the source database, or the timestamp of the ai extent switch note received by the agent and the time of the most recent AI block write on the source.

Example:

Latency Information:
    Repl Server behind Source DB by:        2553  second(s)
    Current Source Database Transaction:    2182416
    Last Transaction Applied to Target:     2177660

Verify the last transaction number on both the source and target databases with PROMON:

PROMON > R&D >  Option 1. Status Displays >  Option 1 Database
"Last transaction id"

Verify the number of blocks acknowledged by the RPLA:

$   dsrutil target -C monitor
Blocks acknowledged:

During periods of moderate activity, the latency value will be low due to the interleaved transactions and frequent transaction end notes received by the agent.

During periods of relatively little activity, larger latency times may be observed if only one large transaction is active and no AI extent switches occur. This does not mean that AI blocks are not received by the agent. However, until a transaction end note or AI extent switch note is received, the latency time reported will increase.

The reported latency time is high when there are long periods of time between:

  • Transaction end and/or AI extent switches on the source database
  •  AI buffers are filled and eventually sent from the PICA queue on the source database.

In order to check and tune the Replication Server queue and Agent acknowledgements (-asc) parameter refer to Articles:

Workaround
Notes
Keyword Phrase
Last Modified Date12/11/2020 11:02 AM

Powered by