General / Documentos / Soporte Técnico / Servicios / Tilsor


Creation Date: 25-JUL-1995
Last Revision Date: 26-MAR-2000


This document gives a general overview of RAID (Redundant Arrays of
Inexpensive Disks), the different levels of RAID and their uses, and the use
of RAID with Oracle databases.

1. RAID - General Description

RAID (Redundant Arrays of Inexpensive Disks) is frequently used to provide
data redundancy in case of disk failure and involves, in part, striping of
data across several physical drives. RAID can be implemented in any one of
several levels, ranging from 0 to 6. Those levels are characterized by the

RAID 0: This is a 'normal' file system, in which there will be data loss
with any disk failure. This level provides good performance
and speed of access but no data redundancy. If something on the
disk becomes corrupted, there is no way to restore or recalculate
that data.

RAID 1: Full data redundancy is provided by complete mirroring of all files.
This method requires twice as much disk space as there is data. No
error correction codes (ECC's) are used, and there is hence no parity
information involved.

RAID 2: Redundancy is provided through ECC's (also sometimes called parity),
which are calculated for each 'chunk' of data. These ECC's can be used
to recreate the data in question and so this method requires less disk
space that RAID level 1. However, the need to calculate ECC's will
generally make writes slower.

RAID 3: ECC's are again calculated to provide data redundancy, but all the
parity bytes are stored on one physical disk with bit level parity.

RAID 4: The same as RAID level 3 but with block level parity.

RAID 5: Redundancy is provided by ECC's as in RAID 3 and 4, but in this case,
parity information is stored along with the data and is hence stripped
across several physical disks. RAID 5 should not be used for
write-intensive files, since the continuous calculation of ECC's makes
writing data to disk slower. RAID 3 should be used instead. RAID 5
works best for read-only data files.

RAID 6: ECC's are calculated in a more complex way, and redundancy is provided
with an advanced 2-dimensional parity.

Raid levels 1 and 5 are most commonly used. However, the choice of which
specific RAID level to choose and how to implement that choice can be
a complex question which must balance performance, cost, and data availability

2. Pro's and Cons of Implementing RAID technology

There are benefits and disadvantages to using RAID, and those depend on the
RAID level under consideration and the specific system in question.

In general, RAID level 1 is most useful for systems where complete redundancy
of data is a must and disk space is not an issue. For large datafiles or
systems with less disk space, this RAID level may not be feasible. Writes
under this level of RAID are no faster and no slower than 'usual'.

For all other levels of RAID, writes will tend to be slower and reads will be
faster than under 'normal' file systems. Writes will be slower the more
frequently ECC's are calculated and the more complex those ECC's are.
Depending on the ratio of reads to writes in your system, I/O speed may have a
net increase or a net decrease. RAID can improve performance by distributing
I/O, however, since the RAID controller spreads data over several physical
drives and therefore no single drive is overburdened.

The striping of data across physical drives has several consequences besides
balancing I/O. One additional advantage is that logical files may be created
which are larger that the maximum size usually supported by an operating
system. There are disadvantages, as well, however. Striping means that it is
no longer possible to locate a single datafile on a specific physical drive.
This may cause the loss of some application tuning capabilities. Also, in
Oracle's case, it can cause database recovery to be more time-consuming. If a
single physical disk in a RAID array needs recovery, all the disks which are
part of that logical RAID device must be involved in the recovery.

One additional note is that the storage of ECC's may require up to 20%
more disk space than would storage of data alone, so there is some disk
overhead involved with usage of RAID.

3. RAID and Oracle

The usage of RAID is transparent to Oracle. All the features specific to
RAID configuration are handled by the operating system and go on behind-
the-scenes as far as Oracle is concerned. Different Oracle file-types
are suited differently for RAID devices. Datafiles and archive logs can be
placed on RAID devices, since they are accessed randomly. Redo logs should be
not be put on RAID devices, since they are accessed sequentially and
performance is enhanced in their case by having the disk drive head near the
last write location. However, mirroring of redo log files is strongly
recommended by Oracle.


Online or archived redo log files can be put on RAID 1 devices.
You should not use RAID 5. 'TEMP' tablespace data files should also go on
RAID1 instead of RAID5 as well. The reason for this is that streamed
write performance of distributed parity (RAID5) isn't as good as that of
simple mirroring (RAID1).

Swap space can be used on RAID devices without affecting Oracle.

1. Oracle for Unix Performance Tuning Tips pp. 26-27 (A22535-1)
2. RAID: High-Performance, Reliable Secondary Storage (Chen, Peter etal, 1994) References