Back

How Oracle RAC Cache Fusion Works

Learn the mysteries of how Oracle RAC Cache Fusion works. Cache Fusion is the secret to making Oracle RAC a scalable database platform. You will learn how cache fusion works, the differences between global cache current and consistent read transfers, the differences between two-way and three-way transfers and the associated wait events.

Oracle Ace and author Brian Peasland provides an in-depth demonstration of global cache transfers in action by utilizing Oracle Trace and session statistics (v$sesstat and v$statname).

Prerequisites: Knowledge of Oracle Architecture including the concept of an Oracle instance, the buffer cache, how data is moved into the buffer cache and an understanding of wait events.

Brian is a certified Oracle ACE who has been in the IT field for over 25 years and has worked as a computer operator, operations analyst, systems administrator, application developer and for more than half of his career as a database administrator. He holds a B.S. in Computer Science and a M.S. in Computer Science, specializing in database systems. Brian has been a member of SearchOracle.com’s Ask The Experts since 2001 and now contributes articles to the site. He regularly contributes to the My Oracle Support and Oracle Technet communities. He can be followed on Twitter on @BPeaslandDBA and maintains a blog at http://www.peasland.net.

Buy Brian’s new book “Oracle RAC Performance Tuning” at Amazon.

Download the Workshop scripts

This free training is segmented into several separate lessons:

  1. Lesson 1 – Agenda (6:02)
    Brian’s introduction and tutorial agenda plus a brief history of Oracle clustering (parallel server) and the problems associated with disk pinging.
  2. Lesson 2 – Demonstration: Cache Fusion in Action (5:20)
    Learn how Oracle RAC Cache Fusion really works. Brian Peasland demonstrates, with v$statname, v$sesstat and Oracle trace (dbms_monitor.session_trace_enable) cache fusion in action.
  3. Lesson 3 – Demonstration Understanding Global Cache Statistics and Trace Output (9:13)
    A continuation of the cache fusion demonstration, with a detailed look at session statistics and the raw trace file contents. You will learn about the “gc” wait events (Global Cache) including ‘gc current block 2-way’ and ‘gc cr multi block request’.
  4. Lesson 4 – demonstration: Global Cache Current Transfer vs Consistent Read Transfer (4:38) (click on video below)
    Learn the difference between a current block and a consistent read block.
  5. Lesson 5 – 2-Way vs 3-Way Block Transfers (4:07)
    Brian demonstrates 2-Way vs 3-Way Block Transfers including a description of master, holders and requestors.
  6. http://youtu.be/Krs4qFnbLLc (2:03)
    Oracle ACE and author Brian Peasland provides a summary of the “How Oracle RAC Cache Fusion Works” tutorial.

Date: Oct 19, 2015

NOTE: Some corporate firewalls will not allow videos hosted by YouTube.

Transcript

Lesson 4 – demonstration: Global Cache Current Transfer vs Consistent Read Transfer

How Cache Fusion Really Works Part 4 of 6

 

>> Brian:  The next thing I want to talk about is the difference between a current block and consistent read block. 

 

In our example that we’ve seen so far, a user on instance one just read the data. And on instance two, another user just read the data. There was no data being changed. Because data was not modified, the user on instance two could obtain the most recent or, in other words, the most current version of that block. Hence, the global cache current wait event. 

 

What I’m going to do is bounce the instances. 

 

[pause]

 

Now that the instances are bounced, I’ll start them up. The big reason I do this is just to make sure we’re starting with a clean slate, fresh from scratch so that nothing else influences our analysis. Now I’ll go back into SQL Plus and I’m going to update one row in this table. 

 

[pause]

 

We’ll just verify that result. 

 

[pause]

 

And there it is. But I have yet to commit the changes from this session. So only this session can see that change. If I go over to the other instance and this time I’m going to start a trace in my session –

 

[pause]

 

And let’s look at that value. Here it says the owner is system, not Scott. This is Oracle’s consistent read mechanism in play. Any session is not allowed to see uncommitted changes to the data. This is true on single instance as well as Oracle RAC. Oracle RAC has to follow those same rules. What Oracle does under the covers is it uses the information in the UNDO table space to create an image of that block before the change occurred and Oracle then takes that consistent read image and transfers it via Cache Fusion as a global cache transfer. 

 

Now let’s look at my trace file. 

 

[pause]

 

We’ll look at the wait events here and we can see the three wait events of interest are all global cache transfers because the wait event name starts with GC. The first block is still a current transfer because the index block has not changed. But notice that third one, now we see a global cache CR wait event and this is a global cache consistent read wait event. It’s still on the same file and it’s still on the same block of that file. 

 

Hopefully this explains the difference between a global cache current and a global cache consistent read transfer. Remember that a global cache current transfer is Cache Fusion transferring the current image because the block has no uncommitted changes. When there are uncommitted changes, Cache Fusion will ship a global cache consistent read image instead as our demonstration has shown.

 

Copyright SkillBuilders.com 2017

×
Free Online Registration Required

The tutorial session you want to view requires your registering with us.

It’s fast and easy, and totally FREE.

And best of all, once you are registered, you’ll also have access to all the other 100’s of FREE Video Tutorials we offer!

 

×