dg庫日誌應用慢引數調整

DBA_每日記發表於2019-10-17

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

/


來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/69950231/viewspace-2660356/,如需轉載,請註明出處,否則將追究法律責任。

相關文章