Oracle Wait Events: Wait for scn ack

Keywords: Oracle SQL network ascii

wait for scn ack is a waiting event that may be common in RAC environments, meaning waiting for a SCN response across instances.

Top 5 Timed Events                                        Avg %Totalr
~~~~~~~~~~~~~~~~~~                                        wait  Call
Event                                Waits    Time (s)  (ms)  Time Wait Class
------------------------------ ------------ ----------- ------ ------ ----------
CPU time                                          1,751          47.8
db file sequential read            318,634        902      3  24.7  User I/O
log file sync                      186,536        404      2  11.0    Commit
db file scattered read              101,049        333      3    9.1  User I/O
wait for scn ack                    150,087        295      2    8.1      Other
        -------------------------------------------------------------

ACK (ACKnowledgment) means that the acknowledgement flag in the TCP header confirms the received TCP message. Acknowledge Character is the confirmation character. In digital communication protocol, if the receiver receives data successfully, an ACK signal will be returned. Usually ACK signal has its own fixed format, length and size, which is returned by the receiver to the sender. Its format depends on the network protocol adopted. When the sender receives the ACK signal, it can send the next data. If the sender does not receive the signal, the sender may retransmit the current packet or stop transmitting the data. The specific situation depends on the network protocol used. ACK signal is usually an ASCII character, and ACK signal is different in different protocols.

An English explanation:

ACK - ACK signal,In some digital communication protocols, ACK is the name of a signal that data has been received successfully (for example, with an acceptable number of errors). The ACK signal is sent by the receiving station (destination) back to the sending station (source) after the receipt of a recognizable block of data of specific size. In order to be recognizable, the data block must conform to the protocol in use. When the source receives the ACK signal from the destination, it transmits the next block of data. If the source fails to receive the ACK signal, it either repeats the block of data or else ceases transmission, depending on the protocol.
The ACK signal is usually an ASCII character that is reserved for that purpose. In some protocols, there are various ACK signals that indicate the successful reception and recognition of specific commands, such as power-down or standby.

But because the waiting event'wait for scn ack'can not give enough information to measure the time when LGWR sends out BOC information and receives ACK information. In 10.2.0.5 and 11gR2, a new statistical information'redo write broadcast ack time'will be added for auxiliary time statistics.

BOC is one of Oracle's SCN delivery algorithms, namely Broadcast on Commit. In Oracle 9i, the default SCN propagation algorithm is Lamport algorithm. SCN transfers between instances through GCS MESSAGE, so there will be a certain delay. In some cases, if the SCN of different instances can not be transferred in time, different data may be seen between multiple nodes, leading to logical errors. Oracle can control the propagation delay of SCN through a parameter. This parameter is MAX_COMMIT_PROPAGATION_DELAY. In Oracle 9i and Oracle 10gR1, the default value is 700 (7 seconds), which ensures that SCN propagation cannot exceed 7 seconds, but 7 seconds is already a very long time parameter. Typically, LCK processes exchange data across instances every 3 seconds. If this parameter is set to 0-99, Lamport mode will be disabled and BOC mode will be used to synchronize SCN.

Beginning with Oracle 10gR2, BOC is the default SCN propagation mechanism, and the parameter _immediate_commit_propagation is set to TRUE, which means that SCN caused by Commit will propagate immediately, eliminating delay:

SQL> SET linesize 120
SQL> COL name for a30
SQL> COL value for a20
SQL> COL describ for a60
SQL> SELECT x.ksppinm NAME, y.ksppstvl VALUE, x.ksppdesc describ
  2    FROM SYS.x$ksppi x, SYS.x$ksppcv y
  3  WHERE x.indx = y.indx AND x.ksppinm LIKE '%&par%'
/  4  
Enter value for par: _commit
old  3:  WHERE x.indx = y.indx AND x.ksppinm LIKE '%&par%'
new  3:  WHERE x.indx = y.indx AND x.ksppinm LIKE '%max_commit%'
NAME                          VALUE                DESCRIB
------------------------------ -------------------- ------------------------------------------------------------
max_commit_propagation_delay  0                    Max age of new snapshot in .01 seconds
_immediate_commit_propagation  TRUE                if TRUE, propagate commit SCN immediately

Posted by 00tank on Sun, 16 Dec 2018 10:03:03 -0800