RAID Level Considerations

In order to protect a database from a drive failure, a SMART Array Controller volume may be configured with either RAID-1 or RAID-5. Compaq array controllers even allow RAID levels to be mixed on a single controller when system requirements need varying levels of performance and protection. As is usually the case, no single configuration fits all application scenarios. This discussion gives a system administrator and DBA the information needed to make an educated decision regarding the appropriate choice of RAID configurations depending on an application's specific characteristics.

Cost/Performance Trade-offs

In general RAID-5 provides a more cost effective solution compared to RAID-1, particularly when I/O performance requirements are well below the performance capabilities of the configured drives. The larger the capacity requirements the more pronounced the cost advantage becomes. For example, in a configuration which needs only 1GB a RAID-5 solution could be 3 550MB drives and the RAID-1 solution would be 2 1GB drives. There is very little difference between these two configurations' prices. However, if looking at a 14 GB system, RAID-5 could be done with 8 2GB drives as opposed to 14 2GB drives for the RAID-1 configuration.

Even though RAID-5 often has a cost advantage, RAID-1 has its own advantages for price/performance and increased fault-tolerance. If the application(s) using a database server have high I/O requirements, RAID-1 will provide significantly better performance at the same user capacity due to the increased number of drives. To increase the performance of the RAID-5 volume requires increasing the number of drives on the volume and therefore the capacity over what the application really needs. As will become evident from the examples in the next section, RAID-1 and RAID-5 may have the same price/performance costs on high I/O systems.

Another advantage of RAID-1 over RAID-5 is its ability to tolerate more than a single drive failure. This can occur and the server continue running as long as the multiple failed drives are not the pair mirroring each other. For example, if a RAID-1 volume consists of 4 drives mirrored to 4 drives, the first drive of the first set of drives could fail and before that drive is replaced any other drive, except for the first drive in the second set, could also fail and the system will continue to operate. In contrast, on a RAID-5 volume only a single drive can fail and if a second drive fails before the drive is replaced and recovered the data will be lost.

Failed State Considerations

Obviously, the only configurations where this is relevant is RAID-1 and RAID-5. The performance degradation for RAID-1 should be negligible since the only difference is that one less drive is available for read operations. However, under RAID-5 a more significant penalty may be incurred. The reason for the degradation is that for every read or write request to the failed drive, an I/O operation against all other drives in the volume is required. In most database systems the sustainable load will drop until the drive is replaced and the rebuild process is complete.

Recovery Time

Approximately 20 to 30 minutes per GB are required to recover from a drive failure if the system is idle. If the system is in use during the drive rebuild, recovery time may be very dependent on the level of activity. Most systems should recover in nearly the same time with moderate activity as with no load, particularly RAID-1. RAID-5 is much more sensitive to system load during the recovery period due to the considerably heavier I/O requirements of the failed system as described previously. Take this recovery time and failed-state performance into account when deciding between RAID-1 and RAID-5.