Introduction
Oracle Real Application Clusters (RAC) is one of the most powerful high-availability database technologies available today. It allows multiple database instances to run on different nodes while accessing the same database storage.
But behind this seamless experience lies a complex internal architecture that ensures consistency, synchronization, and performance across nodes.
In this article, weβll break down three critical Oracle RAC internals in a simple and practical way:
- GRD (Global Resource Directory)
- GES (Global Enqueue Service)
- GCS (Global Cache Service)
By the end, youβll understand how Oracle RAC manages concurrency and ensures data consistency across all instances.
What Problem Does RAC Solve?
In a single-instance database, one database manages all data access. But in RAC:
π Multiple instances access the same data blocks simultaneously
This creates challenges like:
- Data consistency
- Lock coordination
- Cache synchronization
- Performance overhead
Oracle solves this using GRD, GES, and GCS
What is GRD (Global Resource Directory)?
The Global Resource Directory (GRD) is the central brain of RAC coordination.
It keeps track of:
- Who owns which data block
- Which instance holds locks
- Which instance has cached copies
- Which instance is the master of a resource
Think of GRD like this:
GRD = Cluster-wide dictionary of all resources
Every RAC instance maintains a portion of the GRD, so it is:
β Distributed
β Highly available
β Efficient
What is GES (Global Enqueue Service)?
GES is responsible for global locks across RAC instances.
It manages:
- Row locks
- Table locks
- DDL locks
- Library cache locks
Whenever two instances try to modify the same data or structure:
π GES coordinates who gets the lock
Example
Instance 1 updates a row
Instance 2 tries to update same row
GES ensures:
Only one instance holds the lock at a time
This prevents data corruption and conflicts
What is GCS (Global Cache Service)?
GCS handles data block consistency across instances
This is also known as Cache Fusion
Instead of writing blocks to disk, RAC transfers them directly between nodes over the interconnect.
Example
Instance 1 has a block in memory
Instance 2 needs it
π GCS transfers the block from Instance 1 β Instance 2
No disk read required π₯
GRD + GES + GCS Relationship
Hereβs how everything works together:
GRD β knows where everything isGES β manages locksGCS β manages data blocks
Where are these components stored?
Oracle uses different memory areas:
| Component | Stored in |
|---|---|
| GES (Enqueue Resources) | Shared Pool |
| GCS (Cache Resources) | Large Pool |
| GRD | Distributed across instances |
Master and Shadow Resources
Each resource in GRD has:
- One MASTER copy
- Multiple SHADOW copies
Example
Block A:Master β Instance 2
Shadow β Instance 1, Instance 3
This allows fast coordination without central bottlenecks.
How RAC Handles a Block Update
Letβs walk through a simple scenario:
Step 1: Instance 1 updates a block
- GCS marks it as modified
- GRD updates ownership
Step 2: Instance 2 requests same block
- GRD identifies Instance 1 as owner
- GCS transfers block via interconnect
Step 3: Lock managed by GES
- GES ensures safe access
Result:
β No disk read
β Fast transfer
β Consistent data
Why This Matters for Performance
These components directly impact:
- Query performance
- Transaction speed
- Interconnect traffic
- Scalability
Poor design causes:
- Excessive block pinging
- High global cache waits
- Enqueue contention
Good design ensures:
- Cache locality
- Reduced cross-node traffic
- High throughput
Common Performance Waits Related to GRD
When something is not optimized, you may see waits like:
gc cr requestgc buffer busyenq: TX row lock contentionges resource busy
These are directly related to GCS and GES activity
Best Practices for RAC Performance
Here are a few DBA tips:
β Use service-based workload routing
Keep related sessions on the same instance
β Avoid hot blocks
Partition heavily accessed tables
β Use NOORDER sequences in RAC
Reduces SQ enqueue contention
β Increase sequence cache size
Reduces global synchronization
β Monitor interconnect traffic
Ensure low latency network
RAC Internals Simplified
Letβs summarize everything in one simple model:
Client β connects to InstanceInstance uses:
GES β to get locks
GCS β to get data blocks
GRD β to find resource owner
Easy Memory Trick
Remember this:
GES = Locks
GCS = Blocks
GRD = Directory
Conclusion
Oracle RAC is powerful because it allows multiple instances to work together on the same database.
But this is only possible because of the intelligent coordination done by:
- GRD (Global Resource Directory)
- GES (Global Enqueue Service)
- GCS (Global Cache Service)
These components ensure:
β Data consistency
β High performance
β Scalability
β Fault tolerance
Understanding these internals will help you:
- Troubleshoot RAC issues faster
- Improve performance
- Design better architectures




