Replication Agent acknowledgements (-asc) parameter
OE 10.0b - 11.7.x:The Replication Agent acknowledgements -asc parameter is an OpenEdge Replication specific parameter introduced in OpenEdge 10.0b and above. Although it is not documented, its use is supported and may help with certain performance issues.
The -asc value governs how many AI blocks are sent to the target database before an acknowledgement is sent back from the replagent (RPLA) to the replserv (RPLS). It causes the Replication Server to wait for the Replication Agent to acknowledge receipt of and complete processing of the set of AI blocks defined by the -asc parameter, sent to the Agent.
During the time it takes the Replication Server to wait for the acknowledgement, it is not processing AI blocks. This could result in brief periods of source database inactivity. In other words, the -asc value determines how often the Replication Server (RPLS) will wait for the Replication Agent (RPLA) to catch up and acknowledge that it is still listening.
On every nth AIBLOCK message rpserver sends to the rpagent, rpserver sends an acknowledgement request to the rpagent. The rpserver will stall until it receives the acknowledgement message. This is done in order to make sure the target db does not fall too far behind the source db. Larger values of n means that there is a greater chance that rpserver will be stalled waiting for an acknowledgement message and, thus, greater chance that the forward processing of txns on source database will be stalled.
Setting -asc has no effect or impact on the replication synchronization point when a crash, shutdown or anything else unexpected happens. It does not affect *.replication.recovery file updates, synchronization or recovery synchronization process execution, or any other replication functions outside of communicating to the Replication Server.
When -asc is set to a value of
501 specifically, the acknowledgement is turned off. A value of 501 instructs Replication Server to not wait for acknowledgment and constantly feed the Replication Agent with AI blocks for Agent to apply. Turning off this feature, will force OpenEdge Replication to be far more reliant on the network layer informing the database manager of failure. –asc parameter with a value 501 will turn off all block acknowledgements except for two cases:
- the agent send an ACK to the server when it receives a block with a checkpoint note or
- the agent send an ACK to the server when it receives a block with an AI extent switch note.
The ACK in these two cases contains data needed by the replication server when a source and target(s) start a synchronization process.
For further information refer to Article
Disabling RPLS from waiting with -asc 501 AI ACK are still sent from RPLA The default value for -asc is
10 AI Blocks. It can be set to any value between 10 and 500.
An -asc value of <
500 indicates the number of blocks at which the TCP/IP acknowledgement will occur.
Setting -asc to a value higher than the default of 10 AI Blocks may have a positive impact on the overall Replication performance. With higher -asc setting, there will be less TCP/IP packets sent between source and target database and more AI blocks to process before the TCP/IP packet is sent (i.e. between Replication Server and Agent). To monitor the performance of the replication processes use:
- The Replication Monitor (DSRUTIL -C monitor) to review wait and recovery information
- PROMON > R&D 1, 16; when the Free Message Entries approaches 0 this is an indication of a performance problem.
Increasing the -asc value (to say 100) would mean that the acknowledgement packet is sent every 100 blocks instead of every 10. Therefore, if the network breaks between one batch of 100 and the next, OpenEdge cannot recognize the failure as quickly and makes replication more reliant on the network layers to inform the database manager of failure which when notified, instructs the RPLS or RPLA of the failure triggering the next connect-time out actions.
On the other hand, while changes to the Replication Agent acknowledgements settings (-asc) will not effect communication errors, they will still be posted as they occur in the database log files, increasing the -asc value can make replication a little less sensitive to network hiccups when minor network issues while the acknowledgement block is in process briefly interrupts replication communications that are (almost) immediately recovered, unless the underlying network layers have informed the database manager of failure instead.
For example:
Replication Agent Communication failure:
(9407) Connection failure for host <IP ADDRESS> port <port number> transport TCP.
(10492) A communications error -157 occurred in function rpNLA_PollListener while receiving a message.
(11699) A TCP/IP failure has occurred. The Agent's will enter PRE-TRANSITION, waiting for connection from the Replication Server.
Shortly followed by recovery:
(10392) Database <dbname> is being replicated from database <dbname> on host <IP ADDRESS>.
(10671) The OpenEdge Replication Agent agent1 is beginning Recovery Synchronization at block 20867.
(6806) Retry transaction point located at dbkey 0 note type 10 updctr 0.
(6807) Retry point located at dbkey 0 note type 11 updctr 0.
(10670) The Source and Target databases are synchronized. Normal processing is resuming.
How to set Replication Agent acknowledgements (-asc) value:The -asc setting is set in the
DLC/pmmgr.properties file under the REPLSERV section:
Example:
pmmgr.properties
[replserv]
install-dir=< DLC >
install-date= Ddd Mmm YY HH:MM:SS YYYY
version=10.1x
arguments=-asc 100
[replagent]
install-dir=< DLC >
install-date= Ddd Mmm YY HH:MM:SS YYYY
version=10.1x
Once the value for -asc has been set, the source database needs to be stopped and restarted (it is not sufficient to simply restart the Replication Server) for the new arguments to be picked up.
To verify if the asc parameter was successfully implemented, the current value can be verified using the DSRUTIL replication monitoring utility as follows:
Run DSRUTIL against the source database
$ dsrutil source -C monitor
From the Menu presented, select:
R. Replication server remote agents
Select the specific Agent from the list
1. agent1
Navigate to the second page of the display to verify the asc value in use:
Server to agent load check interval: 100 blocks
The "
repl.server.startup.lg" can also be parsed, when these arguments are in effect:
...
Executable
----------
Name : DLC/BIN/RPSERVER.EXE
Argument 1 : -asc
Argument 2 : 100
Argument 3 : -db
Argument 4 : source
As opposed to when the asc value is changed and the Replication Server is restarted after being terminated with "
dsrutil source -C restart server", the modified [replserv] arguments=-asc 100 are not in effect:
$ dsrutil source -C restart server
#repl.server.startup.lg
...
Executable
----------
Name : DLC/BIN/RPSERVER.EXE
Argument 1 : -restr
Argument 2 : -db
Argument 3 : source
And the replication monitor (as shown above), will still show the value taken at initial source startup:
Server to agent load check interval: 10 blocks
OE 12.x and Above:
In OE12.0, there were some design changes made with respect to the -asc parameter in replication.
The parameter -asc has been disabled and set to the default value of 501.
This is the suggested value for most environments and should not be changed as other values may result in replication performance degradation.
The -asc parameter, as previously specified in 'arguments' property for rpserver plugin in pmmgr.properties, will no longer take effect. It can be set, but its value will not take effect. It will be ignored even though it shows up in the repl.server.startup.lg file.
If needed there are new steps to set the value for asc for each target individually.
However, it should be tested extensively as the recommendation is to leave the setting with the default values.
There are two new replication properties in the [control-agent] section of the repl.properties file, specifically for setting the asc settings.
Previously, the -asc n argument applied to all connected agents. This meant that, if you had a two target replication setup, the asc parameter would apply to both rpagents in the same way.
Now, the asc can be set for each respective agent.
The two new properties are as described:
- request-agent-ack=[0|1], toggles usage of asc for the remote agent. If set to 0 (default), it overrides any setting of the next property, which controls the interval of AIBLOCK messages on which the acknowledgement message is sent.
- request-agent-ack-interval=[1-499], specifies the number of AIBLOCK messages after which the rpserver will send the acknowledgement request to the rpagent. Values outside of this range will disable the usage of request-agent-ack and are equivalent of setting 'request-agent-ack=0'. Not setting 'request-agent-ack-interval', in combination with setting 'request-agent-ack=1' is the equivalent of setting 'request-agent-ack=0'.
All the scenarios below will result in the -asc being set to 501 or disabled.:
- Default, do not set 'request-agent-ack' in the [control-agent] section of the repl.properties file.
- Explicitly set 'request-agent-ack' to 0.
- Explicitly set 'request-agent-ack' to 1 and set 'request-agent-ack-interval' to a value out of range of 1-499 (501 for example). This is done to maintain backward compatibility for customers who've become familiar with the 501 setting and want to retain its usage.
- Explicitly set 'request-agent-ack' to 1, and do not set 'request-agent-ack-interval'.