RAC diagwait参数 10G,11G R1

diagwait 参数的作用延迟节点重启的时间值,以便RAC后台进程写出必要的诊断信息到各自的日志中。

 

下面是在一台10G的RAC生产库上面查询得到的信息,很遗憾并没有设置diagwait这个参数

# /opt/oracle/product/RAC10g/bin/crsctl get css diagwait

Configuration parameter diagwait is not defined.

 

11gR2之前版本的集群,将Diagwait设置为13。

 从本质上讲, diagwait值在RAC环境中控制着两件关键的事情:

 (1)默认情况下,集群守护进程OPROCD的超时值为1秒和0.5秒的时间差,这意味着,如果OPROCD不能在 1.5秒内返回,系统会被重启。设置diagwait为推荐值13会将OPROCD的默认超时时差增加到10秒( diagwait - CSS重启时间[默认为3秒]),从而防止大量由于OPROCD没有在定义的时间内返回而导致的'假'的节点重启。对于繁忙的系统,1.5秒的默认值太小了。长期推荐的办法是将OPROCD超时提高到一个更为合理的值11秒(1秒休眠时间+10秒时间差)。

 (2)当节点驱逐/重启事件发生时,增加diagwait,我们更可能在重新启动之前将日志信息刷新到磁盘,因此,缩短寻找问题根本原因时间。

 

扫描二维码关注公众号,回复: 2876589 查看本文章

 从11g第2版(11.2.0.1和更高版本)开始,这一变化不再是必要的。然而,对于之前的版本,这个改变必须在一个完整的停机时间进行,而且这个值不能通过补丁修正。因此,必须安排停机时间手动修改。鉴于已知通过设置diagwait解决的问题的数量,申请停机时间来修改它是值得的投入。请注意,因为这个值存储在Oracle集群注册表(OCR),如果您的确需要重建OCR或从一个之前的备份恢复,您可能需要重新设置diagwai。检查当前值可以通过以下简单的命令:(详见METALINK:559365.1)

 

Diagwait:

Delay the node reboot for a short time to write all diagnostic messages to the logs.

Doesn’t increase of probability of data corruption

Setup steps: shutdown CRS

crsctl set css diagwait 13 –force

restart CRS

Set diagwait to 13

Will set the oprocd margin to 10 seconds instead of 500ms

Will prevent unneccesary node evictions under high load

Is a general recommendation for servers under high load, not specific to Oracle VM

Please review Metalink note 559365.1 on how to set this

If diagwait > reboottime then OPROCD_DEFAULT_MARGIN := (diagwait – reboottime) * 1000

 

设置css diagwait的步骤:

1. crsctl stop crs

#<CRS_HOME>/bin/oprocd stop

<2>. Ensure that Clusterware stack is down on all nodes by executing

#ps -ef |egrep “crsd.bin|ocssd.bin|evmd.bin|oprocd”

This should return no processes. If there are clusterware processes running and you proceed to the next step, you will corrupt your OCR. Do not continue until the clusterware processes are down on all the nodes of the cluster.

<3>. From one node of the cluster, change the value of the “diagwait” parameter to 13 seconds by issuing the command as root:

#crsctl set css diagwait 13 -force

<4>. Check if diagwait is set successfully by executing. the following command. The command should return 13. If diagwait is not set, thefollowing message will be returned “Configuration parameter diagwait is not defined”

#crsctl get css diagwait

 

<5>. Restart the Oracle Clusterware on all the nodes by executing:

#crsctl start crs

 

<6>. Validate that the node is running by executing:

#crsctl check crs

 

移除diagwait的设置

crsctl unset css diagwait

猜你喜欢

转载自blog.csdn.net/qq_34556414/article/details/81389229