The following is part of a series on the different aspects of disk I/O performance and optimization for Oracle databases. Each tip is excerpted from the not-yet-released Rampant TechPress book, "Oracle disk I/O tuning," by Mike Ault.
Storage array or hardware provides mirroring of disks or disk partitions protects against the possible loss of disks and disruption to the storage availability. With hardware mirroring, the operating system sees only one device and performs only one write to it. The hardware is responsible for ensuring that the write is directed to all mirrors and is logically atomic.
Mirroring can also be implemented at host level by using the volume management software. When implemented at host level, with software mirroring, there is the possibility of a system failure occurring after a write has completed on one side of the mirror, but before it has reached the other(s). Therefore, to ensure that mirror consistency can be re-established reasonably quickly after a crash, software mirroring maintains a dirty region log on disk. This identifies the mirror regions that have been written to recently, and thus might be inconsistent in the event of a system failure. The maintenance of a dirty region log adds a major performance overhead to software mirroring. In the past, Oracle has worked with some LVM vendors to eliminate the need for dirty region logs on mirrored Oracle database files, but this facility is only available on some platforms and introduces extra complexity.
When the hardware mirroring is not available, ASM provides the best possible mirroring. No dirty region logs are needed, as the Oracle manages to restore consistency between the mirrors using its own redo log data.
Load balancing (SAME)
Oracle has been promoting the concept of SAME – Stripe and Mirror Everything which aimed at using the full I/O capacity of the all the disks. Many database users have implemented "SAME sets", each of about 4 mirrored disk pairs. However the SAME functionality does not completely eliminate the disk imbalances. There are different types of files where the IO activity is not uniform, and the configuration of SAME is not the cure for all IO ills.
ASM goes a step forward, in balancing the IO activity. Rebalancing distributes file data evenly across all the disks of the ASM Disk Group. ASM automatically rebalances a disk group whenever disks are added or dropped. ASM ensures that a file is evenly spread across all disks in a disk group when the file is allocated, so rebalancing is not required except when the storage configuration changes. With the I/O balanced whenever files are allocated and whenever the storage configuration changes, you never need to search for hot spots in a disk group and manually move data to restore a balanced I/O load. It also allows the addition of disks online. There are extra background processes that conduct the rebalancing activity in a non-intrusive way.
Thus the ASM makes manual load balancing unnecessary, because the dynamic rebalancing overcomes the major drawback of SAME. When new disks are added to a disk group, rebalancing happens automatically without an outage.
ASM is the new best practice for storage management
The use of ASM files provides all above mentioned features without any cost and administrative inconvenience. Above mentioned characteristics are derived from the ASM methodology inherently.
Another important benefit that accrues is the use of ASM for RAC database. ASM can very well avoid the use of Cluster File System as the ASM resources (disks and files) are sharable among the RAC instances and fits into the shared storage architecture.
Besides above advantages, there are other benefits that include:
- Ease of administration -- ASM removes the need to specify and manage filenames since ASM knows to place specific data files into specific disk groups. In ASM, every new file automatically gets a new unique name, which eliminates the concern about possibly using the same filename in two different databases.
- ASM replaces external volume managers and file systems. ASM includes storage reliability features, such as mirroring. The storage reliability policy is applied on a file basis, rather than on a volume basis. Hence, the same disk group can contain a combination of files protected by mirroring, parity, or not protected at all.
- ASM provides the performance of raw disk I/O without the problems of managing raw disks. Unlike logical volume managers, ASM maintenance operations do not require that the database be shut down.
Click to buy the book, "Oracle disk I/O tuning," by Mike Ault.
About the author
Mike Ault is a SearchOracle.com expert and a senior Oracle consultant with Burleson Consulting, and one of the leading names in Oracle technology. The author of more than 20 Oracle books and hundreds of articles in national publications, Mike Ault has five Oracle Masters Certificates and was the first popular Oracle author with his landmark book "Oracle7 administration and management." Mike also wrote several of the "Exam Cram" books, and enjoys a reputation as a leading author and Oracle consultant. Ask Mike a question today!
This was first published in September 2004