ASM Preferred Mirror Read in Oracle 11g R2:
Until Oracle 10g, Automatic Storage Management used to read only Primary copy of extents. This isn’t a problem when both nodes and both failure groups are all located in the same site (i.e. This works fine if Real Application Cluster environment is not extended), but it can be inefficient for extended clusters, causing needless network traffic. In case of extended RAC (when RAC nodes and Storage are placed at different locations) suppose there are two sites A (with RAC node and storage) and B (with RAC node and storage) located at two different locations.
If node B needs and extent which has primary copy at Storage A and mirror copy at Storage B, So, B has to go to Storage A for primary copy which cause a high traffic on network.
To overcome this, Oracle 11g introduce ASM preferred Mirror Read. Reference from above example, Now, if B has mirror copy of extent at storage B, it will read mirror copy only rather than going to primary extent at site A and will increase the performance. Oracle 11g allows each node to define a preferred failure group, allowing nodes in extended clusters to access local failure groups in preference to remote ones.
How to Setup ASM Preferred Mirror Read:
A new parameter ASM_PREFERRED_READ_FAILURE_GROUP is introduced at ASM instance level. Each Automatic Storage Instance has this parameter value which should points to its local disk groups.
To configure preferred read failure groups the disk group compatibility attributes must be set to 11.1 or higher. Once the compatibility options are correct, the ASM_PREFERRED_READ_FAILURE_GROUPS parameter is set to the preferred failure groups for each node.
Each time when there is a read request and extent exists at local disks either primary or mirror copy it will read from local disk and gives a improved performance.
Command to change parameter:
SQL> alter system set asm_preferred_read_failure_groups='ams_diskgroup_name.asm_failure_group_name';
Steps to follow :
SQL> select name from v$asm_diskgroup;
NAME
----------
PAWFG
DATA
SQL> select name,failgroup from v$asm_disk;
NAME FAILGROUP
---------- ---------------------------
DATA_0000 DATA_0000
DATA_0001 DATA_0001
DATA_0002 DATA_0002
PAWFG_0000 PAW_FG1
PAWFG_0001 PAW_FG1
PAWFG_0002 PAW_FG1
PAWFG_0003 PAW_FG2
PAWFG_0004 PAW_FG2
PAWFG_0005 PAW_FG2
10 rows selected.
SQL> alter system set asm_preferred_read_failure_groups='PAWFG.PAW_FG2';
System altered.
SQL> ALTER SYSTEM SET ASM_PREFERRED_READ_FAILURE_GROUPS = 'DATA.DATA_0000', 'DATA.DATA_0001', 'DATA.DATA_0002';
Crosscheck for implementation:
SQL> SHOW PARAMETER asm_preferred_read_failure_groups;
NAME TYPE VALUE
------------------------------------ ----------- --------------------------
asm_preferred_read_failure_groups string PAWFG.PAW_FG2
Thank you for reading… This is Airy…Enjoy Learning 🙂