• Aucun résultat trouvé

RAID Basics

Dans le document Oracle Essentials Oracle Database 11g (Page 183-186)

RAID disk arrays provide a hardware solution for both reliability and performance.

There are different levels of RAID hardware; the following are most relevant to performance:

RAID-0

Where availability isn’t a concern, the disks can be configured as RAID-0, which is nonredundant disk striping.

RAID-1

Provides the simplest form of redundancy, full duplication of data, which is referred to asmirroring.

RAID-0+1

Combines the one-to-one mirroring of RAID-1 with the striping of RAID-0.

RAID-3

Provides redundancy by storing parity information on a single disk in the array.

This parity information can help to recover the data on other disks, should they fail. RAID-3 saves on disk storage compared to RAID-1, but isn’t often used because the parity disk can be a bottleneck.

RAID-5

Uses parity data for redundancy in a way that is similar to RAID-3, but stripes the parity data across all of the disks, like the way in which the actual data is striped.

This alleviates the bottleneck on the parity disk.

There are additional levels of RAID, including RAID-6, which adds dual parity data, and RAID-7 and RAID-8, which add performance enhancements to the characteristics of RAID-5.

164 | Chapter 7: Oracle Performance

Instead, suppose you placed the same datafile on a “disk” that was actually an array of five physical disks. Each physical disk in the array can perform I/O operations independently on different data blocks of the index, automatically increasing the amount of I/O Oracle can perform without causing contention.

Simply using disk arrays won’t, by itself, give you optimal I/O performance. As dis-cussed earlier, you also need to logically place the different types of Oracle files across the available drives, even if the drives are grouped into arrays. As of Oracle Database 10g, striping considerations are made simpler through Automatic Storage Management. ASM provides automatic striping and rebalancing of stripe sets. By default, ASM also provides automated mirroring.

Volume managers

With host-based striping, logical volume-management software runs on the database server. Examples of this type of software often used under older Oracle database releases include Hewlett Packard’s Logical Volume Manager (LVM) and Veritas Soft-ware’s Volume Manager. The LVM acts as an interface between the operating system that requests I/O and the underlying physical disks. Volume-management software groups disks into arrays, which are then seen by the operating system as single

“disks.” The actual disks are usually individual devices attached to controllers or disks contained in a prepackaged array containing multiple disks and controllers.

This striping is handled by the volume-management software and is completely transparent to Oracle. Figure 7-1 illustrates host-based volume management.

Figure 7-1. Host-based volume management

Oracle Instance Operating System

Volume Manager Database Server

Volume 1 RAID-5 Array

Volume 2 RAID-5 Array

Volume 3 RAID-1 Array

Oracle and Disk I/O Resources | 165 Oracle began providing its own volume manager software for Linux and Windows in Oracle9i Release 2. Since Oracle Database 10g, database releases for all supported operating systems include a cluster file system and volume manager in the database that is leveraged by ASM. When using ASM, it is recommended that you not try to leverage an operating system volume manager.

Dedicated storage subsystems

Dedicated storage systems, often referred to asdisk farms, contain disks, controllers, CPUs, and (usually) memory used as an I/O cache. Vendors include EMC, Network Appliance, Hewlett-Packard, IBM, and Sun. These subsystems offload the task of managing the disk arrays from the database server. The I/O subsystem is attached to the server using controllers. These dedicated storage devices are sometimes grouped intostorage area networks(SANs) to denote their logical organization as a separate set of networked devices. The disk arrays are defined and managed within the dedi-cated I/O subsystem, and the resulting logical “disks” are seen by the operating system as physical disks.

This type of disk-volume management is completely transparent to the database server and offers many benefits:

• The database server does not spend CPU resources managing the disk arrays.

• The I/O subsystem uses memory for an I/O cache, so the performance of Oracle I/O can improve significantly (for example, from an average I/O time of 10–12 milliseconds to 3–5 milliseconds).

• Write I/O is completed as soon as the data has been written to the subsystem’s cache.

• The I/O subsystem will destage the data from cache to actual disk later.

• Read I/O can be satisfied from the cache. The subsystem can employ some type of algorithm to sense I/O patterns and preload the cache in anticipation of pend-ing read activity.

Note that you must back up the cache with some type of battery so a power failure doesn’t result in the loss of data that was written to the cache, but hasn’t yet been destaged to the physical disk. Otherwise, data that Oracle assumes made it to disk may be lost, thereby potentially corrupting the database. Figure 7-2 illustrates a data-base server with a dedicated I/O subsystem.

Combined host-based and I/O subsystem volume management

In this configuration, disks are grouped into arrays within the I/O subsystem and grouped again into coarser arrays using operating system volume management. On EMC systems, for example, the physical disks are grouped into either RAID-1 mir-rored disk pairs or into a RAID-S striped configuration using four disks per stripe set.

166 | Chapter 7: Oracle Performance

(RAID-S is the term EMC [http://www.emc.com] uses for its specialized striping hard-ware and softhard-ware.)

Using EMC technology as an example, the operating system sees horizontal sections of disk space across each RAID-1 disk or RAID-S array as single “disks.” Youcan use the operating system volume management to group these “disks” into arrays. With RAID-1 disks, this configuration delivers the benefits of using a dedicated I/O subsystem with its own cache and processing power while leveraging striping for simplicity. With RAID-S arrays youget the benefit of the dedicated I/O subsystem and further simplify disk management by a striping multiplier effect. An array of five “disks” at the oper-ating system level could map back to five arrays of four disks each in the I/O subsystem. This configuration maps a logical disk seen by Oracle to 20 physical disks in the underlying I/O subsystem. Figure 7-3 illustrates a logical drive on the data-base server mapping to horizontal sections across multiple RAID-S arrays.

Dans le document Oracle Essentials Oracle Database 11g (Page 183-186)