Redo Waits Kyle Hailey #.2 Copyright 2006 Kyle Hailey Log File Waits  Redo is written to disk when  User commits  Log Buffer.

Slides:



Advertisements
Similar presentations
Database Tuning. Objectives Describe the roles associated with database tuning. Describe the dependency between tuning in different development phases.
Advertisements

Office of the Accountant General (A&E) Andhra Pradesh Hyderabad
IO Waits Kyle Hailey #.2 Copyright 2006 Kyle Hailey Waits Covered in this Section  db file sequential read  db file scattered.
INTRODUCTION TO ORACLE Lynnwood Brown System Managers LLC Backup and Recovery Copyright System Managers LLC 2008 all rights reserved.
INTRODUCTION TO ORACLE Lynnwood Brown System Managers LLC Oracle High Availability Solutions RAC and Standby Database Copyright System Managers LLC 2008.
Buffer Cache Waits. #.2 Copyright 2006 Kyle Hailey Buffer Cache Waits Waits Disk I/O Buffer Busy Library Cache Enqueue SQL*Net Free Buffer Hot Blocks.
Acknowledgments Byron Bush, Scott S. Hilpert and Lee, JeongKyu
Oracle Architecture. Instances and Databases (1/2)
Page Footer Keed Education Oracle Database Administration Basic Copyright 2009 Keed Education BV Version Concept.
1 - Oracle Server Architecture Overview
Database Backup and Recovery
Backup and Recovery Part 1.
ITEC474 Redo Log Files.
Database Backup & Recovery David Konopnicki. Introduction A major responsibility of the database administrator is to prepare for the possibility of hardware,
CHAPTER 16 User-Managed Backup and Recovery. Introduction to User Managed Backup and Recovery Backup and recover is one of the most critical skills a.
4 Copyright © 2008, Oracle. All rights reserved. Configuring Backup Specifications.
CHAPTER 5 Managing Control Files, Online Redo Logs, and Archiving.
Oracle Architecture. Database instance When a database is started the current state of the database is given by the data files, a set of background (BG)
Oracle9i Database Administrator: Implementation and Administration
7 Maintaining Redo Log Files. 7-2 Objectives Explaining the use of online redo log files Obtaining log and archive information Controlling log switches.
Redo Waits Kyle Hailey #.2 Copyright 2006 Kyle Hailey Redo REDO Lib Cache Buffer Cache Locks Network I/O.
Introduction to Oracle Backup and Recovery
Using RMAN to Perform Recovery
CheckPoint Internals of PostgreSQL
Oracle Documentation Oracle DBA Course (9i, 10g, 11g) Lecture 1: Oracle Architectural Components.
Chapter Oracle Server An Oracle Server consists of an Oracle database (stored data, control and log files.) The Server will support SQL to define.
11 Copyright © Oracle Corporation, All rights reserved. RMAN Backups.
DBMS Transactions and Rollback Recovery Helia / Martti Laiho.
CSE 781 – DATABASE MANAGEMENT SYSTEMS Introduction To Oracle 10g Rajika Tandon.
Part II : Waits Events Kyle Hailey
9 Copyright © 2004, Oracle. All rights reserved. Flashback Database.
7202ICT – Database Administration
1 Oracle Architectural Components. 1-2 Objectives Listing the structures involved in connecting a user to an Oracle server Listing the stages in processing.
Copyright  Oracle Corporation, All rights reserved. 1 Oracle Architectural Components.
Copyright © Oracle Corporation, All rights reserved. 1 Oracle Architectural Components.
An Oracle server:  Is a database management system that provides an open, comprehensive, integrated approach to information management.  Consists.
Week 3 Lecture 1 The Redo Log Files and Diagnostic Files.
Database Administration 3.Using Administration Tools.
1 Chapter 17 Shared Memory Contention. 2 Overview Specifically talking about SGA – Buffer Cache – Redo Log Buffer Contention in these areas of SGA – Can.
Process Architecture Process Architecture - A portion of a program that can run independently of and concurrently with other portions of the program. Some.
14 Copyright © 2005, Oracle. All rights reserved. Backup and Recovery Concepts.
11 Copyright © 2006, Oracle. All rights reserved. Checkpoint and Redo Tuning.
Instance and Media Recovery Structures Supinfo Oracle Lab. 7.
Chapter 1Oracle9i DBA II: Backup/Recovery and Network Administration 1 Chapter 1 Backup and Recovery Overview MSCD642 Backup and Recovery.
18 Copyright © 2004, Oracle. All rights reserved. Backup and Recovery Concepts.
Preface 1Performance Tuning Methodology: A Review Course Structure 1-2 Lesson Objective 1-3 Concepts 1-4 Determining the Worst Bottleneck 1-5 Understanding.
6 Copyright © 2007, Oracle. All rights reserved. Performing User-Managed Backup and Recovery.
8 Copyright © 2007, Oracle. All rights reserved. Using RMAN to Duplicate a Database.
18 Copyright © 2004, Oracle. All rights reserved. Recovery Concepts.
7 Copyright © Oracle Corporation, All rights reserved. Instance and Media Recovery Structures.
Transactional Recovery and Checkpoints. Difference How is this different from schedule recovery? It is the details to implementing schedule recovery –It.
14 Copyright © 2005, Oracle. All rights reserved. Backup and Recovery Concepts.
SQL*Net & Other Waits. #.2 Copyright 2006 Kyle Hailey SQL*Net Waits Session Shadow Log Buffer Buffer Cache Log Buffer Buffer Cache SGA Library Cache Host.
1-1 Copyright © Oracle Corporation, All rights reserved. Redo Logs and Recovery John Hibbard Senior Principal Instructor Minneapolis MN
What is Oracle ? Oracle is a relational database management system. It is a management system which uses the relational data model. In the relational data.
14 Copyright © 2007, Oracle. All rights reserved. Backup and Recovery Concepts.
4 Copyright © 2004, Oracle. All rights reserved. Managing the Oracle Instance.
Oracle Database Architectural Components
Chapter 21 SGA Architecture and Wait Event Summarized & Presented by Yeon JongHeum IDS Lab., Seoul National University.

Transactional Recovery and Checkpoints
Maintaining Online Redo Log Files
Instance and Media Recovery Structures
Kyle Hailey Redo Waits Kyle Hailey
Redo Logs and Recovery John Hibbard Senior Principal Instructor
Oracle9i Database Administrator: Implementation and Administration
Oracle Memory Internals
Oracle Architectural Components
Chapter 5 The Redo Log Files.
Presentation transcript:

Redo Waits Kyle Hailey

#.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 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 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 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 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 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 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 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 Copyright 2006 Kyle Hailey Log file switch completion  #12  No p1,p2,p3  Wait for lgwr to switch log files when generating redo

#.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 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 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 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 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 Copyright 2006 Kyle Hailey log file switch (archiving needed)  #33  No p1,p2,p3  Database “hangs” for transactions

#.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 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 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 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 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 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 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 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 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