RAID 5 - PDS - Installation

Plant Design System (PDS) Project Setup Technical Reference

PPMProductFamily
3D Design and Visualization
PPMProduct
PDS
PPMCategory
Installation

RAID 5 combines the reliability of RAID 1 with many of the performance benefits of RAID 0. In RAID 5, a parity block is calculated. The parity data in combination with data on undamaged drives allows reconstruction of data on a failed drive. The figure below illustrates how RAID 5 organizes data on a three-disk stripe. The rule is that a data block and its corresponding parity information are never written to the same physical device.

In the example, if drive 1 fails, then block 1 can be reconstructed from the block 2 and the parity information for block 1&2. Similarly, block 3 would be reconstructed from block 4 and the parity for blocks 3&4. The parity block on drive 1 can be reconstructed from blocks 5 and 6. Read performance of a RAID 5 stripe is similar to RAID 0. In write operations, the performance is degraded when compared to RAID 0 for two reasons:

  1. More data is written. The controller (for systems using hardware RAID) or the operating system (for systems using software RAID) must calculate the parity block and write the data and parity block.

  2. If the data being written involves modifying a block on any of the disks, then that block has to be read in, merged with the new data, and rewritten to the drive along with its newly calculated parity information.

    RAID 5 is widely regarded as the best RAID level for database and file sharing operations in a multi-user environment. RAID 5 allows each disk to satisfy requests simultaneously.

Consider the following set of requests:

Application 1 requests block 1

Application 2 requests block 2

Application 3 requests block 4

Because each block is on a different physical device, the blocks can be read simultaneously.

Write performance of a RAID5 stripe depends on the size of the average write. There are three scenarios for a write operation:

  1. Operation replaces all the data blocks in a stripe, results in operations to:

    • Calculate parity block

    • Write data blocks

    • Write parity block

  2. Operation replaces a block of data in a stripe, results in operations to:

    • Read parity block

    • Calculate new parity block

    • Write data block

    • Write parity block

  3. Operation updates a block of data in a stripe, results in operations to:

    • Read block to be modified

    • Read associated parity block

    • Merge new data with old data

    • Calculate new parity block

    • Write data block

    • Write parity block

The mix of these three types of operations governs write performance. Under ideal conditions, a RAID5 stripe is never as good as RAID 0 for performance. Some of the overhead can be reduced by putting a large cache on the controller, allowing the controller more freedom in scheduling read and write operations. Even with a large cache, a RAID 5 stripe has poor write characteristics. Obviously RAID 5 requires more disk space than RAID 0 (but less than RAID 1). The overhead is:

For a RAID 5 stripe on three 1GB drives, the usable space is:

Which leaves 2GB of usable space. The space efficiency of a RAID 5 stripe increases as more physical drives are added to the stripe. This also improves performance.

The mechanism used to recover data in a RAID 5 array is simple, consider the following example:

0

1

0

1

1

0

1

1

Data 1

1

1

0

1

1

1

0

1

Data 2

1

0

0

0

0

1

1

0

Intermediate XOR

0

1

1

1

0

0

1

0

Data 3

1

1

1

1

0

1

0

0

Error Correction Code

If a drive fails so that Data 2 is no longer available, then it can be re-created from the using XOR as follows:

Data2 = ((ECC xor Data1) xor Data3)

0

1

0

1

1

0

1

1

Data 1

1

1

1

1

0

1

0

0

Error Correction Code

1

0

1

0

1

1

1

1

ECC xor Data 1

0

1

1

1

0

0

1

0

Data 3

1

1

0

1

1

1

0

1

Result=Data2

If a drive fails, then RAID 5 is forced to synchronize all the drives to read a missing block because all the data is required. Although RAID 5 continues to function with a failed drive, the performance for both read and write operations is reduced.