Oracle Cache Fusion Cache Fusion Concepts, Data Block Shipping, and Recovery with Cache Fusion.

Slides:



Advertisements
Similar presentations
Wait Events in RAC Session 362
Advertisements

The Architecture of Oracle
IDA / ADIT Lecture 10: Database recovery Jose M. Peña
INTRODUCTION TO ORACLE Lynnwood Brown System Managers LLC Oracle High Availability Solutions RAC and Standby Database Copyright System Managers LLC 2008.
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)
Serverless Network File Systems. Network File Systems Allow sharing among independent file systems in a transparent manner Mounting a remote directory.
Recovery CPSC 356 Database Ellen Walker Hiram College (Includes figures from Database Systems by Connolly & Begg, © Addison Wesley 2002)
CSCI 3140 Module 8 – Database Recovery Theodore Chiasson Dalhousie University.
Jan. 2014Dr. Yangjun Chen ACS Database recovery techniques (Ch. 21, 3 rd ed. – Ch. 19, 4 th and 5 th ed. – Ch. 23, 6 th ed.)
CMPT Dr. Alexandra Fedorova Lecture X: Transactions.
1 - Oracle Server Architecture Overview
Chapter 19 Database Recovery Techniques. Slide Chapter 19 Outline Databases Recovery 1. Purpose of Database Recovery 2. Types of Failure 3. Transaction.
Harvard University Oracle Database Administration Session 2 System Level.
Two Techniques For Improving Distributed Database Performance ICS 214B Presentation Ambarish Dey Vasanth Venkatachalam March 18, 2004.
Chapter 12 File Management Systems
©Silberschatz, Korth and Sudarshan17.1Database System Concepts Chapter 17: Recovery System Failure Classification Storage Structure Recovery and Atomicity.
Backup and Recovery Part 1.
Introduction History The principles of the relational model were first outlined by Dr. E.F Codd in a June 1970 paper is called “A Relational Model of Data.
Module 14: Scalability and High Availability. Overview Key high availability features available in Oracle and SQL Server Key scalability features available.
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)
1 Copyright © 2005, Oracle. All rights reserved. Introduction.
Transactions and Locks Lesson 22. Skills Matrix Transaction A transaction is a series of steps that perform a logical unit of work. Transactions must.
High Availability and Scalability Technologies - An Oracle9i RAC Solution Presented by: Arquimedes Smith.
1 Chapter 12 File Management Systems. 2 Systems Architecture Chapter 12.
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.
Oracle10g RAC Service Architecture Overview of Real Application Cluster Ready Services, Nodeapps, and User Defined Services.
Basic Oracle Architecture
Backup & Recovery Backup and Recovery Strategies on Windows Server 2003.
16 Copyright © 2007, Oracle. All rights reserved. Performing Database Recovery.
1 Moshe Shadmon ScaleDB Scaling MySQL in the Cloud.
1 RAC Internals Julian Dyke Independent Consultant Web Version juliandyke.com © 2007 Julian Dyke.
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.
Chapterb19 Transaction Management Transaction: An action, or series of actions, carried out by a single user or application program, which reads or updates.
Copyright © Oracle Corporation, All rights reserved. 1 Oracle Architectural Components.
Data Dependent Routing may not be necessary when using Oracle RAC Ken Gottry Apr-2003 Through Technology Improvements in: Oracle 9i - RAC Oracle 9i - CacheFusion.
An Oracle server:  Is a database management system that provides an open, comprehensive, integrated approach to information management.  Consists.
Switch off your Mobiles Phones or Change Profile to Silent Mode.
Chapter 15 Recovery. Topics in this Chapter Transactions Transaction Recovery System Recovery Media Recovery Two-Phase Commit SQL Facilities.
Recovery System By Dr.S.Sridhar, Ph.D.(JNUD), RACI(Paris, NICE), RMR(USA), RZFM(Germany) DIRECTOR ARUNAI ENGINEERING COLLEGE TIRUVANNAMALAI.
© Dennis Shasha, Philippe Bonnet 2001 Log Tuning.
Achieving Scalability, Performance and Availability on Linux with Oracle 9iR2-RAC Grant McAlister Senior Database Engineer Amazon.com Paper
Transactions and Locks A Quick Reference and Summary BIT 275.
Fast Crash Recovery in RAMCloud. Motivation The role of DRAM has been increasing – Facebook used 150TB of DRAM For 200TB of disk storage However, there.
Process Architecture Process Architecture - A portion of a program that can run independently of and concurrently with other portions of the program. Some.
Instance and Media Recovery Structures Supinfo Oracle Lab. 7.
Academic Year 2014 Spring. MODULE CC3005NI: Advanced Database Systems “DATABASE RECOVERY” (PART – 2) Academic Year 2014 Spring.
Chapter 1Oracle9i DBA II: Backup/Recovery and Network Administration 1 Chapter 1 Backup and Recovery Overview MSCD642 Backup and Recovery.
Cache Fusion Making Shared Storage Perform for Vanilla Systems RAC Architecture.
Database System Concepts ©Silberschatz, Korth and Sudarshan See for conditions on re-usewww.db-book.com Chapter 17: Recovery System.
Recovery technique. Recovery concept Recovery from transactions failure mean data restored to the most recent consistent state just before the time of.
Oracle Architecture - Structure. Oracle Architecture - Structure The Oracle Server architecture 1. Structures are well-defined objects that store the.
7 Copyright © Oracle Corporation, All rights reserved. Instance and Media Recovery Structures.
GPFS: A Shared-Disk File System for Large Computing Clusters Frank Schmuck & Roger Haskin IBM Almaden Research Center.
20 Copyright © 2006, Oracle. All rights reserved. Best Practices and Operational Considerations.
9 Copyright © 2004, Oracle. All rights reserved. Incomplete Recovery.
Oracle Database Architectural Components

Database recovery techniques
Database Recovery Techniques
Database Recovery Techniques
Oracle Cache Fusion – In Operation
Oracle 11g Real Application Clusters Advanced Administration
Overview of Real Application Clustering Features and Functionality
Database Recovery 1 Purpose of Database Recovery
Presentation transcript:

Oracle Cache Fusion Cache Fusion Concepts, Data Block Shipping, and Recovery with Cache Fusion

Objectives At the end of this module the student will understand the following tasks and concepts. Cache fusion concepts Block transfers using cache fusion Cache Fusion and Recovery

Overview Synchronization Past Images Cache Fusion Scenarios Recovery Methodology and steps Recovery Process Scenarios

Synchronization of Concurrent Tasks RAC synchronization through Cache Fusion: Maintains cluster-wide concurrency of resources Maintains cluster-wide concurrency of resources Ensures integrity of shared data Ensures integrity of shared data Data blocks and enqueues are synchronized when nodes within a cluster: Acquire block or enqueue ownership Acquire block or enqueue ownership Release block or enqueue ownership Release block or enqueue ownership

Minimize Synchronization Key is to optimally divide tasks among nodes, so that very little synchronization is necessary Minimize inter-node communication, because block access in local cache is cheapest: Block access in local cache ~ 0.01 msec Block access in local cache ~ 0.01 msec Block access in remote cache ~ 2.5 msec Block access in remote cache ~ 2.5 msec Block access on disk ~ 14 msec+ Block access on disk ~ 14 msec+

Past Images Past Images introduced in Oracle 9i RAC to maintain data integrity Dirty data block not written to disk immediately Another instance may request the same block for read or write Image of the block is created at owning instance, and is shipped to requesting block Backup image kept at owning block is a Past Image, and is kept in memory for local consistency

“Juggling” Data with Multiple Past Images Multiple Past Image versions of a data block may be kept by different instances Upon a checkpoint, only the current image is written to disk; Past Images are discarded In the event of a failure, current version of block can be reconstructed from PIs Since PIs are kept in memory, they aid in avoiding frequent disk writes This avoids “disk pinging” experienced with 8i OPS due to frequent writes to disk Data is “juggled” in memory, without touching down on the disk

Cache Fusion Scenario 1: Read/Read Cache Fusion – GCS Processing Global Cache Service (GCS) Block SGA Buffer Cache SGA Buffer Cache (3) Ship (1) Request (4) Inform GCS 1: (Shared, Local) 2: (Shared, Local) (2) Forward Locks: (None)  (Shared, Local) Locks: (Shared, Local) Instance 1Instance 2 Based on “ Oracle 9i RAC Oracle Real Application Clusters Configuration and Interals” Mike Ault, Madhu Tumma

Cache Fusion Scenario 2: Write/Write Cache Fusion – GCS Processing Global Cache Service (GCS) Block SGA Buffer Cache SGA Buffer Cache (3) Ship (1) Request (4) Inform GCS 1: (Exclusive, Global) 2: (Null, Global, Past Image) (2) Forward Locks: (None)  (Exclusive, Global) Locks: (Exclusive, Local)  (Null, Global, Past Image) Instance 1Instance 2 Based on “ Oracle 9i RAC Oracle Real Application Clusters Configuration and Interals” Mike Ault, Madhu Tumma

Cache Fusion Scenario 3: Write Blocks to Disk – GCS Processing Global Cache Service (GCS) Block SGA Buffer Cache SGA Buffer Cache (2) Forward (4) Notify GCS of write and inform GCS 1: (Exclusive Local) 2: (None) (5) Flush PI Locks: (Exclusive, Global)  (Exclusive, Local) Locks: (Null, Global, Past Image)  (None) Instance 1Instance 2 (1) Write Request (3) Write Based on “ Oracle 9i RAC Oracle Real Application Clusters Configuration and Interals” Mike Ault, Madhu Tumma

Online Instance Recovery Steps Instance Failure detected by Cluster Manager and GCS Reconfiguration of GES resources (enqueues); global resource directory is frozen Reconfiguration of GCS resources; involves redistribution among surviving instances One of the surviving instances becomes the “recovering instance”

Online Instance Recovery Steps (cont.) SMON process of recovering instance starts first pass of redo log read of the failed instance’s redo log thread SMON finds BWR (block written records) in the redo and removes them as their PI is already written to disk SMON prepares recovery set of the blocks modified by the failed instance but not written to disk Entries in the recovery list are sorted by first dirty SCN SMON informs each block’s master node to take ownership of the block for recovery

Online Instance Recovery Steps (cont.) Second pass of log read begins. Redo is applied to the data files. Global Resource Directory is unfrozen

RAC Recovery – Solving the Mystery Recovering from a failed RAC instance is like solving a Detective mystery Part of the evidence is missing – by definition, the failed instance is inaccessible at recovery time Part of the evidence is missing – by definition, the failed instance is inaccessible at recovery time There are clues – in this case the lock state and mode of the blocks on the surviving nodes. There are clues – in this case the lock state and mode of the blocks on the surviving nodes. Tip 1: Whichever node has an exclusive lock on a given block has the most recent version of that block Tip 2: If the mode of surviving blocks is local, any change made was on one node ony. If the mode of surviving blocks is global, changes have been made on multiple nodes. Tip 4: If the block mode is global and a node has a past image, there is a newer version of the block on another node.

Lock Remastering – (Scenario-1) Exclusive, LocalNone Exclusive, LocalNone Remove from recovery list Recovering Instance A Open Instance B Failed Instance C Lock Held Lock Aquired X Current copy of buffer Based on “ Oracle 9i RAC Oracle Real Application Clusters Configuration and Interals” Mike Ault, Madhu Tumma

Lock Remastering – (Scenario-2) Exclusive, Global Null, Global, Past Image Exclusive, Global Null, Global, Past Image Remove from recovery list Recovering Instance A Open Instance B Failed Instance C Lock Held Lock Acquired X Write to disk Based on “ Oracle 9i RAC Oracle Real Application Clusters Configuration and Interals” Mike Ault, Madhu Tumma

Lock Remastering – (Scenario-3) NoneExclusive, Local NoneExclusive, Local Remove from recovery list Recovering Instance A Open Instance B Failed Instance C Lock Held Lock Acquired X No need to write to disk Based on “ Oracle 9i RAC Oracle Real Application Clusters Configuration and Interals” Mike Ault, Madhu Tumma

Lock Remastering – (Scenario-4) Null, Global, Past Image Exclusive, Global Null, Global, Past Image Exclusive, Global Remove from recovery list Recovering Instance A Open Instance B Failed Instance C Lock Held Lock Acquired X Write to disk Based on “ Oracle 9i RAC Oracle Real Application Clusters Configuration and Interals” Mike Ault, Madhu Tumma

Lock Remastering – (Scenario-5) NoneExclusive, Global Null, Global, Past Image None Remove from recovery list Recovering Instance A Open Instance B Failed Instance C Lock Held Lock Acquired X write to disk Based on “ Oracle 9i RAC Oracle Real Application Clusters Configuration and Interals” Mike Ault, Madhu Tumma

Lock Remastering – (Scenario-6) None (Exclusive, Local Implied) Exclusive, LocalNone Keep in recovery list Recovering Instance A Open Instance B Failed Instance C Lock Held Lock Acquired X Based on “ Oracle 9i RAC Oracle Real Application Clusters Configuration and Interals” Mike Ault, Madhu Tumma

Lock Remastering – (Scenario-7) None Exclusive, Global Null, Global, Past Image Keep in recovery list Recovering Instance A Open Instance B Failed Instance C Lock Held Lock Aquired X Send Cr block to A (Exclusive, Global Implied) Null, Global, Past Image Based on “ Oracle 9i RAC Oracle Real Application Clusters Configuration and Interals” Mike Ault, Madhu Tumma

Lock Remastering – (Scenario-8) Null, Global, Past Image Null, Global Exclusive, Global, Past Image Null, Global Keep in recovery list Recovering Instance A Open Instance B Failed Instance C Lock Held Lock Aquired X Send Cr block to A Based on “ Oracle 9i RAC Oracle Real Application Clusters Configuration and Interals” Mike Ault, Madhu Tumma (Exclusive, Global Implied)

Review Name two times that data blocks and enqueues are synchronized. True or false: since communication across the private interconect is fast, you want to maximize the amount of inter-node communication. True or false: multiple instances may hold Past Images of the same block at the same time. All cache fusion requests must pass through the ___. True or false: an instance with an exclusive lock with a global resource role contains the most current version of a block.

Summary Cache Fusion synchronizes resources cluster-wide such as: Data blocks Data blocks Enqueues Enqueues Past Images are used to maintain data block integrity No immediate disk write required No immediate disk write required Avoids “disk pinging” Avoids “disk pinging” The GCS plays a key role in performing the necessary block transfers Including lock mode conversions Including lock mode conversions Upon recovery, GCS remasters cache resources of a failed node or nodes on one or more recovery nodes