dg库日志应用慢参数调整

dg库日志应用慢参数调整


1> 日志应用是否使用了并行;-并行度看主机的cpu个数

alter database recover managed standby database parallel 8 disconnect from session;


2> 调整并行恢复参数 parallel_execution_message_size 最大值65536;增加size需要更加多的share pool。

调整参数时,需要确定shared pool的使用情况,避免4031错误

show parameter parallel_execution_message_size

show parameter disk_asynch_io

show parameter parallel_execution_message_size

alter system set parallel_execution_message_size=32768 scope=spfile;

alter system set disk_asynch_io=true scope=spfile;


3> 是否使用异步io;通常异步io能提供更好的io性能;aix hp 貌似默认是开启异步io的

alter system set filesystemio_options=setall;

show parameter filesystemio_options


4> db_block_checking –块内数据逻辑检查

在dg库上取消该参数,能提供更好的性能,经过测试能提升约2倍速度  

alter system set db_block_checking=false scope=spfile;

startup nomount;

alter database mount standby database;

——————————————–

alter system set parallel_execution_message_size=32768 scope=spfile; 

alter system set filesystemio_options=setall scope=spfile;  

alter system set disk_asynch_io=true scope=spfile;

alter database recover managed standby database cancel;

shutdown immediate;

startup 

alter database recover managed standby database parallel 4 disconnect from session using current logfile; 

       

极端情况下DG加快恢复速度===在standby端执行,千万不可在primary端调整

alter system set parallel_execution_message_size=32768 scope=spfile;   16384

alter system set filesystemio_options=setall scope=spfile; 默认 none

alter system set disk_asynch_io=true scope=spfile;                   默认就是true

alter system set db_lost_write_protect=typical scope=spfile  ;       默认是full

alter system set db_block_checksum=false scope=spfile ; 默认是TYPICAL

alter system set DB_BLOCK_CHECKING=false scope=spfile ;        默认是false

alter system set db_writer_processes=8 scope=spfile;                  默认是6个

shutdown immediate;

startup nomount;

alter database mount standby database;

alter database recover managed standby database parallel 4 disconnect from session; ?—-并行度根据CPU核数*2设定

另外shared_pool size过小也会影响应用速度,请遇到DG延迟的时候 可适当根据安装规范检查,防止shared pool过小。(如最小要保证2G以上)


dg库日志应用性能监控

set lines 200 pages 2000

col process format a8

col spid format a8

col event format a50 tru

col SIW format 999999

select to_char(sysdate,’DD-MON-YYYY HH24:MI:SS’) “Current time”

 ,s.process

 , p.spid

 , substr(s.program, -6) PROC

 , s.event

 , s.p1

 , s.p2

 , s.p3

 , s.seconds_in_wait SIW

 , s.seq#

from v$session s, v$process p

where p.addr = s.paddr and (s.program like ‘%MRP%’ or s.program like ‘%PR0%’ or s.program like ‘%DBW%’ or s.program like ‘%CKPT%’)

order by s.process

/

    原文作者:DBA_每日记
    原文地址: http://blog.itpub.net/69950231/viewspace-2660356/
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞