1 Oracle LGWR worker group 说明
What is LGWR worker group? (Doc ID 2985280.1)
LGWR worker group 是 Oracle 12c 中引入的一个新特性,并在在 12c 以后版本默认启用, 该特性也叫"LGWR slave group"
或 "multiple Log Writers"
。
在启用该特性的情况下,后台至少会有 2 个 LGWR 进程:lg00, lg01
[dave@www.cndba.cn ~]# ps -ef | grep cndba | grep lg
oracle1+ 26704 1 0 13:01 ? 00:00:07 ora_lgwr_cndba
oracle1+ 26713 1 0 13:01 ? 00:00:01 ora_lg00_cndba
oracle1+ 26719 1 0 13:01 ? 00:00:00 ora_lg01_cndba
[dave@www.cndba.cn ~]#
并且在 AWR 报告中, 也有有LGWR worker group相关的内容:
LGWR intra group sync
LGWR worker group ordering
LGWR any worker group
LGWR intra group IO completion
LGWR all worker groups
但是作为新特性,在目前 19c 的版本中,在某些情况下,启用LGWR worker group会降低 LGWR 的性能,并且也有一些 bug,因此生产环境建议关闭该特性。
2 关闭LGWR worker group
该特性通过隐含参数_use_single_log_writer控制,默认是’ADPTIVE’。
因为该参数是静态参数,修改后需要重启实例生效。
SQL> alter system set "_use_single_log_writer" = true scope=spfile;
注意:当cpu_count = 1时,该参数永远为 true:
If the (virtual) machine you are on has a cpu_count = 1, that parameter will always set to TRUE (even with a default of ADAPTIVE).
Can Not Change _USE_SINGLE_LOG_WRITER Parameter (Doc ID 2561151.1)
版权声明:本文为博主原创文章,未经博主允许不得转载。