log file sync等待事件的成因及優化方法
資料庫中的log file sync等待事件指的是,當user session 提交(commit)時,user session會通知LGWR程式將redo buffer中的資訊寫入到redo log file,當LGWR程式完成寫操作後,LGWR程式再post(通知)user session 寫操作已經完成,user session 接收到LGWR的通知後提交操作才完成。因此user session 在沒有收到LGWR post(通知)之前一致處於等待狀態,具體的等待事件為log file sync。根據實踐經驗,引起log file sync等待事件的原因有以下幾種:
事務過度的提交,即應用程式過度commit或者rollback。
儲存I/O資源緊張,導致lgwr程式寫速度緩慢。
CPU資源緊張,lgwr程式獲得不了響應的CPU時間片。
RAC節點之間SCN同步。
RAC節點之間CR塊傳遞。
控制檔案爭用。
log file sync等待事件的優化方案:
(1)優化了redo日誌的I/O效能,儘量使用快速磁碟,不要把redo log file存放在raid 5的磁碟上; RAID 5--->RAID 1+0(2)加大日誌緩衝區(log buffer);
(3)使用批量提交,減少提交的次數;
(4)部分經常提交的事務設定為非同步提交;ALTER SESSION SET COMMIT_WRITE = NOWAIT;
(5)適當使用NOLOGGING/UNRECOVERABLE等選項;
(6)採用專用網路,正確設定網路UDP buffer引數;
(7)安裝最新的資料庫版本避免bug;
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/15498/viewspace-1870829/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle之 等待事件log file sync + log file parallel write (awr優化)Oracle事件Parallel優化
- log file sync等待事件事件
- 【等待事件】log file sync事件
- log file sync" 等待事件事件
- "log file sync"等待事件-2事件
- "log file sync"等待事件-1事件
- 等待事件 log file sync 小解事件
- log file sync等待事件總結事件
- 關於log file sync等待事件的描述事件
- log file sync等待事件處理思路事件
- 【TUNE_ORACLE】等待事件之日誌等待“log file sync”Oracle事件
- 【WAIT】 log file sync等待事件說明AI事件
- 【RAC】RAC 效能分析 - 'log file sync' 等待事件事件
- RAC 資料庫中的'log file sync' 等待事件資料庫事件
- log file sync(日誌檔案同步) 與 Log file parallel write 等待事件Parallel事件
- Oracle 11g 遇到log file sync嚴重等待事件Oracle事件
- _use_adaptive_log_file_sync設定 降低log_file_sync等待APT
- oracle等待事件3構造一個Direct Path write等待事件和構造一個Log File Sync等待事件Oracle事件
- LOG FILE SWITCH等待事件事件
- [20161228]奇怪log file sync等待事件.txt事件
- redo的等待log file sync和log file parallel write和redo size設定Parallel
- log file switch相關等待事件事件
- db file async I/O submit 等待事件優化MIT事件優化
- [20201204]關於等待事件Log File Sync.txt事件
- log file switch (checkpoint incomplete)等待事件事件
- 【等待事件】log file switch (checkpoint incomplete)事件
- log file sync 和 log file parallel writeParallel
- oracle之 db file sequential read等待事件優化思想Oracle事件優化
- 一個os thread startup、log file sync等待的故障回顧thread
- Oracle資料庫由dataguard備庫引起的log file sync等待Oracle資料庫
- 【TUNE_ORACLE】等待事件之日誌等待“log file parallel write”Oracle事件Parallel
- Oracle db file parallel write 和 log file parallel write 等待事件 說明OracleParallel事件
- redo log file 優化優化
- _use_adaptive_log_file_syncAPT
- 最近遇到log file sync等待時間,測試了一下非同步提交非同步
- 【等待事件之二】log 相關的等待事件
- db file scattered read等待事件事件
- db file sequential read等待事件事件