Row Migration can Aggravate Contention on Cache Buffer Chains Latch David Kurtz Go-Faster Consultancy Ltd.

Slides:



Advertisements
Similar presentations
PeopleSoft Ping David Kurtz
Advertisements

Memory.
More on File Management
PL/SQL.
Graphing AWR Data in Excel
PIA Load Balancing, JVMs and Garbage Collection David Kurtz Go-Faster Consultancy Ltd.
An introduction to SQL*Trace, TKPROF and Execution Plans
DB-03: A Tour of the OpenEdge™ RDBMS Storage Architecture Richard Banville Technical Fellow.
1 Chapter 16 Latch and Mutex Contention. 2 Architecture Overview of Latches Protect Oracle’s SGA Prevent two processes from updating same area of SGA.
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.
DBMS 2001Notes 4.2: Hashing1 Principles of Database Management Systems 4.2: Hashing Techniques Pekka Kilpeläinen (after Stanford CS245 slide originals.
Tutorial 8 CSI 2132 Database I. Exercise 1 Both disks and main memory support direct access to any desired location (page). On average, main memory accesses.
C-Store: Updates Jianlin Feng School of Software SUN YAT-SEN UNIVERSITY May. 15, 2009.
1 Chapter 8 Virtual Memory Virtual memory is a storage allocation scheme in which secondary memory can be addressed as though it were part of main memory.
Harvard University Oracle Database Administration Session 5 Data Storage.
Virtual Memory I Chapter 8.
CS4432: Database Systems II
Main challenges in XML/Relational mapping Juha Sallinen Hannes Tolvanen.
Oracle Database Administration Database files Logical database structures.
CHAPTER 11 Large Objects. Need for Large Objects Data type to store objects that contain large amount of text, log, image, video, or audio data. Most.
Module 3: Table Selection
9/11/2015ISYS366 - Week051 ISYS366 – Week 5-6 Database Tuning - User and Rollback Data Spaces, Recovery, Backup.
Chapter Oracle Server An Oracle Server consists of an Oracle database (stored data, control and log files.) The Server will support SQL to define.
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.
1 Robert Wijnbelt Health Check your Database A Performance Tuning Methodology.
Physical Database Design & Performance. Optimizing for Query Performance For DBs with high retrieval traffic as compared to maintenance traffic, optimizing.
7202ICT Database Administration Lecture 7 Managing Database Storage Part 2 Orale Concept Manuel Chapter 3 & 4.
March 19981© Dennis Adams Associates Tuning Oracle: Key Considerations Dennis Adams 25 March 1998.
Unicode Oddity. from a Unicode PeopleSoft Database SELECT emplid, name, LENGTH(name), BLENGTH(name) FROMps_personal_data WHEREemplid = '007’ ; EMPLID.
Extents, segments and blocks in detail. Database structure Database Table spaces Segment Extent Oracle block O/S block Data file logical physical.
Database Systems Slide 1 Database Systems Lecture 5 Overview of Oracle Database Architecture - Concept Manual : Chapters 1,8 Lecturer : Dr Bela Stantic.
Software. Generic Software  e.g. word processing, spreadsheet and database. – This simply implies that any of the dozens of spreadsheet packages, for.
Performance Dash A free tool from Microsoft that provides some quick real time information about the status of your SQL Servers.
Sizing Basics  Why Size?  When to size  Sizing issues:  Bits and Bytes  Blocks (aka pages) of Data  Different Data types  Row Size  Table Sizing.
Copyright © 2005 Ed Lance Fundamentals of Relational Database Design By Ed Lance.
Oracle9i Performance Tuning Chapter 12 Tuning Tools.
© Pearson Education Limited, Chapter 13 Physical Database Design – Step 4 (Choose File Organizations and Indexes) Transparencies.
PROJECT LOG MOLLY ATKINSON. 10/09 Today, I got to grips with the course outline, which included creating the relevant folders for all my future publications,
Views Lesson 7.
Outline Introduction to Oracle Memory Structures SGA, PGA, SCA The Specifics of the System Global Area (SGA) Structures Overview of Program Global Areas.
Grade Book Database Presentation Jeanne Winstead CINS 137.
Course FAQ’s I do not have any knowledge on SQL concepts or Database Testing. Will this course helps me to get through all the concepts? What kind of.
14 Copyright © 2006, Oracle. All rights reserved. Tuning Block Space Usage.
Week 4 Lecture 2 Advanced Table Management. Learning Objectives  Create tables with large object (LOB) columns and tables that are index-organized 
Harvard University Oracle Database Administration Session 6 Object Storage.
Copyright 2007, Information Builders. Slide 1 Machine Sizing and Scalability Mark Nesson, Vashti Ragoonath June 2008.
Analysing Indexes SQLBits 6 th October 2007 © Colin Leversuch-Roberts Kelem Consulting Limited September 2007.
IT Database Administration Section 07. Space Management Managing Space: An Introduction  Organizing database storage is a major responsibility.
Chapter 5 Index and Clustering
Preface 1Performance Tuning Methodology: A Review Course Structure 1-2 Lesson Objective 1-3 Concepts 1-4 Determining the Worst Bottleneck 1-5 Understanding.
CSCI 156: Lab 11 Paging. Our Simple Architecture Logical memory space for a process consists of 16 pages of 4k bytes each. Your program thinks it has.
Lectures 8 & 9 Virtual Memory - Paging & Segmentation System Design.
COMP091 – Operating Systems 1 Memory Management. Memory Management Terms Physical address –Actual address as seen by memory unit Logical address –Address.
Supporting Join Queries Talk by: Andy Cooke Collaborators: Alasdair Gray, Lisha Ma, and Werner Nutt Heriot-Watt University.
Cursor Sharing Bug: Bug : cursor_sharing=force causes ORA-7445 and core dumps related bugs – : production instance crashed with.
Database Systems, 8 th Edition SQL Performance Tuning Evaluated from client perspective –Most current relational DBMSs perform automatic query optimization.
October 15-18, 2013 Charlotte, NC Accelerating Database Performance Using Compression Joseph D’Antoni, Solutions Architect Anexinet.
8 Copyright © 2005, Oracle. All rights reserved. Managing Schema Objects.
An overview of AWR, ASH and ADDM. Learning About AWR Real-World Performance Day with Tom Kyte The Independent Oracle Users Groups presents “A Day of Real-World.
Updating E-journal Holdings with Millennium Silver “Coverage Load” Carolina Innovative Users Group 2005 Meeting University of North Carolina at Charlotte.
Chris Index Feng Shui Chris
Sangam-AIOUG 2016 (11th ,12th Nov) Suvendu
OTN Yatra 2016 (23rd ,24th April) Suvendu
Database Tuning - User and Rollback Data Spaces, Recovery, Backup
Paging and Segmentation
Lecture 10: Buffer Manager and File Organization
Operating System Concepts
CSE451 Memory Management Introduction Autumn 2002
Indexing, Access and Database System Architecture
Operating Systems: Internals and Design Principles, 6/E
Presentation transcript:

Row Migration can Aggravate Contention on Cache Buffer Chains Latch David Kurtz Go-Faster Consultancy Ltd.

Row Migration can Aggravate Contention on Cache Buffer Chains Latch © Who Am I? Oracle Database Specialist –Independent consultant System Performance tuning –PeopleSoft ERP –Oracle RDBMS Book – UKOUG –PeopleSoft Technology SIG Committee

Row Migration can Aggravate Contention on Cache Buffer Chains Latch © Resources If you can’t hear me say so now. Please feel free to ask questions as we go along. The presentation is available from UKOUG Library See also –Tip: Print in ‘black and white’ for white background.

Row Migration can Aggravate Contention on Cache Buffer Chains Latch © Background Reading Blog Entry: – migration-can-aggrivate-contention.htmlhttp://blog.go-faster.co.uk/2008/12/row- migration-can-aggrivate-contention.html –New slides added since presentation to UKOUG DBMS SIG marked with * UKOUG DBMS SIG

Row Migration can Aggravate Contention on Cache Buffer Chains Latch © A War Story Earlier –I showed you how to build a spreadsheet to graph AWR stats Now –I want to show you a example of how it was used in the real world.

Row Migration can Aggravate Contention on Cache Buffer Chains Latch © System Overview Packaged Training Management Application. –From time to time, users would report that the system would ‘grind to a halt’ No access to OEM. But we did have AWR running on a 15 minute snapshot.

Row Migration can Aggravate Contention on Cache Buffer Chains Latch ©

Row Migration can Aggravate Contention on Cache Buffer Chains Latch © System Overview System stable for weeks at a time. User performance complaints corresponded with spikes on Cache Buffer Chains Latch Couldn’t really get a picture of what the users were doing that was different.

Row Migration can Aggravate Contention on Cache Buffer Chains Latch © Logons

Row Migration can Aggravate Contention on Cache Buffer Chains Latch ©

Row Migration can Aggravate Contention on Cache Buffer Chains Latch © Correlation? By eye, I could see that over several days the spikes in the CBCL wait event matched the number of logons. So I graphed one against the other.

Row Migration can Aggravate Contention on Cache Buffer Chains Latch ©

Row Migration can Aggravate Contention on Cache Buffer Chains Latch © Cache Buffer Chains Latch Whenever more than 90 users. Addition 1 sec/sec of wait per additional user. –The system isn’t scaling any more.

Row Migration can Aggravate Contention on Cache Buffer Chains Latch © *Cache Buffer Chains Latch Usually caused by hot blocks. –Migrated rows cause additional block accesses AWR report: table fetch continued row Have to be a lot of this to cause this much trouble –I believe (but I cannot now prove) that when rows migrated out of a block, others were inserted into space left behind. –So data blocks had lots of pointers to migrated rows.

Row Migration can Aggravate Contention on Cache Buffer Chains Latch © Root Cause Row Migration –XML structure in a CLOB –Starts small, gets larger –<3964 bytes stored in-line in data block Need to –Set appropriate value for PCTFREE. –Rebuild tables and indexes.

Row Migration can Aggravate Contention on Cache Buffer Chains Latch © USER_TABLES.CHAIN_CNT Not populated by dbms_stats. –Also USER_TABLES.AVG_FREE_SPACE Must use ANALYZE. –ANALYZE TABLE LIST CHAINED ROWS INTO – and-fixing-row-migration.htmlhttp://blog.go-faster.co.uk/2009/01/detecting- and-fixing-row-migration.html

Row Migration can Aggravate Contention on Cache Buffer Chains Latch © Rebuilding Tables Where tables have history that will not be updated further –Packed the history into the minimum number of blocks ALTER TABLE MOVE … PCTFREE –But new rows in new blocks need space to grow ALTER TABLE … PCTFREE

Row Migration can Aggravate Contention on Cache Buffer Chains Latch ©

Row Migration can Aggravate Contention on Cache Buffer Chains Latch © Result After rebuilding tables, CBCL contention all but disappeared. –And it hasn’t come back. db_file_sequential_read also fell, probably because fewer blocks forced out to load migrated rows. –Possibly because we rebuilt the indexes.

Row Migration can Aggravate Contention on Cache Buffer Chains Latch © Caveat I am NOT asserting that –Row caching always causes latch contention –Latch contention always caused by row caching. However, in our specific case it did appear that fixing one resolved the other. Your mileage may vary.

Row Migration can Aggravate Contention on Cache Buffer Chains Latch © Conclusion It is important to –Understand what your application is doing to the database. –Set physical attributes of tables appropriately.

Row Migration can Aggravate Contention on Cache Buffer Chains Latch © *Explicit Lob Segments We could have defined explicit LOB segments to hold all lob column data –We didn’t try that. –Application usually queried all columns –So would always have accessed addition data blocks. –Our CLOBs mostly small enough to fit in-line.

Questions?