Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the principle of Oracle DRM

2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly explains "What is the principle of Oracle DRM". Interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let Xiaobian take you to learn "What is Oracle DRM principle"!

Buffer: For RAC databases, when a block of data is read into buffer cache, we call it buffer , cache fusion will manage this buffer as a resource.

Master: In the RAC database world, each resource has a master instance that allocates space in the shared pool (e.g., gcs resource and ges resource sections) to store information related to that resource.

For example, which instance has the latest version of the buffer, which instance has what level of lock of the buffer, and so on. And, responsible for maintaining and maintaining the status of this resource.

Next, we briefly describe the process of accessing a buffer in a RAC environment. Let's take a 4-node RAC database as an example.

Note that we will list only one typical situation, not all possible situations, and only a brief introduction to the steps.

Step 1: Instance 3 needs to access buffer1 in X(exclusive) mode, making a request to master instance (1).

Step 2: The master instance (1) finds that instance 2 holds buffer1 in X mode, and then notifies instance 2 to release X lock and send buffer1 to instance 3.

Step 3: Instance 2 releases X lock and sends the latest version of buffer1 to instance 3.

Step 4: Instance 3 gets buffer1 and notifies master instance (1) to update the latest status of resource buffer1.

From the above steps, we can easily see that in RAC database, when we access a buffer, there will be at most 3 instances involved.

master instance, holder instance and requester instance. There are two types of data transmission: message: for transmission of lock-related information, data: for transmission of buffer

At the same time, according to the above steps, we naturally think that if master and requester are on the same instance,

Then you can reduce the transmission of messages between instances and access the code path shorter, thereby improving performance

But each buffer is read into the buffer cache, and the choice of master nodes is random.

Based on this consideration, oracle has introduced a new feature DRM (Dynamic Resource Management) since 10g.

DRM's main function is to determine the time period (default 10 minutes)

Each instance determines which instance the buffer corresponding to a database object should be mastered to by the number and manner of accesses to a database object (10gR1 in units of data files).

If an instance accesses a database object a certain number of times (default 50 times) more than other instances within a specified period of time, oracle will send master information of all buffers of this object.

Transfer to the corresponding instance (note: not transfer buffer), the process of transfer is gradual.

When oracle decides to determine the master instance of a buffer to the local instance, it will add affinity lock to this buffer to achieve fast access.

This is also the origin of the object affinity we often mention.

Next, we describe the basic steps of DRM.

1. Oracle stops all operations on buffers that require remastering. Note: DRM is progressive, that is to say, in units of windows, a part of the buffer is remastered at a time

2. Lmon notifies all instances that they are ready for remastering

3. Clear the master information of the corresponding buffer in the old master instance

4. Pass master information to the new master instance

5. Build up-to-date state of resources in new master instance

6. End and release all resources occupied by previous steps

Then, we briefly introduce some parameters related to DRM.

_gc_policy_time: unit: minute, controls the time interval for DRM to count the number of times an instance accesses the buffer, default is 10 minutes

_gc_affinity_ratio: Controls the minimum ratio (threshold) required for remastering, default is 50

That is, if an instance accesses a database object 50 times more than all other instances within 10 minutes (_gc_policy_time)(note: 50 times, not 50 times)

Restering the buffer of the database object

Note: Please do not modify the above parameters unless there is technical support.

Finally, if you are experiencing DRM-related problems, we recommend that you check out the following information.

1. Trace files for the Lmon, lmd, lms and diag processes to identify where the problem occurred in DRM and the status of the lms,lmon,lmd processes.

2. AWR and ASH reports, confirming the status of those waiting for events that last a long time, as well as lmon,lms and lmd.

3. Refer to note 1492990.1 for DMR diagnostic script output.

At this point, I believe that everyone has a deeper understanding of "what is Oracle DRM principle", so let's actually operate it! Here is the website, more related content can enter the relevant channels for inquiry, pay attention to us, continue to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report