Oracle RAC Tutorial: Clusterware and ASM Fundamentals for Beginners

Introduction

In this article, I explain how Oracle RAC works. While it may seem complex at first, understanding the fundamentals can help you optimize your design and respond quickly to failures. We hope this guide helps you gain a deeper understanding of Oracle RAC.

What is Oracle RAC ?

Oracle RAC (Real Application Clusters) is a clustering technology that allows multiple servers to work together as a single database. Until around the year 2000, the Active/Standby approach was common, where a standby server would take over if the primary database server failed. Today, all-node Active configurations using Oracle RAC are widely adopted, especially in mission-critical systems. In this article, we use a 2-node sample diagram to make it easier to understand the architecture and workings of Oracle RAC.

ComponentsDescriptions
Oracle Grid InfrastructureThe core software required to deploy Oracle RAC. Since 11g Release 2, Oracle Clusterware and Oracle ASM have been integrated and provided together as Oracle Grid Infrastructure.
Oracle ClusterwareMiddleware that provides the foundation for high availability and scalability for Oracle RAC databases and applications.
Oracle ASMASM stands for Automatic Storage Management. It functions as both a volume manager and a file system for Oracle Database files, improving storage management efficiency and optimizing performance.
Shared StorageShared storage where database files are located, accessible by all database instances.
FC Switch (Fiber Channel Switch)A switch used to connect servers to shared storage. Fibre optic connections are commonly used to achieve high-speed network communication.
L2SW (L2 Switch)In Oracle RAC, interconnect communication occurs between instances. An L2 switch is typically used to connect servers and build this internal network.

Purpose of Implementing Oracle RAC

The main goals of implementing Oracle RAC are to improve availability and scalability. The following sections explain each in detail.

Improving Availability

By deploying Oracle RAC, the impact of an instance failure can be minimized. Since multiple servers operate in an all-active configuration, if one instance fails, other servers can continue processing without interruption.

In traditional HA (Active/Standby) configurations, processing would stop during failover to the standby instance. The major advantage of Oracle RAC is that processing continues seamlessly even in the event of a failure.

The diagram below illustrates this concept: if Database Server #1 fails, processing continues on Server #2 and Server #3.

Improving Scalability

Implementing Oracle RAC also enhances scalability through scale-out. In traditional HA configurations, the only option was scale-up, increasing CPU or memory, which sometimes required replacing the entire server.

With Oracle RAC, you can simply add new servers to expand resources without making significant changes to existing servers.

The diagram below illustrates the concept of scale-out: you can add Database Server #4 without modifying Database Servers #1–#3.

Functions of Oracle Clusterware

Oracle Clusterware is middleware that provides high availability and scalability for Oracle RAC. It offers various functions to manage the cluster configuration.

Resources managed by Clusterware include databases, instances, services, listeners, VIPs, and application processes, collectively referred to as CRS (Cluster Ready Service) resources.

Oracle Clusterware manages CRS resources based on configuration information stored in the OCR (Oracle Cluster Registry).

Function of Oracle ASM

Oracle ASM (Automatic Storage Management) is a virtualization technology that aggregates multiple physical disks into a virtual storage pool. This approach improves performance and availability, and makes it easy to add or remove disks.

To use ASM, you need to start a separate ASM instance apart from the database instance. The ASM instance manages metadata for disk groups (including disks, file names, and data extents) and provides extent maps to the database instance’s SGA (System Global Area), indicating where data is stored.

The virtual storage pools created by ASM are called ASM disk groups. The diagram below illustrates the relationship between physical and logical disks at each layer.

Performance Improvement

Applying Oracle ASM with striping allows storage and disks to be used in parallel, improving disk I/O performance. In recent years, as CPU performance has increased, storage disk I/O has become a common system bottleneck, making the active use of this technology highly recommended.

Note: Striping in ASM differs from striping at the storage level using RAID0. ASM striping distributes data evenly at the ASM file (data file) level, whereas RAID0 cannot recognize ASM files for distribution. Therefore, using RAID0 alone may result in uneven read/write access (hot spots).

Improving Availability

By using mirroring in ASM, data can be stored in two or three copies, enhancing availability. Data is redundantly stored across different disks in units called failure groups, so even if a disk fails, the data files remain accessible. Additionally, mirroring can be configured at the disk group level, providing flexible redundancy options.

Adding or Removing Disks

When applying ASM, rebalance operations (data redistribution) are performed automatically when disks are added or removed. This allows volume expansion or data placement optimization during failures without stopping services, ensuring continuous database operation.

Summary

In this article, I explained the mechanisms of Oracle RAC, its benefits, and the key components involved.

  • What is Oracle RAC: A clustering technology that allows multiple servers to work together as a single database. An all-node active configuration enhances both availability and scalability.
  • Purpose of Implementation: Improves availability, ensuring processing continues even if an instance fails, and enhances scalability, allowing resources to be easily expanded by adding new servers.
  • Oracle Clusterware: Middleware that manages resources such as databases, applications, services, and VIPs, providing high availability and scalability.
  • Oracle ASM: Technology that aggregates multiple physical disks into virtual storage pools (disk groups), enabling performance improvement through striping, availability improvement through mirroring, and flexible rebalancing during disk addition or removal.

By understanding Oracle RAC and its related technologies, you can optimize design and operations, respond quickly to failures, and maximize system performance. Mastering these fundamentals allows you to confidently deploy Oracle RAC even in mission-critical systems.

コメント