Disclaimer

Sunday 11 July 2021

Recommended ASM Parameters Settings

Recommended Settings for Oracle ASM Initialization Parameters

In this post I will explain only some important parameters which you need to consider while configuring ASM Instance

• ASM_DISKGROUPS
• ASM_DISKSTRING
• ASM_POWER_LIMIT
• ASM_PREFERRED_READ_FAILURE_GROUPS
• DIAGNOSTIC_DEST
• INSTANCE_TYPE
• PROCESSES


ASM_DISKGROUPS:-

This Parameter specifies a list of names of disk groups to be mounted by an Automatic Storage Management instance at instance startup or when an ALTER DISKGROUP ALL MOUNT statement is issued. There is no default value. Automatic Storage Management (ASM) automatically adds a disk group to this parameter when the disk group is successfully created or mounted, and automatically removes a disk group from this parameter when the disk group is dropped or dismounted.

Note: For Oracle Database 12c Release 1 or later, Oracle ASM configurations support up to 511 disk groups. Oracle ASM configurations with Oracle Database releases before
12c Release 1 can only support up to 63 disk groups.



SQL>  show parameter diskgroup;
NAME                                 TYPE        VALUE
------------------------------------ ----------- --------------------
asm_diskgroups                       string      DG_TEST_FRA, DG_TEST_REDO, DG_
TEST_DATA, DG_TEST                             


SQL> select GROUP_NUMBER,NAME,STATE from v$asm_diskgroup;
GROUP_NUMBER NAME                           STATE
------------ ------------------------------ -----------
           1 DG_TEST_DATA                   MOUNTED
           2 DG_TEST_FRA                    MOUNTED
           3 DG_TEST_REDO                   MOUNTED
           4 DG_TEST                        MOUNTED


SQL>  alter diskgroup DG_TEST dismount;
Diskgroup altered.


SQL> show parameter diskgroup;
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
asm_diskgroups                       string      DG_TEST_FRA, DG_TEST_REDO, DG_
                                                 TEST_DATA <= Dismounted DG has been removed from the list


SQL> select GROUP_NUMBER,NAME,STATE from v$asm_diskgroup;
GROUP_NUMBER NAME                           STATE
------------ ------------------------------ -----------
           0 DG_TEST                        DISMOUNTED
           1 DG_TEST_DATA                   MOUNTED
           2 DG_TEST_FRA                    MOUNTED
           3 DG_TEST_REDO                   MOUNTED


NOTE: If you are not using SPFILE you have to manually adjust the parameter in pfile and restart the ASM instance to bring the parameter in effect. It is strongly recommended to use SPFILE

ASM_DISKSTRING
This specifies an operating system-dependent value used by Automatic Storage Management to limit the set of disks considered for discovery.
The default value is null string which means ASM  discovery finds all disks in an operating system-specific location to which the Automatic Storage Management instance has read/write access.


SQL> show parameter string
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
asm_diskstring                       string      AFD:* <= Indicates AFD (ASM Filter Driver is used)



ASM_POWER_LIMIT
This parameter specifies maximum number of processes for disk rebalancing. The higher the limit, the faster rebalancing will complete but might result in higher I/O overhead and hence degrading the overall performance
Default value is 1. Value 0 disables the rebalancing. The maximum allowed value for this parameter is 1024 if ASN compatibility for the DG is set =>11.2.0.2 else the value is 11
Specifying the value using POWER clause in ALTER DISKGROUP.... operation always takes precedence and used to perform rebalancing for that particular operation



ASM_PREFERRED_READ_FAILURE_GROUPS
This is an interesting parameter and very useful in case of Extended RAC. Let me explain how
If you dont configure  ASM_PREFERRED_READ_FAILURE_GROUPS parameter ASM used to read only Primary copy of extents. In case of extended RAC cluster for example
Node1 is running in SITEA
Node2 is running in SITEB

In this kind of configuration data is striped across the sites and reading the data from remote location ( ie Node1 has to read the data from SITEB for all primary extents located in SITEB and Node2 has to read it from SITEA for all primary extents located in SITEA) will cause network overhead as well as latency impacting overall performance, although a copy of the same data is available locally as secondary extent, This is so because oracle tend to read the data from primary extent by default.
To solve this issue oracle introduced the parameter ASM_PREFERRED_READ_FAILURE_GROUP starting from 11g. If ASM_PREFERRED_READ_FAILURE_GROUP parameter is set DB Instance prefers to read the data from local site only. The ASM_PREFERRED_READ_FAILURE_GROUPS parameter setting is instance specific.


How to Setup ASM Preferred Mirror Read:

SQL> alter system set asm_preferred_read_failure_groups='ams_diskgroup_name.asm_failure_group_name';





NOTE:- Please do ensure to investigate the pros/cons while using Flex ASM the behavior might be different


DIAGNOSTIC_DEST
The DIAGNOSTIC_DEST initialization parameter specifies the directory where diagnostics
for an instance are located.
The default value for an Oracle ASM instance is the $ORACLE_BASE directory for the
Oracle Grid Infrastructure installation.


INSTANCE_TYPE
The INSTANCE_TYPE initialization parameter specifies whether the instance is a database
instance, an Oracle Automatic Storage Management (Oracle ASM) instance, or an
Oracle ASM Proxy instance.
The following is an example of the INSTANCE_TYPE parameter in the initialization file:
INSTANCE_TYPE = ASM
In addition to values asm and rdbms, INSTANCE_TYPE can be set to asmproxy in an Oracle
Flex ASM configuration.


PROCESSES
The PROCESSES initialization parameter affects Oracle ASM, but the default value is
usually suitable.
However, if multiple database instances are connected to an Oracle ASM instance,
then you can use the following formulas, where n is the number of database instances
connecting to the Oracle ASM instance.
In a non-Exadata environment, the recommended settings are:

• For n < 10, PROCESSES = 50*n + 50
• For n >= 10, PROCESSES = 10*n + 450

In an Oracle Exadata environment, the recommended setting is PROCESSES = MAX(450 +
10*n, 1024)




No comments:

Post a Comment

100 Oracle DBA Interview Questions and Answers

  Here are 100 tricky interview questions tailored for a Senior Oracle DBA role. These questions span a wide range of topics, including perf...