IO Waits Kyle Hailey #.2 Copyright 2006 Kyle Hailey Waits Covered in this Section  db file sequential read  db file scattered.

Slides:



Advertisements
Similar presentations
CHAPTER 4 Tablespaces and Datafiles. Introduction After installing the binaries, creating a database, and configuring your environment, the next logical.
Advertisements

Office of the Accountant General (A&E) Andhra Pradesh Hyderabad
Introduction to Oracle
Enqueue Waits : Locks. #.2 Copyright 2006 Kyle Hailey Wait Tree - Locks Waits Disk I/O Library Cache Enqueue Undo TX 6 Row Lock TX 4 ITL Lock HW Lock.
Enqueue Waits : Locks. #.2 Copyright 2006 Kyle Hailey Locks REDO Lib Cache Buffer Cache IO Locks Network.
INTRODUCTION TO ORACLE Lynnwood Brown System Managers LLC Backup and Recovery Copyright System Managers LLC 2008 all rights reserved.
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
Overview of Database Administrator (DBA) Tools
Oracle9i Database Administrator: Implementation and Administration 1 Chapter 2 Overview of Database Administrator (DBA) Tools.
Oracle Architecture. Instances and Databases (1/2)
INTRODUCTION TO ORACLE Lynnwood Brown System Managers LLC Performance And Tuning – Lecture 7 Copyright System Managers LLC 2007 all rights reserved.
Page Footer Keed Education Oracle Database Administration Basic Copyright 2009 Keed Education BV Version Concept.
INTRODUCTION TO ORACLE DATABASE ADMINISTRATION Lynnwood Brown System Managers LLC Introduction – Lecture 1 Copyright System Managers LLC 2007 all rights.
1 - Oracle Server Architecture Overview
Harvard University Oracle Database Administration Session 2 System Level.
Backup and Recovery Part 1.
Redo Waits Kyle Hailey #.2 Copyright 2006 Kyle Hailey Log File Waits  Redo is written to disk when  User commits  Log Buffer.
Redo Waits Kyle Hailey #.2 Copyright 2006 Kyle Hailey Redo REDO Lib Cache Buffer Cache Locks Network I/O.
Chapter 4 Physical Database Layouts Database Processing Chapter 4.
1 Copyright © 2005, Oracle. All rights reserved. Introduction.
Waits Defined Kyle Hailey #.2 Copyright 2006 Kyle Hailey Top 36 Foreground Waits write complete waits library cache.
1 Copyright © 2009, Oracle. All rights reserved. Exploring the Oracle Database Architecture.
Chapter Oracle Server An Oracle Server consists of an Oracle database (stored data, control and log files.) The Server will support SQL to define.
Oracle on Windows Server Introduction to Oracle10g on Microsoft Windows Server.
Basic Oracle Architecture
By Lecturer / Aisha Dawood 1.  You can control the number of dispatcher processes in the instance. Unlike the number of shared servers, the number of.
CSE 781 – DATABASE MANAGEMENT SYSTEMS Introduction To Oracle 10g Rajika Tandon.
Part II : Waits Events Kyle Hailey
Chapter 1 The Oracle Architecture Database Processing Oracle Architecture.
March 19981© Dennis Adams Associates Tuning Oracle: Key Considerations Dennis Adams 25 March 1998.
Extents, segments and blocks in detail. Database structure Database Table spaces Segment Extent Oracle block O/S block Data file logical physical.
Oracle Tuning Considerations. Agenda Why Tune ? Why Tune ? Ways to Improve Performance Ways to Improve Performance Hardware Hardware Software Software.
1 Oracle Architectural Components. 1-2 Objectives Listing the structures involved in connecting a user to an Oracle server Listing the stages in processing.
Oracle Tuning Ashok Kapur Hawkeye Technology, Inc.
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.
Oracle9i Performance Tuning Chapter 12 Tuning Tools.
15 Copyright © 2006, Oracle. All rights reserved. Performance Tuning: Summary.
10/23/2015ISYS366 - Installation1 ISYS366 Installation.
1 06/05/08 Statspack Kyle Hailey
Introduction to Oracle. Oracle History 1979 Oracle Release client/server relational database 1989 Oracle Oracle 8 (object relational) 1999.
1 Chapter 17 Shared Memory Contention. 2 Overview Specifically talking about SGA – Buffer Cache – Redo Log Buffer Contention in these areas of SGA – Can.
Oracle 10g Advanced Performance Tuning Kyle Hailey Delphix - wait events docs – tools S-ASH.
Average Active Sessions (AAS) The Golden Metric ? Kyle Hailey
Process Architecture Process Architecture - A portion of a program that can run independently of and concurrently with other portions of the program. Some.
#.6 Sampling Kyle Hailey
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.
Preface 1Performance Tuning Methodology: A Review Course Structure 1-2 Lesson Objective 1-3 Concepts 1-4 Determining the Worst Bottleneck 1-5 Understanding.
#.1 Average Active Sessions (AAS) The Golden Metric ? Kyle Hailey
Chap 5. Disk IO Distribution Chap 6. Index Architecture Written by Yong-soon Kwon Summerized By Sungchan IDS Lab
Oracle Architecture - Structure. Oracle Architecture - Structure The Oracle Server architecture 1. Structures are well-defined objects that store the.
3 Copyright © 2004, Oracle. All rights reserved. Creating an Oracle Database.
7 Copyright © Oracle Corporation, All rights reserved. Instance and Media Recovery Structures.
OEM 10g Performance and Tuning. #.2 Copyright 2006 Kyle Hailey Performance SQL Diagnostics SQLTuning Performance Session DB HOME.
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.
3 Copyright © 2004, Oracle. All rights reserved. Database Architecture Comparison.
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.
Oracle Database Architectural Components
1 PVSS Oracle scalability Target = changes per second (tested with 160k) changes per client 5 nodes RAC NAS 3040, each with one.
Chapter 21 SGA Architecture and Wait Event Summarized & Presented by Yeon JongHeum IDS Lab., Seoul National University.
Kyle Hailey Redo Waits Kyle Hailey
Introduction To Oracle 10g
Oracle Memory Internals
Index Index.
ISYS366, Oracle Disk Internals
Database administration
Presentation transcript:

IO Waits Kyle Hailey

#.2 Copyright 2006 Kyle Hailey Waits Covered in this Section  db file sequential read  db file scattered read  db file parallel read  direct path read  direct path write  sort segment request  direct path write (lob)  file open  file identify

#.3 Copyright 2006 Kyle Hailey IO Waits Data Files DBWR Buffer Cache User1 SGA Library Cache Log Buffer

#.4 Copyright 2006 Kyle Hailey Table/Index IO  db file sequential read  db file scatted read  db file parallel read

#.5 Copyright 2006 Kyle Hailey db file sequential read : Diag ShadowProcess 1) 1)Search Buffer Cache for the block 2) 2)Fails 3) 3)Reads of disk File Block Buffer Cache

#.6 Copyright 2006 Kyle Hailey db file sequential read : Wait  #1 Top Wait  Single Block Read  Index  Data via and Index  Data via Rowid  Rollback  Also dumping headers, rebuilding controlfile  Sequential means  Sequence from an Index  Sequence from a rowid

#.7 Copyright 2006 Kyle Hailey db file sequential read : Args  P1 = File #  P2 = Block #  P3 = 1  Can be more than 1 for temporary segments select segment_name, segment_type from dba_extents where file_id = P1 and P2 between block_id and block_id + blocks – 1; select segment_name, segment_type from dba_extents where file_id = P1 and P2 between block_id and block_id + blocks – 1;

#.8 Copyright 2006 Kyle Hailey db file scattered read : Diag ShadowProcess 1) 1)Search Buffer Cache for the blocks 2) 2)Fails 3) 3)Reads off disk File Block Multi Block Read Count Buffer Cache

#.9 Copyright 2006 Kyle Hailey db file scattered read : Wait  # 3 Top Wait Event  Multi Block Read  Full Table Scan  Index Fast Full Scans  Scattered Means  Blocks are read and scattered throughout buffer cache

#.10 Copyright 2006 Kyle Hailey db file scattered read : Args  P1 = File #  P2 = Block #  P3 = # of Blocks to Read select segment_name, segment_type from dba_extents where file_id = P1 and P2 between block_id and block_id + blocks – 1; select segment_name, segment_type from dba_extents where file_id = P1 and P2 between block_id and block_id + blocks – 1;

#.11 Copyright 2006 Kyle Hailey db file parallel read : Diag ShadowProcess 1) 1)Search Buffer Cache for the blocks 2) 2)Fails 3) 3)Reads that block off Disk Buffer Cache

#.12 Copyright 2006 Kyle Hailey db file parallel read : Wait  #18 Top Wait  Process issues multiple single block reads in parallel  Documentation says only for recovery  But seems to happen for normal read ops as well  Async Call – wait for all reads to complete

#.13 Copyright 2006 Kyle Hailey db file parallel read: Args  P1 = # of files to read from  P2 = # of total blocks to read  P3 = # of I/O requests  Same value as P2

#.14 Copyright 2006 Kyle Hailey IO Solutions  If  Db scattered Read  Db file sequential Read  Db file parallel Read  Then  Check average read times per file  Should be between 5-15 ms  Data in Statspack under “File IO Stats”  Check Cache buffer Hit ratio  Check db_cache_advice 9i and higher  Data in Statspack under “Buffer Pool Advisory”  Tune High IO SQL

#.15 Copyright 2006 Kyle Hailey IO Solutions : Ave Read Time File IO Stats DB/Inst: LABSF03/labsf03 Snaps: 1-2 ->Mx Rd Bkt: Max bucket time for single block read ->ordered by Tablespace, File Tablespace Filename Av Mx Av Av Rd Rd Av Av Buffer BufWt Reads Reads/s (ms) Bkt Blks/Rd Writes Writes/s Waits (ms) SYSTEM /u01/app/oracle/oradata/labsf03/system01.dbf , , USERS /u01/app/oracle/oradata/labsf03/users01.dbf ### 1.0 9, File IO Stats DB/Inst: LABSF03/labsf03 Snaps: 1-2 ->Mx Rd Bkt: Max bucket time for single block read ->ordered by Tablespace, File Tablespace Filename Av Mx Av Av Rd Rd Av Av Buffer BufWt Reads Reads/s (ms) Bkt Blks/Rd Writes Writes/s Waits (ms) SYSTEM /u01/app/oracle/oradata/labsf03/system01.dbf , , USERS /u01/app/oracle/oradata/labsf03/users01.dbf ### 1.0 9,

#.16 Copyright 2006 Kyle Hailey IO Solutions : Buffer Pool Advisory Buffer Pool Advisory Size for Size Buffers for Read Estimated P Est (M) Factor Estimate Factor Physical Reads D , ,928 D , ,043 D , ,772 D , ,715 D , ,715 D , ,715 D , ,715 D , ,715 D , ,715 D 1, , ,715 Buffer Pool Advisory Size for Size Buffers for Read Estimated P Est (M) Factor Estimate Factor Physical Reads D , ,928 D , ,043 D , ,772 D , ,715 D , ,715 D , ,715 D , ,715 D , ,715 D , ,715 D 1, , ,715

#.17 Copyright 2006 Kyle Hailey IO Solutions  After Checking  File IO response times  Buffer Cache Hit Ratio  Then the only choice is to  Tune the SQL

#.18 Copyright 2006 Kyle Hailey IO Throughput

#.19 Copyright 2006 Kyle Hailey Direct I/O WAITS Direct I/O : This mechanism lets the client bypass the buffer cache for I/O intensive operations. The disk blocks are written into and read from process private memory.  Direct IO Clients :  hash join  sqlldr  loading/reading LOBs  parallel DMLs  sorts  create table as select  create index

#.20 Copyright 2006 Kyle Hailey direct path read  # 7 Top Wait  Could signal sort problems  Sorts read into their PGA from datafiles via direct path read  Other Uses  PQO  Asyncronous read ahead

#.21 Copyright 2006 Kyle Hailey direct path read : Diag ShadowProcess Buffer Cache PGA X

#.22 Copyright 2006 Kyle Hailey direct path write  # 8 Top Wait  Occurs when:  Could signal sorting waits  Sorts write to TEMP segment via direct path write  insert /*+ APPEND */  sql*loader direct=y

#.23 Copyright 2006 Kyle Hailey direct path write : Diag ShadowProcess Buffer Cache PGA TEMP DBWR

#.24 Copyright 2006 Kyle Hailey sort segment request  #26  SMON allocates sort space in Temp Tablespace  If SMON is busy this can cause waits for sort space  SMON may be stuck rolling back

#.25 Copyright 2006 Kyle Hailey direct path write (lob)  #35  Note: Direct path read (lob)  Happens for reads on LOBs that are stored NOCACHE  LOBS stored CACHE are read into the buffer cache

#.26 Copyright 2006 Kyle Hailey file open  #16  Args  P1 fib  P2 iov  P3 0  Wait on an open file  The time it takes to open the file  Times should be order of a block read  To tune, try pre-opening files  Leave sessoins connected  High reconnection rates can exacerbate  Can try holding log files open (see script from Steve Adams)

#.27 Copyright 2006 Kyle Hailey file identify  #29  The time it takes to identify a file so that it can be opened later.  Datafile should be identified just once  Logfiles are identified every checkpoint  Reduce checkpoints  Arguments  p1 fib  p2 filename  p3 opcode (1 test for create, 2 get details)

#.28 Copyright 2006 Kyle Hailey Summary I/O  direct path read : sorts or PQO  direct path write : direct path or temp io  sort segment request : SMON occupied?  direct path write (lob) : stored NOCACHE  file open : log files or session reconnects  file identify : log files or session reconnects

#.29 Copyright 2006 Kyle Hailey Summary I/O  Buffer Cache IO  db file sequential read  db file scattered read  db file parallel read  Tune  I/O’s should be 5-15ms  Check Buffer Cache Advisory  Tune SQL