RAC Dynamic Resource Manager (DRM)
The gc cr
grant 2-way and gc current
grant 2-way wait events occur when locks need to be obtained in one
instance but the resource master is in another instance. The GRD keeps
track of the number of times a lock was requested from an instance other
than where the resource master is located.
If the requests frequently come from the same
instance, Dynamic Resource
Mastering (DRM) will relocate the resource master to the instance
dominating the requests.
By re-mastering the resource to another instance, the
number of gc cr grant 2-way
and gc current grant 2-way
wait events are reduced.
The end users will not have to wait for
cross-instance messaging to complete to be able to obtain the lock. GRD
calls this technique resource
affinity where a resource and its master have a strong attraction to
one instance in the cluster. Resource affinity is often seen in Oracle
RAC deployments where application partitioning is performed, a topic
discussed in the next chapter. The
gv$gcspfmaster_info view
shows which objects have been the subjects of DRM:
SQL> select
2
data_object_id,
3
gc_mastering_policy,
4
current_master+1 as current_mast_inst,
5
remaster_cnt
6
from
7
gv$gcspfmaster_info;
DATA_OBJECT_ID GC_MASTERIN CURRENT_MAST_INST
REMASTER_CNT
-------------- ----------- -----------------
------------
57 Affinity
1
1
58 Affinity
2
1
59 Affinity
3
1
The
data_object_id column can be joined to
dba_objects.object_id to know
which database object is involved.
It should be noted that the
current_master and
previous_master columns are
one number off the instance identifier as they start counting from zero.
The example query above adds one to obtain the instance id. Also, these
current and previous master columns may show a value of 32767. If
current_master is 32767, then
the object was subject to DRM but no longer is. If
previous_master is 32767,
then the object was not subject to DRM, but now is.
|
 |
|
Learn RAC Tuning
Internals!
This is an excerpt from the landmark book
Oracle RAC Performance tuning,
a book that provides real world advice for resolving
the most difficult RAC performance and tuning issues.
Buy it
for 30% off directly from the publisher.
|

|
|
Burleson is the American Team

Note:
This Oracle
documentation was created as a support and Oracle training reference for use by our
DBA performance tuning consulting professionals.
Feel free to ask questions on our
Oracle forum.
Verify
experience!
Anyone
considering using the services of an Oracle support expert should
independently investigate their credentials and experience, and not rely on
advertisements and self-proclaimed expertise. All legitimate Oracle experts
publish
their Oracle
qualifications.
Errata?
Oracle technology is changing and we
strive to update our BC Oracle support information. If you find an error
or have a suggestion for improving our content, we would appreciate your
feedback. Just
e-mail:
and include the URL for the page.
Copyright © 1996 - 2020
All rights reserved by
Burleson
Oracle ®
is the registered trademark of Oracle Corporation.
|
|