[20201204]關於等待事件Log File Sync.txt
[20201204]關於等待事件Log File Sync.txt
--//昨天被別人問及Log File Sync等待事件,實際上我以前的理解存在很大的誤區,我一直認為出現這個主要是寫日誌太慢,磁碟處理
--//IO能力太差造成的,再還有就是頻繁提交。實際上還忽略一種情況,就是CPU太忙,這樣的情況我很少遇到。
--//找到一個連結:
The Oracle "log file sync" wait event is triggered when a user session issues a commit (or a rollback). The user session
will signal or post the LGWR to write the log buffer to the redo log file. When the LGWR has finished writing, it will
post the user session. The wait is entirely dependent on LGWR to write out the necessary redo blocks and send
confirmation of its completion back to the user session. The wait time includes the writing of the log buffer and the
post, and is sometimes called "commit latency".
The "log file sync" wait event may be broken down into the following components:
1. Wakeup LGWR if idle
2. LGWR gathers the redo to be written and issues the I/O
3. Wait time for the log write I/O to complete
4. LGWR I/O post processing
5. LGWR posting the foreground/user session that the write has completed
6. Foreground/user session wakeup
Tune the system based on the "log file sync" component with the most wait time. Steps 2 and 3 are accumulated in the
"redo write time" statistic. (i.e. as found under STATISICS section of Statspack) Step 3 is the "log file parallel
write" wait event. (See Metalink Note 34583.1:"log file parallel write") Steps 5 and 6 may become very significant as
the system load increases. This is because even after the foreground has been posted it may take some time for the OS to
schedule it to run.
根據"日誌檔案同步"元件調整系統,等待時間最多。 步驟2和步驟3是在"重做寫入時間"統計中累積的。 (即。 如Statspack的STATISICS
部分所示)步驟3是"日誌檔案並行寫入"等待事件。 (參見Metalink註釋34583.1:"日誌檔案並行寫入")步驟5和步驟6可能隨著系統負載的
增加而變得非常重要。 這是因為即使在前臺釋出之後,作業系統也可能需要一些時間來安排它的執行。
--//看看我們幾個生產系統的情況:
> @ tpt/ash/ash_wait_chains event2 "event='log file sync'" trunc(sysdate-1) trunc(sysdate)
-- Display ASH Wait Chain Signatures script v0.2 BETA by Tanel Poder ( http://blog.tanelpoder.com )
%This SECONDS AAS WAIT_CHAIN
------ ---------- ------- --------------------------------------------
98% 1043 .0 -> log file sync -> log file parallel write
1% 15 .0 -> log file sync
0% 5 .0 -> log file sync -> ON CPU
--//很明顯這個問題集中在log file parallel write,也就是寫入磁碟太慢。
--//這套系統磁碟設定有問題,設定在寫通模式。導致這樣的情況出現。參考連結
--// http://blog.itpub.net/267265/viewspace-2684072/
> @ tpt/ash/ash_wait_chains event2 "event='log file sync'" trunc(sysdate-1) trunc(sysdate)
-- Display ASH Wait Chain Signatures script v0.2 BETA by Tanel Poder ( http://blog.tanelpoder.com )
%This SECONDS AAS WAIT_CHAIN
------ ---------- ---------- --------------------------------------------
87% 104 0 -> log file sync
7% 8 0 -> log file sync -> log file parallel write
7% 8 0 -> log file sync -> ON CPU
--//這個磁碟情況很少,但是業務高峰時密集提交很多。
--//這套系統平時業務很少,但是業務出現非常集中。
--//再看看生產系統exadata的情況,不再解析:
> @ tpt/ash/ash_wait_chains event2 "event='log file sync'" trunc(sysdate-1) trunc(sysdate)
-- Display ASH Wait Chain Signatures script v0.2 BETA by Tanel Poder ( http://blog.tanelpoder.com )
%This SECONDS AAS WAIT_CHAIN
------ ---------- ---------- --------------------------------------------
75% 354 0 -> log file sync
21% 100 0 -> log file sync -> log file parallel write
3% 16 0 -> log file sync -> ON CPU
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/267265/viewspace-2739306/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- log file sync等待事件事件
- 【等待事件】log file sync事件
- 【WAIT】 log file sync等待事件說明AI事件
- log file sync等待事件處理思路事件
- 【TUNE_ORACLE】等待事件之日誌等待“log file sync”Oracle事件
- 【TUNE_ORACLE】等待事件之日誌等待“log file parallel write”Oracle事件Parallel
- db file scattered read等待事件事件
- db file sequential read等待事件事件
- 【等待事件】db file sequential read事件
- 【等待事件】db file scattered read事件
- 關於log file switch and checkpoint機制
- 0316理解db file parallel read等待事件Parallel事件
- 【TUNE_ORACLE】等待事件之IO等待“db file scattered read”Oracle事件
- 【TUNE_ORACLE】等待事件之IO等待“db file sequential read”Oracle事件
- 【TUNE_ORACLE】等待事件之IO等待“db file parallel write”Oracle事件Parallel
- 關於enq: TX - allocate ITL entry等待事件ENQ事件
- 0322理解db file parallel read等待事件2Parallel事件
- I/O上的等待事件 —— control file sequential read/control file parallel write事件Parallel
- 一個os thread startup、log file sync等待的故障回顧thread
- [20210315]理解db file parallel read等待事件3.txtParallel事件
- [20210315]理解db file parallel read等待事件4.txtParallel事件
- 等待事件db file sequential read、db file scattered read和direct read的區別事件
- Oracle資料庫由dataguard備庫引起的log file sync等待Oracle資料庫
- log file switch
- Solidity事件,等待事件Solid事件
- 【ASK_ORACLE】Linux從6升級到7導致Oracle產生大量Log file sync等待事件處理辦法OracleLinux事件
- 【TUNE_ORACLE】等待事件之等待事件類別Oracle事件
- 基於等待事件的效能診斷(轉)事件
- Selenium等待事件Waits事件AI
- redo log file 最佳化
- 關於Java的File.separatorJava
- cmake使用教程(十)-關於file
- read by other session等待事件Session事件
- ORACLE 常見等待事件Oracle事件
- latch等待事件彙總事件
- Latch free等待事件(轉)事件
- gc cr request等待事件GC事件
- 【等待事件】library cache pin事件