Oracle RAC Distributed lock ____oracle

Source: Internet
Author: User
Tags log log

The RAC nature is also a database, using a distributed lock manager. The DLM role is to coordinate competitive access to resources between instances, while competition within instances is the same as for single instances. In a RAC database, a node wants to modify the data, it needs to DLM send the request, through the DLM control the data access between the authorized node instances, the granularity of instance access between RAC is a block of data. DLM the ability to coordinate resources is called synchronization, and all resource accesses need to be synchronized. RAC divides locks into local and global locks, and local locks are used for concurrency control between local processes, which is the lock mechanism in a single instance. Global locks are used for concurrency control between clusters.
Global lock is divided into cache fusion and Non-cache fusion
Non-cache susion resources are limited mainly row cache storage object definition, library cache storage SQL code, execution plan, these are limited, and these resources to modify the frequency is very small, so Oracle adopted a similar broadcast mechanism, Changes to each node are communicated to other nodes, and any changes to the object by any node will invalidate the objects on all other nodes. Each referenced object is LCK0 with a Shared-mode IV instance lock, and the LMD process is responsible for broadcast communication between the LCK.
Cache Fusions: Mainly Buufer cache data block, modified intensively, not very suitable for each change requires node instance broadcast, the first problem is that the data copy in the state distribution between the cluster map.
In RAC GRD (Global Resource Directory) is an internal block of data in the SGA that records the distribution of each block of data between clusters, each of which is part GRD, and the GRD of all instances is a complete grd. The RAC selects a node in the cluster as master node based on the resource name, whose GRD records the resource's use of the information on all nodes, while the other nodes as shadow node GRD only record the usage information of the resource at that node.

Background process for RAC:
Lmsn:cache Fusion main process, responsible for data block transfer between instances, the corresponding service called GCs, from the lock Manager Server, the number is controlled by gcs_server_process, the range is 0-9
LMD: Provides global enqeue Service (GES). Responsible for the process to coordinate the access order of data blocks between multiple instances to ensure the consistency of data access.
LCK: Responsible for the synchronous access of Non-cache fusion resources, one for each instance.
Lmon: Regular communication between each instance to maintain the health of each node, when a node fails, responsible for restructuring the cluster, GRD recovery operations, it provides cluster Group services (CGS). Its services have the following points:
DIAG: Monitors the status of the process instance and collects diagnostic data to the Alert.log log when the instance is running incorrectly.
GSD: Responsible for client tools such as SRVCTL User Command management interface
File layout Features:
SPFile, placed in shared storage
Redo thread, each instance has its own redo log file log
Archive log, each instance has its own archive log, to do media recovery will use all the archive, you need to share the storage, using Nfs,cia or ASM can
Undo Tablespace, each instance has its own individual rollback table space.
SCN: By GCS Maintenance, all instance nodes are provided with SCN, each node will receive the SCN compared to the local SCN, if the local SCN is small, adjust the local SCN and received consistent, regular communication between nodes, each commit operation needs to notify the SCN to other nodes.
Cache fusion through high-speed private interconnect in the data block transfer between the instances, this is the core work mechanism of RAC, the entire cache funsion has two services: GCS and Ges,gcs responsible for the transfer of data blocks between instances, And the latter is responsible for lock management.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.