About Lock Mastering and Resource Affinity in Oracle RAC

By Richard Niemiec on April 7, 2013


In normal cluster environments, the resources are split between various nodes, which are typically different servers participating in the cluster.  Each node, called a master node, owns a subset of total resources; the control of those resources is handled from the respective nodes. This process is known as resource mastering or lock mastering.

If one node wants to acquire a resource that is mastered by another node, the requesting node makes a request to the master node or the holding node to grant access to the requesting node.  In this way, a resource is handled by only one node at a time, avoiding data corruption in clustered environments.

In Oracle’s RAC environment, the Global Resource Directory (GRD) that is maintained by the Global Enqueue Services (GES) and Global Cache Services (GCS) handles the “lock mastering” operations.  They dynamically remaster the resources based on resource affinity, which enhances the performance because the ownership of those resources are localized.

For example, if any instance uses a resource more frequently than other instances, that resource will dynamically be remastered to that instance.  This helps the resource to be controlled from that particular instance and increases the performance of the clusters by reducing the lock management operations.  This new feature is called dynamic remastering.  The initialization parameter _LM_DYNAMIC_REMASTERING controls the behavior of dynamic remastering; setting this paramater to FALSE disables the dynamic remastering.

Related Posts

Leave a Reply