oracle asm load balancing_anthony noriega

Download Oracle ASM Load Balancing_Anthony Noriega

Post on 24-Oct-2014

207 views

Category:

Documents

9 download

Embed Size (px)

DESCRIPTION

11g

TRANSCRIPT

Oracle ASM Load BalancingBalancing ASM Load for Successful Storage ManagementSession # S313474

ANTHONY D NORIEGAanthonydnoriega@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.

BS Systems Engineering, Universidad del Norte, 1987. MS Computer Science, NJIT, 1992 PhD CIS candidate, NJIT, 1997 MBA MIS, Montclair State University, 2006 College Math Professor and former HS Math Teacher Principal.

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.

ASM Instance Processes An ASM instance has two background processes, namely: RBAL, which coordinates rebalance activities for disk groups. ARBx, x=0,1,2..., which actually performs the balance of extents movements.

Database Instance ProcessesThere are 3 ASM-related database instance background processes, namely:

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.

ASM Disk StripingMain purposes To balance loads across all of the disks in a disk group To reduce I/O latency

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.

Allocation Unit and ExtentsThe contents of Oracle ASM files are stored in a disk group as a collection of extents that are stored on individual disks within disk groups. Each extent resides on an individual disk. Extents consist of one or more allocation units (AU), and can use variable size to enable support for larger Oracle ASM data files, reduce SGA memory requirements for very large databases, and improve performance for file creation and open operations.

Allocation Unit and ExtentsThe initial extent size equals the disk group allocation unit size and it increases by a factor of 4 or 16 at predefined thresholds. The extent size of a file varies as follows:

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+).

Oracle ASM Redundancy LevelsExternal redundancyASM does not provide mirroring redundancy and relies on the storage system to provide RAID functionality. Any write error causes a forced dismount of the disk group. All disks must be located to successfully mount the disk group.

Normal redundancyASM 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.

ASM: Overall ArchitectureARB0

...

ARB1

...

ARBn

RBAL

Group Services ... ...

ASMB

RBAL

FG

Oracle ASM Instance

Oracle Database Instance

Oracle Database InstanceServer Process 1 PGA Server Process 2 PGA Background Processes PGA

Default

recycle

keep recycle

Java Pool

Redo Buffer

Flash Cache

Shared Pool

Streams Pool

16k

Large Pool

32K

2k

4k

Other Components O0001

RBAL

PGA

ASBM

PGA

O000

ASM Slave processes

ASM Instance StackApplication

DatabaseFile System ACFS Volume ManagerADVM

ASM

Operating System

ASM and Oracle ClusterwareTo share a disk group among multiple nodes, the DBA must install Oracle Clusterware on all of the nodes (with or without RAC). ASM instances on separate nodes do not need to be part of an Oracle ASM cluster and normally they cannot communicate with each other. Likewise, multiple nodes which are not part of an Oracle ASM cluster are unable to share a disk group.

ASM and Oracle ClusterwareFailure groups defined for a disk group at ASM disk group creation cannot be altered afterwards to change the redundancy level of the disk group.

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 ParametersASM_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 ParametersASM_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_GROUPSIts value is a comma-delimited list of strings specifying the failure groups preferentially read by the instance.

REMOTE_LOGIN_PASSWORDFILEIf set, it enables password-based authentication for the ASM instance checking for a password file.

Initialization ParametersDB_CACHE_SIZEDetermines the size of the buffer cache.

DIAGNOSTIC_DESTSpecifies the directory for instance diagnostics It defaults to the $ORACLE_BASE directory (Oracle grid infrastructure installation.)

INSTANCE_TYPEIt must be set to Oracle ASM for an ASM instance.

PROCESSESIts 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 ParametersSHARED_POOL_SIZEDetermines 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

Add 16 to database instance value.

LARGE_POOL_SIZE

Add an additional 600K to the instance value.

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 ParametersAU_SIZEDetermines 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.

Optimizing Disk DiscoveryDisk discovery is the mechanism used to find the operating system names for disks Oracle ASM can access, when the instance is started, by matching ASM_DISKSTRING. Disk discovery also takes place when:Running the following SQL statements such as, namely: oMount a disk group with ALTER DISKGROUP ... MOUNT oAdd a disk with CREATE or ALTER DISKGROUP...ADD DISK oOnline a disk with ALTER DISKGROUP ... ONLINE DISK oResize a disk with ALTER DISKGROUP...RESIZE DISK oQuery V$ASM_DISKGROUP or V$ASM_DISK views Running OEM or ASM Configuration Assistant (ASMCA) operations invoking the above SQL statements. Running ASMCMD commands that perform the same operations as the SQL statements as listed above.

Important ASM Discovery RulesThe following ASM rebalancing rules apply: Oracle ASM can discover up to 10,000 disks. Oracle ASM only discovers disk partitions, excluding partitions that include the partition table. From the installation perspective, candidate disks are those that have the CANDIDATE, PROVISIONED, or FORMER header status, and they can be added to disk groups without using the FORCE flag.

ASM Load BalancingAdding Disks to a DiskgroupALTER DISKGROUP adndata1 ADD DISK '/dev/