Professional Documents
Culture Documents
ANTHONY D NORIEGA
anthonydnoriega@gmail.com
ADN R & D
Speaker Qualifications
Oracle Consultant, ADN R & D Speaker at Collaborate, IOUG LIVE, Quest Conference and NYOUG meetings. 25 years of IT experience 20 years of Oracle experience, 14 as a DBA (v6 thru 11g) RMAN experience with Oracle8i,9i, 10g, and 11g, since 1999.
Objectives
Present an independent array of concise tips to successfully manage ASM load balancing.
Introduce and illustrate ASM rebalancing and performance tuning scenarios. Understand ASM instance background processes and their role in load balancing. Learn the fundamentals for ASM manageability with both GUI API and CLI interfaces. Enhance a blueprint for clusterware, VLDBs, ACFS and ADVM.
RBAL, which performs global opens on all disks in the diskgroup. ASMB, this process contact CSS using the group name and acquires the associated ASM connect string, subsequently used to connect to the ASM instance. O00x, a group slave processes, with a numeric sequence starting at 000.
Types of Striping
Coarse-grained striping Provides load balancing for disk groups Fine-grained striping Reduces latency for certain file types by spreading the load more widely.
Extent size always equals the disk group AU size for the first 20000 extent sets (0 - 19999). Extent size equals 4*AU size for the next 20000 extent sets (20000 - 39999). Extent size equals 16*AU size for the next 20000 and higher extent sets (40000+).
Normal redundancy
ASM provides two-way mirroring by default, i.e., all files are mirrored so that there are two copies of every extent.
High redundancy
Oracle ASM provides triple mirroring by default. A loss of two ASM disks in different failure groups is tolerated.
...
ARB1
...
ARBn
RBAL
ASMB
RBAL
FG
Default
recycle
keep recycle
Java Pool
Redo Buffer
Flash Cache
Shared Pool
Streams Pool
16k
Large Pool
32K
2k
4k
RBAL
PGA
ASBM
PGA
O000
Database
File System ACFS Volume Manager
ADVM
ASM
Operating System
ASM metadata resides within the disk group containing information used by ASM to control a disk group, including:
o o o o o The disks that belong to a disk group The filenames of the files in a disk group The location of disk group data file extents The amount of space that is available in a diskgroup A redo log recording information about atomically changing metadata blocks
Initialization Parameters
ASM_DISKGROUPS ASM_DISKSTRING ASM_POWER_LIMIT ASM_PREFERRED_READ_FAILURE_GROUPS AU_SIZE COMPATIBLE.ADVM COMPATIBLE.ASM DB_CACHE_SIZE COMPATIBLE.RDBMS DIAGNOSTIC_DEST INSTANCE_TYPE LARGE_POOL_SIZE PROCESSES REMOTE_LOGIN_PASSWORDFILE SHARED_POOL_SIZE
Initialization Parameters
ASM_DISKGROUPS A dynamic parameter specifies a list of the names of disk groups that the ASM instance mounts at startup. Example setting ASM_DISKGROUPS dynamically:
SQL> ALTER SYSTEM SET ASM_DISKGROUPS = DATA1, ADNFRA;
ASM_DISKSTRING The ASM_DISKSTRING initialization parameter specifies the comma-delimited list of strings that limits the set of disks that an Oracle ASM instance discovers. It can include wildcard characters. /dev/sda*
ASM_POWER_LIMIT
Initialization Parameters
Specifies the default power for disk rebalancing. Default value is 1 Valid Ranges are [0,11] for versions earlier than 11.2 [0,1024] for versions 11.2 or later. A value of 0 disables rebalancing.
ASM_PREFERRED_READ_FAILURE_GROUPS
Its value is a comma-delimited list of strings specifying the failure groups preferentially read by the instance.
REMOTE_LOGIN_PASSWORDFILE
If set, it enables password-based authentication for the ASM instance checking for a password file.
Initialization Parameters
DB_CACHE_SIZE
Determines the size of the buffer cache.
DIAGNOSTIC_DEST
Specifies the directory for instance diagnostics It defaults to the $ORACLE_BASE directory (Oracle grid infrastructure installation.)
INSTANCE_TYPE
It must be set to Oracle ASM for an ASM instance.
PROCESSES
Its setting affects Oracle ASM, but the default is usually suitable. Adjust to PROCESSES = 50 + 50*N (N, number of database instances connected to the ASM instance.)
Initialization Parameters
SHARED_POOL_SIZE
Determines the amount of memory required to manage the instance. No need to set with automatic memory management (AMM). SGA configuration guidelines are as follows:
PROCESSES
LARGE_POOL_SIZE
SHARED_POOL_SIZE
Add up the values from the data, temp and logfiles in ASM, with consideration to the redundancy level used.
Initialization Parameters
With normal redundancy disk groups, every 50 GB requires 1 MB of extra shared pool plus 4 MB With high redundancy disk groups, every 33 GB requires 1 MB of extra shared pool plus 6 MB With external redundancy disk groups, every 100 GB of space requires about 1 MB of extra shared pool plus 2 MB.
SHARED_POOL_SIZE ESTIMATION QUERIES
SELECT SUM(bytes)/(1024*1024*1024) TOT_DATA_BYTES FROM V$DATAFILE; SELECT SUM(bytes)/(1024*1024*1024) TOT_TEMP_BYTES FROM V$TEMPFILE WHERE status='ONLINE'; SELECT SUM(bytes)/(1024*1024*1024) AS TOT_LOG_BYTES FROM V$LOGFILE L1, V$LOG L2 WHERE L1.group#=L2.group#;
Initialization Parameters
AU_SIZE
Determines the size of the allocation unit for the disk group. Listed in the ALLOCATION_UNIT_SIZE column of the V$ASM_DISKGROUP view.
COMPATIBLE.ASM
Specifies the minimum software version for any Oracle ASM instance that uses a disk group.
COMPATIBLE.RDBMS COMPATIBLE.ADVM
Specifies the minimum software version for any database instance that uses a disk group. Determines whether the disk group can contain Oracle ASM volumes.
ASM Maintenance
If /dev/diskC3 was previously a member of a disk group that no longer exists, then it is possible to use the FORCE option to add the disk as a member of another disk group. This scenario is illustrated below and adndata3 cannot be mounted for the statement to succeed. ALTER DISKGROUP adndata3 ADD DISK '/dev/diskC3' FORCE; The FORCE option must be used if Oracle ASM recognizes that the disk was managed by Oracle, listed as FOREIGN in the V$ASM_DISK view. Thus, the FORCE keyword is used to add the disk to a disk group.
ASM Maintenance
With its DROP DISK clause the ALTER DISKGROUP statement handles the task of dropping disks from a disk group. To drop all of the disks in specified failure groups, use the DROP DISKS IN FAILGROUP clause. The ALTER DISKGROUP...DROP DISK SQL statement returns to SQL prompt before the drop and rebalance operations complete, so the DBA must wait until the HEADER_STATUS column for this disk in V$ASM_DISK changes to FORMER before reusing, removing or disconnecting the dropped disk. Querying V$ASM_OPERATION allows to determine the amount of time remaining for the rebalance operation to complete.
ASM Maintenance
The following example drops diska5 from disk group adndata1, and also illustrates how multiple actions are possible with one ALTER DISKGROUP statement.
ALTER DISKGROUP adndata1 DROP DISK diskA5 ADD FAILGROUP failgroup1 DISK '/dev/diskA7' NAME diskA7 POWER 5;
The ALTER DISKGROUP ... MODIFY FILE SQL statement that sets disk region attributes for hot/mirrorhot or cold/mirrorcold regions:
ALTER DISKGROUP adndata1 MODIFY FILE '+data/adn3/datafile/tools.255.765689507' ATTRIBUTE ( HOT MIRRORHOT);
Oracle ASM can perform one disk group rebalance at a time on a given instance. Thus, multiple rebalances on different disk groups are processed serially. However, the DBA can initiate rebalances on different disk groups on different nodes in parallel.
ACFS
Oracle Automatic Storage Management Cluster File System (Oracle ACFS) is a multi-platform, scalable file system, and storage management technology that extends Oracle Automatic Storage Management (Oracle ASM) functionality to support customer files maintained outside of the Oracle Database. Oracle ACFS supports many database and application files, including executables, database trace files, database alert logs, application reports, BFILEs, and configuration files. Other supported files are video, audio, text, images, engineering drawings, and other general-purpose application file data.
ADVM
On Linux Oracle ADVM volume devices are created as block devices regardless of the configuration of the underlying storage in the Oracle ASM disk group.
The Oracle ASM instance is started during the Grid Infrastructure installation process whenever the Oracle Clusterware Registry (OCR) and voting files are configured within an Oracle ASM disk group.
Besides, the Oracle ASM instance can also be started using the Oracle ASM Configuration Assistant and the Oracle ACFS drivers are loaded based on that action. In steady state mode, the Oracle ACFS drivers are automatically loaded during Oracle Clusterware initialization when the Oracle High Availability Services Daemon (OHASD) calls the start action for the Oracle ASM instance resource that also results in loading the Oracle ACFS drivers due to the resource dependency relationship. The start action for the Oracle ACFS drivers resource attempts to load the Oracle ACFS, Oracle ADVM, and Oracle Kernel Services (OKS) drivers into the native operating system.
ADVM
Factor 1: Redundancy Factor 2: Clusterware Factor 3: Allocation Unit Factor 4: Striping Types Factor 5: Extent design Factor 6: Compatibility Issues Factor 7: Support for ACFS Factor 8: Support for ADVM
Concluding Remarks
ASM's rebalance process is very easy. ASM simply rebalances a diskgroup whenever a disk is added or dropped. Rather than restriping all the data, ASM only needs to move an amount of data by using index techniques to spread extents on the available disks.
Combining operations, such as ADD and DROP a DISK, at the same time, helps minimize the overhead on both the ASM and database instances, and consequently or normal production operations
Concluding Remarks
Finally, adjusting the ASM_POWER_LIMIT can enable controlled rebalancing while operations requiring data movement, control of redundancy and other-relevant tasks are being performed. The above mentioned conclusions are valid for a native ASM environment, and one supporting ACFS and ADVM. As ASM technology becomes a widely RAC infrastructure standard with 65% production deployment.
Thank you!
Please complete your evaluation form! Speaker: Anthony Noriega Title: Oracle ASM Load Balancing. ORACLE ASM STORAGE FORUM SESSION ID: S313474 http://noriegaaoracleexpert.blogspot.com anthonydnoriega@gmail.com