3 4
To properly configure and tune your RAID system, you must understand the performance differences between the various RAID levels, which the previous section outlined. By understanding how the RAID system works and how it performs under various conditions, you will be able to tune your I/O subsystem better. This section will compare in detail the various performance characteristics that you have seen in the previous section.
The RAID level you choose will not significantly affect read performance. When read operations are performed on a RAID volume, each drive contributes to the volume's performance. Because random I/O operations are typically the most problematic, they will be covered here. You can maximize sequential performance by isolating the sequential I/O operations on their own volume. Let's look at random-read performance under the various RAID levels:
As you can see, calculating the read capacity of a RAID array is fairly straightforward. By adding enough disk drives to support your I/O requirements and staying within these limitations, you will optimize your system's performance.
The type of RAID controller you use will dramatically affect write performance. Again, because random I/O operations are typically the most problematic, they will be covered here. You can maximize sequential performance by isolating the sequential I/O operations on their own volume or volumes. Let's look at random-write performance under the various RAID levels.
As you can see, calculating the write capacity of a RAID array is a fairly complex operation. By adding enough disk drives to support your I/O requirements and staying within these limitations, you will optimize your system's performance. In the next section, you will see how to calculate the number of I/O operations per disk under various circumstances.
To determine how much load is being placed on the individual disk drives in the system, you must perform some calculations. If you are using a hardware RAID controller, the number of I/O operations per second that Performance Monitor displays is the number of I/O operations that are going to the array. Additional I/O operations that are generated by the controller for fault tolerance are not shown. In fact, Windows 2000 doesn't register that they are occurring, but you must be aware of them for determining the necessary number of disk drives required for optimal performance. The formulas in the following sections can help you determine how many I/O operations are actually going to each disk in the array.
The rate of I/O operations per disk drive in a RAID 0 array is calculated by adding up all the reads and writes to the array and dividing by the number of disks in the array. RAID 0 requires only the following simple and straightforward equation:
operations per disk = (reads + writes) / number of disks
With RAID 1, the calculation becomes a little more complicated. Because the number of writes is doubled, the number of I/O operations per disk per second is equal to the number of reads plus two times the number of writes, divided by the number of disk drives in the array (two for RAID 1). The equation is as follows:
operations per disk = (reads + (2 * writes)) / 2
RAID 1 is slower on writes but offers a high degree of fault tolerance.
RAID 5 offers fault tolerance but has a high level of overhead on writes. RAID 5 reads are distributed equally among the various disk drives in the array, but writes actually cause four physical I/O operations to occur. To calculate the number of I/O operations occurring on the individual disk drives, you must add the reads to four times the number of writes before dividing by the number of disk drives. Thus, the equation for RAID 5 is as follows:
operations per disk = (reads + (4 * number of writes)) / number of disks
RAID 10 is slow on writes, as is RAID 1, but RAID 10 offers a high degree of fault tolerance. The calculation for RAID 10 is the same as that for RAID 1. Because writes are doubled, the number of I/O operations per disk is equal to the number of reads plus two times the number of writes, divided by the number of disk drives in the array. The equation is as follows:
operations per disk = (reads + (2 * writes)) / number of disks
Let's compare the RAID levels directly. This might better help you to determine which RAID level is best for your system. When you compare I/O performance across RAID levels, one of the most important factors is the read-to-write ratio. The various RAID levels perform comparably when performing reads; only the write rates differ. You should also consider whether your system needs to be fault tolerant. Finally you should be aware of the various cost/space ratios. Table 5-3 summarizes the various RAID levels.
Table 5-3. RAID levels comparison
RAID Level | Performance | Fault Tolerance | Cost |
---|---|---|---|
RAID 0 | Best | No fault tolerance | Economical |
RAID 1 | Good | Good | Expensive |
RAID 5 | Fast reads,slow writes | OK | Most economical with fault tolerance |
RAID 10 | Good | Good | Expensive |
As you can see, your best choice really depends on your requirements. To see the difference between RAID 5 and RAID 10 at different read/write ratios, look at the following table. Table 5-4 represents 500 I/O operations per second across 10 disk drives with varying read/write ratios.
Table 5-4. RAID 5 and RAID 10 comparison
Read/Write Ratio | RAID 5 I/O Operations (Reads + (4 * Writes)) / Disks | RAID 10 I/O Operations (Reads + (2 * Writes)) / Disks |
---|---|---|
100% reads 0% writes | (500 + 0) / 10 50 I/O operations per disk | (500 + 0) / 10 50 I/O operations per disk |
90% reads 10% writes | (450 + 200) / 10 65 I/O operations per disk | (450 + 100) / 10 55 I/O operations per disk |
75% reads 25% writes | (375 + 500) / 10 87.5 I/O operations per disk | (375 + 250) / 10 62.5 I/O operations per disk |
50% reads 50% writes | (250 + 1000) / 10 125 I/O operations per disk | (250 + 500) / 10 75 I/O operations per disk |
0% reads 100% writes | (0 + 2000) / 10 200 I/O operations per disk | (0 + 1000) / 10 100 I/O operations per disk |
As you can see, at about 90 percent reads and 10 percent writes, the disk usage is about even. But for higher percentages of writes, RAID 5 requires much more overhead.