ASM Basic
Three major components are:- ASM Instance, Disk Group and ASM Files.
In the ASM Enable database, we first start the ASM instance (This is not a full database instance; just the memory structures and as such is very small and lightweight), ASM instances manage the Disk Group and help the database to access the ASM files.
ASM Instance maintains the ASM file metadata. Database can use it to access the files directly. ASM does not mount the database files. ASM also does not have a data dictionary. ASM instance only manage the disk group, protect disk group and communication file metadata to database instance using ASM files.
* Big advantage is that ASM gives us power to bypass using a third- party LVM, mirroring and stripping because ASM works as LVM and it also handles striping and mirroring functions.
* As a DBA no need to perform relocation of data because ASM prevents disk fragmentation.
* ASM performs mirroring and stripping. Mirroring is applied on file basic rather than disk basic. ASM automatically balances I/O.
* ASM Manage group of Disk, Called disk groups.
* It manages disk redundancy within a disk group.
* Provides near-optimal I/O balancing without any manual tuning, Support largs file
* INSTANCE_TYPE = ASM,
* ASM_POWER_LIMIT = 11,
* ASM_DISKSTRING = '/dev/rdsk/*s2', '/dev/rdsk/c1*'
* ASM_DISKGROUPS = DG_DATA, DG_FRA
Use case:
Imagine a large-scale Oracle database environment with multiple nodes. Flex ASM allows ASM instances to be dynamically started or stopped based on workload demand, optimizing resource utilization and enhancing availability.
Example:
In a cluster with four nodes, Flex ASM dynamically adjusts ASM instances based on workload. If one node experiences increased demand, Flex ASM can allocate additional ASM instances to that node to handle the workload efficiently. Conversely, if workload decreases on a node, Flex ASM can reallocate ASM instances to other nodes, ensuring optimal resource utilization across the cluster.
ASM Reblancing
* Rebalancing is the process of moving file extents onto disks.
* Purpose of rebalancing is evenly distributing the I/O load of the diskgroup.
* In the RAC Environment, Rebalancing for a disk group is done within a single ASM instance only and cannot be distributed across multiple cluster node to speed it up.
* ASM will automatically rebalance data on disks when disks are added or removed by using ASM_POWER_LIMIT initialization parameter.
* External redundancy
* Normal redundancy
* High redundancy.
* Fine-grained striping, Coarse-grained striping
Fine Striping:- Fine striping writes 128 KB data to each ASM Disk in the diskgroup in a round robin fashion, 128 KB goes to the first disk, then the next 128 KB, goes to the next disk, etc. According to manual, The fine-grained stripe size always equals 128 KB in any configuration; this provides lower I/O latency for small I/O operations.” Small I/O operations sure sounds like a good candidate for redo logs, control files etc.
Coarse Striping:-With coarse grained striping ASM writes data to each disk in the same round robin fashion, but writes chunks in the size of the ASM instance’s allocation unit (AU) size, default is 1MB.
* Every ASM disk is divided into allocation units (AU).
* An AU is the fundamental unit of allocation within a disk group.
* A file extent consists of one or more AU.
* An ASM file consists of one or more file extents.
* CREATE DISKGROUP disk_group_2 EXTERNAL REDUNDANCY DISK '/dev/sde1' ATRRIBUTE 'au_size' = '32M';
* Process flow for ASM rebalancing:
* On the ASM instance, a disk is added or dropped from a diskgroup.
* This invokes the RBAL process to create the rebalance plan and then begin coordination of the redistribution.
* RBAL will calculate estimation time and work required to perform the task and then message the ARBx processes to actually handle the request.
* The number of ARBx processes invoked is directly determined by the asm_power_limit.
* The Continuing Operations Directory (metadata) will be updated to reflect a rebalance activity.
* Each extent to be relocated is assigned to an ARBx process.
* ARBx performs rebalance on these extents. Each extent is locked, relocated, and unlocked. This is shown as Operation REBAL in V$ASM_OPERATION
Post a Comment