OVERVIEW OF RAID AND ORACLE
Last Revision Date: 26-MAR-2000
OF RAID AND ORACLE
document gives a general overview of RAID (Redundant Arrays of
Inexpensive Disks), the different levels of RAID and their uses, and the
of RAID with Oracle databases.
RAID - General Description
(Redundant Arrays of Inexpensive Disks) is frequently used to provide
data redundancy in case of disk failure and involves, in part, striping
data across several physical drives. RAID can be implemented in any one
several levels, ranging from 0 to 6. Those levels are characterized by
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
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
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.
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.
4: The same as RAID level 3 but with block level parity.
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.
6: ECC's are calculated in a more complex way, and redundancy is provided
with an advanced 2-dimensional parity.
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
are benefits and disadvantages to using RAID, and those depend on the
RAID level under consideration and the specific system in question.
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
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'.
all other levels of RAID, writes will tend to be slower and reads will
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
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.
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
no longer possible to locate a single datafile on a specific physical
This may cause the loss of some application tuning capabilities. Also,
Oracle's case, it can cause database recovery to be more time-consuming.
single physical disk in a RAID array needs recovery, all the disks which
part of that logical RAID device must be involved in the recovery.
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
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
placed on RAID devices, since they are accessed randomly. Redo logs should
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
last write location. However, mirroring of redo log files is strongly
recommended by Oracle.
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
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
simple mirroring (RAID1).
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,