11gR2RACDynamicremastering
Jun 07, 2016 pm 04:06 PMIn this post, I will demonstrate dynamic remastering of the resources in RAC .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 reco
In this post, I will demonstrate dynamic remastering of the resources in RAC . 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 .When one instance departs the cluster, the GRD portion of that instance needs to be redistributed to the surviving nodes. Similarly, when a new instance enters the cluster, the GRD portions of the existing instances must be redistributed to create the GRD portion of the new instance. This is called dynamic resource reconfiguration. In addition to dynamic resource reconfiguration, This is called dynamic remastering. The basic idea is to master a buffer cache resource on the instance where it is mostly accessed. In order to determine whether dynamic remastering is necessary, the GCS essentially keeps track of the number of GCS requests on a per-instance and per-object basis. This means that if an instance, compared to another, is heavily accessing blocks from the same object, the GCS can take the decision to dynamically migrate all of that object’s resources to the instance that is accessing the object most. LMON, LMD and LMS processes are responsible for Dynamic remastering. – Remastering can be triggered as result of – Manual remastering – Resource affinity – Instance crash – CURRENT SCENARIO - - 3 node setup - name of the database – racdb — SETUP – – Get data_object_id for scott.empSYS> col owner for a10 col data_object_id for 9999999 col object_name for a15 select owner, data_object_id, object_name from dba_objects where owner = 'SCOTT' and object_name = 'EMP';
로그인 후 복사
SQL>select empno, dbms_rowid.rowid_relative_fno(rowid), dbms_rowid.rowid_block_number(rowid) from scott.emp where empno in (7788, 7369);
로그인 후 복사
[oracle@host01 ~]$ srvctl stop database -d racdb srvctl start database -d racdb srvctl status database -d racdb
로그인 후 복사
SCOTT@NODE2> select * from emp;
로그인 후 복사
– Find the GCS resource name to be used in the query x$kjbl.kjblname = resource name in hexadecimal format([id1],[id2],[type] x$kjbl.kjblname2 = resource name in decimal format Hexname will be used to query resource in V$gc_element and v$dlm_rss views get_resource_name
SYS@NODE2>col hexname for a25 col resource_name for a15 select b.kjblname hexname, b.kjblname2 resource_name, b.kjblgrant, b.kjblrole, b.kjblrequest from x$le a, x$kjbl b where a.le_kjbl=b.kjbllockp and a.le_addr = (select le_addr from x$bh where dbablk = 151 and obj = 73181 and class = 1 and state <> 3);
로그인 후 복사
SYS>select o.object_name, m.CURRENT_MASTER, m.PREVIOUS_MASTER, m.REMASTER_CNT from dba_objects o, v$gcspfmaster_info m where o.data_object_id=73181 and m.data_object_id = 73181 ;
로그인 후 복사
SYS@NODE2> select kj.kjblname, kj.kjblname2, kj.kjblowner, kj.kjblmaster from (select kjblname, kjblname2, kjblowner, kjblmaster, kjbllockp from x$kjbl where kjblname = '[0x97][0x4],[BL]' ) kj, x$le le where le.le_kjbl = kj.kjbllockp order by le.le_addr;
로그인 후 복사
SYS@NODE2>oradebug lkdebug -m pkey 74625
로그인 후 복사
SYS>select o.object_name, m.CURRENT_MASTER, m.PREVIOUS_MASTER, m.REMASTER_CNT from dba_objects o, v$gcspfmaster_info m where o.data_object_id=74625 and m.data_object_id = 74625 ;
로그인 후 복사
SYS> select kj.kjblname, kj.kjblname2, kj.kjblowner, kj.kjblmaster from (select kjblname, kjblname2, kjblowner, kjblmaster, kjbllockp from x$kjbl where kjblname = '[0x97][0x4],[BL]' ) kj, x$le le where le.le_kjbl = kj.kjbllockp order by le.le_addr;
로그인 후 복사
GCS masters a buffer cache resource on the instance where it is mostly accessed. In order to determine whether dynamic remastering is necessary, the GCS essentially keeps track of the number of GCS requests on a per-instance and per-object basis. This means that if an instance, compared to another, is heavily accessing blocks from the same object, the GCS can take the decision to dynamically migrate all of that object’s resources to the instance that is accessing the object most. X$object_policy_statistics maintains the statistics about objects and OPENs on those objects.LCK0 process maintains these object affinity statistics. Following parameters affect dynamic remastering due to resource affinity : _gc_policy_limit : If an instance opens 50 more opens on an object then the other instance (controlled by _gc_policy_limit parameter), then that object is a candidate for remastering. That object is queued and LMD0 reads the queue and initiates GRD freeze. LMON performs reconfiguration of buffer cache locks working with LMS processes. All these are visible in LMD0/LMON trace files. _gc_policy_time : It controls how often the queue is checked to see if the remastering must be triggered or not with a default value of 10 minutes. _gc_policy_minimum: This parameter is defined as “minimum amount of dynamic affinity activity per minute” to be a candidate for remastering. Defaults to 2500 and I think, it is lower in a busy environment. To disable DRM completely, set _gc_policy_limit and _gc_policy_minimum to much higher value, say 10Million. Setting the parameter _gc_policy_time to 0 will completely disable DRM, but that also means that you can not manually remaster objects. Further, $object_policy_statistics is not maintained if DRM is disabled. — SETUP –-
SYS>drop table scott.test purge; create table scott.test as select * from sh.sales; insert into scott.test select * from scott.test; commit; insert into scott.test select * from scott.test; commit; insert into scott.test select * from scott.test; commit; insert into scott.test select * from scott.test; commit;
로그인 후 복사
SYS> col data_object_id for 9999999 col object_name for a15 select owner, data_object_id, object_name, object_id from dba_objects where owner = 'SCOTT' and object_name = 'TEST';
로그인 후 복사
SYS> SET linesize 235 col Parameter FOR a20 col Instance FOR a10 col Description FOR a40 word_wrapped SELECT a.ksppinm "Parameter", c.ksppstvl "Instance", a.ksppdesc "Description" FROM x$ksppi a, x$ksppcv b, x$ksppsv c, v$parameter p WHERE a.indx = b.indx AND a.indx = c.indx AND p.name(+) = a.ksppinm AND UPPER(a.ksppinm) LIKE UPPER('%¶meter%') ORDER BY a.ksppinm; Enter value for parameter: gc_policy old 11: AND UPPER(a.ksppinm) LIKE UPPER('%¶meter%') new 11: AND UPPER(a.ksppinm) LIKE UPPER('%gc_policy%')
로그인 후 복사
SYS>alter system set "_gc_policy_minimum" = 10 scope=spfile; alter system set "_gc_policy_time" = 1 scope=spfile;
로그인 후 복사
[oracle@host01 ~]$ srvctl stop database -d racdb srvctl start database -d racdb srvctl status database -d racdb
로그인 후 복사
SYS> SET linesize 235 col Parameter FOR a20 col Instance FOR a10 col Description FOR a40 word_wrapped SELECT a.ksppinm "Parameter", c.ksppstvl "Instance", a.ksppdesc "Description" FROM x$ksppi a, x$ksppcv b, x$ksppsv c, v$parameter p WHERE a.indx = b.indx AND a.indx = c.indx AND p.name(+) = a.ksppinm AND UPPER(a.ksppinm) LIKE UPPER('%¶meter%') ORDER BY a.ksppinm; old 11: AND UPPER(a.ksppinm) LIKE UPPER('%¶meter%') new 11: AND UPPER(a.ksppinm) LIKE UPPER('%gc_policy%') Enter value for parameter: gc_policy
로그인 후 복사
SYS@NODE1>oradebug lkdebug -m pkey 74626 SCOTT@NODE1>select * from scott.test;
로그인 후 복사
SYS@NODE1>select o.object_name, m.CURRENT_MASTER, m.PREVIOUS_MASTER, m.REMASTER_CNT from dba_objects o, v$gcspfmaster_info m where o.data_object_id=74626 and m.data_object_id = 74626 ;
로그인 후 복사
will be remastered to node3
SCOTT@NODE3>insert into scott.test select * from test;
로그인 후 복사
SYS@NODE1>select inst_id, sopens, xopens from x$object_policy_statistics where object=74626;
로그인 후 복사
SYS@NODE1>/
로그인 후 복사
로그인 후 복사
로그인 후 복사
SYS@NODE1>/
로그인 후 복사
로그인 후 복사
로그인 후 복사
SYS@NODE1>/
로그인 후 복사
로그인 후 복사
로그인 후 복사
– Note that after some time . current master changes from node1CURRENT_MASTER =0) to node3 (CURRENT_MASTER =2) . Previous master changes from node3 ( PREVIOUS_MASTER=2) to node1( PREVIOUS_MASTER=0) – Remaster count increases from 3 to 4. .
SYS@NODE2>select o.object_name, m.CURRENT_MASTER, m.PREVIOUS_MASTER, m.REMASTER_CNT from dba_objects o, v$gcspfmaster_info m where o.data_object_id=74626 and m.data_object_id = 74626 ;
로그인 후 복사
16:09:16 SYS@NODE2>/
로그인 후 복사
16:12:24 SYS@NODE2>/
로그인 후 복사
root@node3#init 6
로그인 후 복사
SYS@NODE2>select o.object_name, m.CURRENT_MASTER, m.PREVIOUS_MASTER, m.REMASTER_CNT from dba_objects o, v$gcspfmaster_info m where o.data_object_id=74626 and m.data_object_id = 74626 ;
로그인 후 복사
SYS@NODE1>drop table scott.test purge; SYa@NODE1S> alter system reset "_gc_policy_minimum" = 10 scope=spfile; alter system reset "_gc_policy_time" = 1 scope=spfile; [oracle@host01 ~]$ srvctl stop database -d racdb srvctl start database -d racdb srvctl status database -d racdb
로그인 후 복사
본 웹사이트의 성명
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.

인기 기사
R.E.P.O. 에너지 결정과 그들이하는 일 (노란색 크리스탈)
2 몇 주 전
By 尊渡假赌尊渡假赌尊渡假赌
Repo : 팀원을 부활시키는 방법
4 몇 주 전
By 尊渡假赌尊渡假赌尊渡假赌
헬로 키티 아일랜드 어드벤처 : 거대한 씨앗을 얻는 방법
3 몇 주 전
By 尊渡假赌尊渡假赌尊渡假赌
스플릿 소설을이기는 데 얼마나 걸립니까?
3 몇 주 전
By DDD
R.E.P.O. 파일 저장 위치 : 어디에 있고 그것을 보호하는 방법은 무엇입니까?
3 몇 주 전
By DDD

인기 기사
R.E.P.O. 에너지 결정과 그들이하는 일 (노란색 크리스탈)
2 몇 주 전
By 尊渡假赌尊渡假赌尊渡假赌
Repo : 팀원을 부활시키는 방법
4 몇 주 전
By 尊渡假赌尊渡假赌尊渡假赌
헬로 키티 아일랜드 어드벤처 : 거대한 씨앗을 얻는 방법
3 몇 주 전
By 尊渡假赌尊渡假赌尊渡假赌
스플릿 소설을이기는 데 얼마나 걸립니까?
3 몇 주 전
By DDD
R.E.P.O. 파일 저장 위치 : 어디에 있고 그것을 보호하는 방법은 무엇입니까?
3 몇 주 전
By DDD

뜨거운 기사 태그

메모장++7.3.1
사용하기 쉬운 무료 코드 편집기

SublimeText3 중국어 버전
중국어 버전, 사용하기 매우 쉽습니다.

스튜디오 13.0.1 보내기
강력한 PHP 통합 개발 환경

드림위버 CS6
시각적 웹 개발 도구

SublimeText3 Mac 버전
신 수준의 코드 편집 소프트웨어(SublimeText3)

뜨거운 주제
Gmail 이메일의 로그인 입구는 어디에 있나요?
7313
9


자바 튜토리얼
1625
14


Cakephp 튜토리얼
1348
46


라라벨 튜토리얼
1260
25


PHP 튜토리얼
1207
29



Alter Table 문을 사용하여 MySQL에서 테이블을 어떻게 변경합니까?

MySQL의 문제를 해결하는 방법 공유 라이브러리를 열 수 없습니다.

Linux에서 MySQL을 실행합니다 (Phpmyadmin이있는 Podman 컨테이너가 포함되지 않음)

인기있는 MySQL GUI 도구는 무엇입니까 (예 : MySQL Workbench, Phpmyadmin)?
