Oracle Wait Events: Wait for scn ack

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

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/21094976/viewspace-627850/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/21094976/viewspace-627850/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值