Thursday, June 15, 2023

What is Cache Fusion

What is cache fusion?

What is cache fusion?

Cash fusion and coherence diff
resource relocator ,grd,ges and GCS diff
PI and CR (read consistent) diff
DRM and resource reconfiguration diff

Cash fusion and coherence diff

Transfer of data across instances  through private interconnect is called cache fusion.

Oracle RAC is composed of two or more instances. When a block of data is read from datafile by an instance within the cluster and another instance is in need of the same block,it is easy to get the block image from the instance which has the block in its SGA rather than reading from the disk. To enable inter instance communication Oracle RAC uses the interconnect for cache fusion (UDP/RDS) 

The Global Enqueue Service(GES) monitors and Instance enqueue process manages the cache fusion

 

resource relocator ,grd,ges and GCS diff
In RAC, every data block is mastered by an instance. Mastering a block simply means that master instance keeps track of the state of the block until the next reconfiguration event. Each instance masters some of the resources using memory allocated in the SGA.
Grd:Global Resource Directory
RAC uses the the global resource directory and some special background process to sync access to resource shared by the multiple instances.

GRD is maintained by GCS and GES processes of the instance which is the resource master . Global Resource Directory is distributed. A Hash algorithm is use to identify master and holder of lock, and to look up status of the resource being requested

GRD is distributed (not replicated), what happens where one instance crashes? how the portion of the GRD being managed by the crashed instance can be recovered?

the resources (since the hash is now different) are reallocated entirely across the surviving nodes.

anything locked by the failed instance is recovered and rolled back(unlocked) and everyone else knows what they have.

 

LMSn : Perform Global cache fusion

LMS: This is the Lock Manager Server Process or the LMS process, sometimes also called the GCS (Global Cache Services) process. Its primary job is to transport blocks across the nodes for cache-fusion requests. If there is a consistent-read request, the LMS process rolls back the block, makes a Consistent-Read image of the block and then ship this block across the HSI (High Speed Interconnect) to the process requesting from a remote node. LMS must also check constantly with the LMD background process (or our GES process) to get the lock requests placed by the LMD process. 

 

global cache cr request waits are followed by the db file sequential/ scattered read waits. During the sequential scan a few blocks may be in the remote buffer cache and the rest of the blocks may be on the disks

 

PI and CR (read consistent) diff

CR image
When there is consistent read request from any other instance,the holding instance (LMS) has to create a consistent read image by applying undo information to the current block.

Since fabrication is I/O expensive it requires a undo into buffer and apply the undo images etc .

 

Past image blocks

PI blocks are copies of block in the local buffer cache. PI acronym is used in cache fusion in RAC. When the local instance ships a dirty block to a remote instance - it keeps a past Image (PI) of the block in its cache.and we use undo blocks to create past image blocks - in RAC, in single instance Oracle - in all releases .PI blocks are useful for crash recovery.

CR image used in Read-Write contention and PI image used in Write-Write contention
CR image is to be shipped to the requesting instance where as the PI has to be kept by the holding instance after shipping the actual block

 

DRM and resource reconfiguration diff

DRM - dynamic resource mastering

 

DRM freezes the global resources during the reconfiguration event and no new resources can be allocated during the reconfiguration. This freeze has a dramatic effect of inducing huge amount of waits for gc buffer busy [acquire|release] events and other gcs drm freeze release, gcs remaster events. In database version 12c, DRM has been improved fur

Lck - affinity check for dynamic remastering

Lmd - lmd reads remastering queue and initiate grd freeze

Lmon - performs reconfiguration of buffer cache locks working with LMS

 

No comments:

Post a Comment