redo的等待log file sync和log file parallel write和redo size設定
今早上pub,看到pub的一篇帖子中提到了如何設定redo log的大小,利用檢視v$log_history可以檢視redo的切換的具體資訊來判斷。
Select round(first_time,’DD’),thead#,count(sequence#) from v$Log_history
group round(first_time,’DD’),thread#
order by 1,2
主要是透過每天的日誌切換量來判斷。
select a.recid,a.first_time,b.first_time last_time,(b.first_time-a.first_time)*24 redo_replace
from v$log_history a,v$log_history b
where a.recid=b.recid-1
order by a.first_time desc
這個sql可以查出兩個日誌切換時間間隔,單位時間間隔為小時,然後還可以參考alter trace等。在設計階段真的要好好考慮!
聯想到跟redo相關的兩個等待事件:log file parallel write和log file sync
Log file parallel write:
從log buffer寫retries到redo log檔案,當達到閥值還沒有完成會出現此等待事件。
log file sync:
當使用者commit或者rollback時,此時會觸發lgwr把redo retries寫入redo log,而使用者程式將通知lgwr寫出操作,lgwr完成任務以後會通知使用者程式,此時達到閥值時就會出現log file sync,這個等待事件是用於程式等待lgwr完成的通知。如果log file parallel write和log file sync出現頻率相同,很有可能log file sync在等待log file parallel write的完成,此時可以判斷磁碟的I/O存在瓶頸。
1 提高lgwr效能,主要從硬體著手。
2 批次提交
以下計算方法和分析摘自eygle的blog中計算平均redo寫大小
avg.redo write size = (Redo block written/redo writes)*512 bytes
如果此資料偏小,系統的提交過於頻繁,而過渡頻繁的redo writing的latch競爭.
[@more@]來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/25362835/viewspace-1056244/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- log file sync 和 log file parallel writeParallel
- Oracle db file parallel write 和 log file parallel write 等待事件 說明OracleParallel事件
- Oracle之 等待事件log file sync + log file parallel write (awr優化)Oracle事件Parallel優化
- log file sync(日誌檔案同步) 與 Log file parallel write 等待事件Parallel事件
- _use_adaptive_log_file_sync設定 降低log_file_sync等待APT
- redo log file 優化優化
- Oracle Dump Redo Log FileOracle
- log file sync等待事件事件
- 【等待事件】log file sync事件
- log file sync" 等待事件事件
- 【TUNE_ORACLE】等待事件之日誌等待“log file parallel write”Oracle事件Parallel
- "log file sync"等待事件-2事件
- "log file sync"等待事件-1事件
- 等待事件 log file sync 小解事件
- log file sync等待事件總結事件
- log file sync等待事件處理思路事件
- 關於log file sync等待事件的描述事件
- oracle等待事件3構造一個Direct Path write等待事件和構造一個Log File Sync等待事件Oracle事件
- zt_Oracle Dump Redo Log File 說明Oracle
- 【WAIT】 log file sync等待事件說明AI事件
- 【RAC】RAC 效能分析 - 'log file sync' 等待事件事件
- control file parallel write等待事件Parallel事件
- 【TUNE_ORACLE】等待事件之日誌等待“log file sync”Oracle事件
- Oracle RAC+DG 調整redo/standby log fileOracle
- mysql innodb_log_file_size 和innodb_log_buffer_size引數MySql
- Log Write Methods can Cause 'log file sync' Waits (文件 ID 1462942.1)AI
- RAC 資料庫中的'log file sync' 等待事件資料庫事件
- log file sync等待事件的成因及優化方法事件優化
- MySQL中的redo log和undo logMySql
- Redo Log Buffer的大小設定
- db file parallel writeParallel
- redo log file 物理結構學習與測試
- MySQL Undo Log和Redo Log介紹MySql
- 【TUNE_ORACLE】等待事件之IO等待“db file parallel write”Oracle事件Parallel
- MySQL中的redo log和checkpointMySql
- LOG FILE SWITCH等待事件事件
- Oracle 11g 遇到log file sync嚴重等待事件Oracle事件
- Redo Log之一:理解Oracle redo logOracle Redo