Download presentation
Presentation is loading. Please wait.
Published byLynette Wilkerson Modified over 9 years ago
1
Redo Waits Kyle Hailey Kyle.hailey@hotmail.com
2
#.2 Copyright 2006 Kyle Hailey Log File Waits Redo is written to disk when User commits Log Buffer 1/3 full (_log_io_size) Log Buffer fills 1M Every 3 seconds DBWR asks LGWR to flush redo Sessions Commiting wait for LGWR
3
#.3 Copyright 2006 Kyle Hailey Log File Waits : Diag REDO Log Files Data Files DBWR LGWR User2 User1 User3 Log Buffer Buffer Cache Log Buffer Buffer Cache SGA Library Cache
4
#.4 Copyright 2006 Kyle Hailey Typical Log Waits Log Buffer Space Log File Sync Log File Switch Completion Log File Switch (checkpoint incomplete) Log File Switch (archiving needed) Switch Log File Command
5
#.5 Copyright 2006 Kyle Hailey log buffer space #11 Top Wait No p1, p2, p3 parameters Waiting for space in the redo log buffer in SGA
6
#.6 Copyright 2006 Kyle Hailey Log Buffer Waits REDO Log Files Data Files Log Buffer DBWR LGWR Buffer Cache User2 User1 User3 InsertUpdatedelete Log Buffer Buffer Cache SGA Library Cache
7
#.7 Copyright 2006 Kyle Hailey log file sync #2 Top Wait Wait for redo flush upon: Commit Rollback Arguments P1 = buffer# in log buffer that needs to be flushed P2, P3 not used
8
#.8 Copyright 2006 Kyle Hailey log file sync Arguments P1 = buffer# in log buffer that needs to be flushed P2 = not used P3 = not used
9
#.9 Copyright 2006 Kyle Hailey Log File Sync REDO Log Files Data Files DBWR LGWR User2 User1 User3 Commit; wait for LGWR Log Buffer Buffer Cache SGA Library Cache
10
#.10 Copyright 2006 Kyle Hailey Log file switch completion #12 No p1,p2,p3 Wait for lgwr to switch log files when generating redo
11
#.11 Copyright 2006 Kyle Hailey Log File Switch Log File Switch steps Get next log file from control file Get Redo Copy and Redo Allocation latch Flush redo Close File Update Controlfile Set new file to Current Set old file to Active If in Archivelog mode add file to archive list Open all members of new logfile group Write the SCN to the headers Enable redo log generation
12
#.12 Copyright 2006 Kyle Hailey log file switch completion REDO Log Files Data Files Log Buffer DBWR LGWR Buffer Cache Block xxxx Block xxxx Block xxxx Block xxxx Block xxxx Block xxxx Block xxxx Block xxxx Wait : log file switch completion User2 User1 User3 User2 User1 User3 Commit; Wait for LGWR Log Buffer Buffer Cache SGA Library Cache
13
#.13 Copyright 2006 Kyle Hailey log file switch (checkpoint incomplete) #22 No p1,p2,p3 args Wait for checkpoint to complete because all log files are full
14
#.14 Copyright 2006 Kyle Hailey log file switch (checkpoint incomplete) : Diag REDO Log Files Data Files Log Buffer LGWR Buffer Cache User2 User1 User3 Commit; Wait for LGWR Checkpoint a Block xxxx Block xxxx Block xxxx Block xxxx Block xxxx Block xxxx Block xxxx Block xxxx Checkpoint b Block xxxx Block xxxx Block xxxx Block xxxx Block xxxx Block xxxx Block xxxx Block xxxx Checkpoint c Block xxxx Block xxxx Block xxxx Block xxxx Block xxxx Block xxxx Block xxxx Block xxxx DBWR Log Buffer Buffer Cache SGA Library Cache
15
#.15 Copyright 2006 Kyle Hailey Log Archiving : Diag REDO Log Files Archive Dest Log Buffer ARCH LGWR Buffer Cache Log Buffer Buffer Cache SGA Library Cache
16
#.16 Copyright 2006 Kyle Hailey log file switch (archiving needed) #33 No p1,p2,p3 Database “hangs” for transactions
17
#.17 Copyright 2006 Kyle Hailey log file switch (archiving needed) : Diag REDO Log Files Archive Dest ARCH LGWR User 2 User 1 User 3 Commit; Wait for LGWR Log Buffer Buffer Cache Log Buffer Buffer Cache Log Buffer Buffer Cache SGA Library Cache
18
#.18 Copyright 2006 Kyle Hailey switch logfile command #31 Same as log file switch completion but the command is executed by the dba Alter system switch logfile;
19
#.19 Copyright 2006 Kyle Hailey Summary Log Waits Log Buffer Space : increase log buffer Log File Sync : reduce commits Log File Switch Completion : increase log size Log File Switch (checkpoint incomplete) : add log files Log File Switch (archiving needed) : make room on archive log dest Switch Log File Command
20
#.20 Copyright 2006 Kyle Hailey Recovery and Checkpoints REDO Log Files Data Files DBWR LGWR Log Buffer Buffer Cache SGA Library Cache Incremental Checkpoint Current Position Needed for Recovery
21
#.21 Copyright 2006 Kyle Hailey DBWR dirty List and LGWR Buffers Checkpoint a Block xxxx Block xxxx Block xxxx Block xxxx LGWR DBWR Checkpoint Blocks can be scattered about LRU list Current Position Incremental Checkpoint
22
#.22 Copyright 2006 Kyle Hailey DBWR dirty List and LGWR MRU - Hot LRU - Cold Buffer Headers Session Shadow Dirty List Block xxxx Block xxxx Block xxxx Block xxxx DBWR Dirty Blocks are from the cold end
23
#.23 Copyright 2006 Kyle Hailey DBWR dirty List and LGWR MRU - Hot LRU - Cold Buffer Headers Dirty List Block xxxx Block xxxx Block xxxx Block xxxx DBWR Checkpoint a Block xxxx Block xxxx Block xxxx Block xxxx Write List Block xxxx Block xxxx Block xxxx Block xxxx Data Files
24
#.24 Copyright 2006 Kyle Hailey Recovery – Incremental Checkpoints LOG_CHECKPOINT_INTERVAL = X Lags no more tha X blocks (usually 512) No more than 90% of smallest log file LOG_CHECKPOINT_TIMEOUT = X Lags no more than X seconds DB_BLOCK_MAX_DIRTY_TARGET Limits dirty blocks in the SGA FAST_START_IO_TARGET (8i) Limits dirty blocks in SGA, depricated FAST_START_MTTR_TARGET (9i) *** Limits recover time to seconds
25
#.25 Copyright 2006 Kyle Hailey Recovery – Incremental Checkpoints 9iR2 Don’t set LOG_CHECKPOINT_INTERVAL = 0 LOG_CHECKPOINT_TIMEOUT = 0 FAST_START_IO_TARGET = 0 FAST_START_MTTR_TARGET Seconds to Recovery, default 300 on 9i Is overridden by FAST_START_IO_TARGET Is overridden by LOG_CHECKPOINT_INTERVAL
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.