eygle.com   eygle.com
eygle.com eygle
eygle.com  
 

« 天下有雪 冬日最后的料峭 - 久违北京的雪 | Blog首页 | 笔记本R51e、流氓软件、与智能手机工作室 »

Oracle Wait Events: Wait for scn ack
modb.pro

wait for scn ack 是在RAC环境中可能常见的一个等待事件,意思是等待跨实例的SCN应答

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) 的意思是:TCP首部中的确认标志,对已接受到的TCP报文进行确认。Acknowledge Character,就是确认字符。在数字通信协议中,如果接受方成功的接收到数据,那么会回复一个ACK信号。通常ACK信号有自己固定的格式,长度大小,由接受方回复给发送方。其格式取决于采取的网络协议。当发送方接收到ACK信号时,就可以发送下一个数据。如果发送方没有收到信号,那么发送方可能会重发当前数据包,也可能停止传送数据。具体情况取决于所采用的网络协议。ACK信号通常是一个ASCII字符,不同的协议中ACK信号都不一样。

一段英文解释:

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.

但是由于等待事件 'wait for scn ack' 不能给出足够的信息量度LGWR发出BOC信息以及收到ACK信息的时间。在10.2.0.5及11gR2中,将增加了一个新的统计信息'redo write broadcast ack time'用于辅助的时间统计。

BOC是Oracle的SCN传递算法之一,即Broadcast on Commit。在Oracle9i中,缺省的SCN传播算法是lamport算法,SCN在实例间传递是通过GCS MESSAGE来传递的,因此会存在一定的延时,在某些情况下,如果不同实例的SCN不能及时传递,多个节点之间就可能看到不同的数据,导致逻辑错误,Oracle可以通过一个参数来控制SCN的传播延时,这个参数是MAX_COMMIT_PROPAGATION_DELAY,在Oracle9i及Oracle10gR1中,其缺省值是700(7秒),确保SCN传播不得超过7秒,但是7秒已经是一个很长的时间参数。一般每3秒LCK进程就会进行一次跨实例数据交换。如果将该参数设置为0~99,就会禁用Lamport方式,使用BOC方式进行SCN同步。

从Oracle10gR2开始,BOC是缺省的SCN传播机制,同时参数_immediate_commit_propagation 设置为TRUE,以为着由Commit引起的SCN会立即传播,排除延时:

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


历史上的今天...
    >> 2012-02-22文章:
    >> 2011-02-22文章:
    >> 2008-02-22文章:
           What's Mean "reliable message"?
    >> 2006-02-22文章:
    >> 2005-02-22文章:

By eygle on 2009-02-22 11:52 | Comments (2) | Internal | 2203 |

2 Comments

可以继续深入讲解下,哪些scn被传播,整个过程运行概况

GoldenGate在RAC做数据复制就受这个SCN传播影响


CopyRight © 2004~2020 云和恩墨,成就未来!, All rights reserved.
数据恢复·紧急救援·性能优化 云和恩墨 24x7 热线电话:400-600-8755 业务咨询:010-59007017-7040 or 7037 业务合作: marketing@enmotech.com