Introduction to RAID,part3

本文深入介绍了RAID技术的不同级别,包括RAID-4、RAID-5和RAID-6的特点与性能表现,并探讨了这些配置如何平衡数据冗余与读写性能。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

In this layout, data is written in block stripes to the first three disks (disks 0, 1, and 2) while the third drive (disk 3) is the parity drive. The parity of the blocks across the drives is computed by the RAID controller and stored on the dedicated parity drive. In the figure The parity for A1, A2, and A3 is listed as Ap on the parity drive.

 

The dedicated parity drive becomes a performance bottleneck in RAID-4, particularly for write I/O. Since RAID-4 has block level striping, you can write to blocks A1 and B2 at the same time since they are on different disks. However, the parity for both blocks has to be written to the same drive which can only accommodate a single write I/O request at a time. Consequently, one of the parity writes (A1 parity or B2 parity) is blocked and the write I/O performance is reduced. For more on the performance of RAID-4, please see this link .

The capacity of RAID-4 is the following:

Capacity = min(disk sizes) * (n-1)

meaning that the capacity of RAID-4 is limited by the smallest disk (you can use different size drives in RAID-4) multiplied by the number of drives n , minus one. The “minus one” part is because of the dedicated parity drive. However, it is recommended you use drives that are the same size in RAID-4.

 

RAID-4 improves on the redundancy of RAID-0, which has zero data redundancy, by adding a parity disk. You can lose one drive without losing data. For example you could lose the parity disk without losing data or you could lose one of the data disks without losing data. But the introduction of the single dedicated parity drive has reduced write performance relative to RAID-0. However, if the loss of write performance of RAID-4 is acceptable it does give you more data redundancy than RAID-0.

 

RAID-4 was the last RAID configuration defined in the original RAID paper. In the real-world, RAID-4 is rarely used because RAID-5 (see next sub-section) has replaced it.

Table 4 below is a quick summary of RAID-4 with a few highlights.

Table 4 - RAID-4 Highlights

Raid LevelProsConsStorage EfficiencyMinimum Number of disks
RAID-4

 


  • Good data redundancy/availability (can tolerate the lose of 1 drive)
  • Good read performance since all of the drives are read at the same time
  • Can lose one drive without losing data

 


  • Single parity disk (causes bottleneck)
  • Write performance is not that good because of the bottleneck of the parity drive

(n - 1) / n where n is the number of drives3 (have to be identical)

RAID-5
RAID-5 is similar to RAID-4 but now the parity is distributed across all of the drives instead of using a dedicated parity drive. This greatly improves write performance relative to RAID-4 since the parity is written on all of the drives in the RAID-5 array. Figure 5 below from wikipedia (image by Cburnett) illustrates how the data is written to four disks in RAID-5.

675px-RAID_5.svg.png
Figure 5: RAID-5 layout (from Cburnett at wikipedia under the GFDL license)

In this layout, the parity blocks are labeled with a subscript “p” to indicate parity. Notice how they are distributed across all four drives. The blocks that line up (one block per drive) are typically a “stripe”. In Figure 5 the blocks in a stripe are all the same color. The data stripe size is simply the following:

Data stripe size = block size * (n-1)

where n is the number of drives in the RAID-5 array. Inside a stripe there is a single parity block and all other blocks are data blocks. Anytime a block inside the stripe is changed or written to, the parity block is recomputed and rewritten (this is sometimes called the read-modify-write process). This process can add overhead reducing performance.

 

RAID-5 also has some write performance problems for small writes that are smaller than a single stripe since the parity needs to be computed several times which eats up computational capability of the RAID controller. As mentioned previously the read-modify-write process that must be followed happens much more often in this case.

The capacity of RAID-5 is very similar to RAID-4 and is the following:

Capacity = min(disk sizes) * (n-1)

meaning that the capacity of RAID-5 is limited by the smallest disk (you can use different size drives in RAID-5) multiplied by the number of drives n , minus one. The “minus one” part is because of the parity block per stripe.

 

With RAID-5 you can lose a single drive and not lose data because either the data or the parity for the missing blocks on the lost drive can be found on the remaining drives. In addition, many RAID controllers allow what is called a hot-spare drive. This drive is typically part of the RAID array but is initially not used for storing data. If the RAID group loses a drive, the hot-spare is immediately brought into the RAID group by the controller.

 

In the case of RAID-5, the controller immediately starts redistributing data and parity blocks to this new drive. To do this, the initial drives in the RAID-5 array have to have all blocks read and the RAID controller has to recompute parity or rebuild missing data blocks. This combination means that it can take quite a bit of time to fail-over data to the hot-spare drive. The nice thing about having a hot-spare drives is that typically the fail-over process happens automatically so there is almost no delay in incorporating the hot-spare drive.

 

RAID-5 has been used for a very long time and during this time the data availability and redundancy has been very good. However, there is a new phenomenon that impacts RAID-5 that has been explained in various article around the web such as this one . Basically the capacity of drives is growing quicker than the Unrecoverable Read Error (URE) rate of drives to the point where losing a drive in a RAID-5 array and recovering it to a hot-spare drive is almost guaranteed to lead to a URE which means that the RAID-5 array will be lost and the data has to be restored from a backup. However, this is the subject for another article.

 

There is no shortage of articles about RAID-5 on the web. You will see some strong opinions both for and against RAID-5 based on usage cases. Be sure to understand the application used when reading about both pros and cons of RAID-5. A reasonable overview of the trade-offs of RAID-5 is this article .

Table 5 below is a quick summary of RAID-5 with a few highlights.

Table 5 - RAID-5 Highlights

Raid LevelProsConsStorage EfficiencyMinimum Number of disks
RAID-5

 


  • Good data redundancy/availability (can tolerate the lose of 1 drive)
  • Very good read performance since all of the drives can be read at the same time
  • Write performance is adequate (better than RAID-4)
  • Can lose one drive without losing data

 


  • Write performance is adequate (better than RAID-4)
  • Write performance for small I/O is not good at all

(n - 1) / n where n is the number of drives3 (have to be identical)

RAID-6
As mentioned previously, there is a potential problem with RAID-5 for larger capacity drives and a larger number of them. RAID-6 attempts to help that situation by using two parity blocks per stripe instead of RAID-5’s single parity block. This allows you to lose two drives with losing any data. Figure 6 below from wikipedia (image by Cburnett) illustrates how the data is written to four disks in RAID-6.

800px-RAID_6.svg.png
Figure 6: RAID-6 layout (from Cburnett at wikipedia under the GFDL license)

In this figure, the first parity block is noted with as subscript “p” such as Ap . The second parity block in a stripe is noted with a subscript “q” such as Aq . The use of two parity blocks reduces the useable capacity of a RAID-6 as in the following:

Capacity = min(disk sizes) * (n-2)

meaning that the capacity of RAID-6 is limited by the smallest disk (you can use different size drives in RAID-6) multiplied by the number of drives n , minus two. The “minus two” part is because of the two parity blocks per stripe.

 

Computing the first parity block, p, is done in the same fashion as RAID-5. However, computing the q parity block is more complicated as explained here . This means that the write performance of a RAID-6 array can be slower than a RAID-5 array for a given level of RAID controller performance. However, read performance from a RAID-6 is just as fast as a RAID-5 array since reading the parity blocks is skipped. But in exchange for worse performance, RAID-6 arrays can tolerate the lose of two drives while RAID-5 can only tolerate the lose of a single drive. Coupled with larger drives and larger drive counts, this means that larger RAID-6 arrays can be constructed realtive to RAID-5 arrays.

Table 6 below is a quick summary of RAID-6 with a few highlights.

Table 6 - RAID-6 Highlights

Raid LevelProsConsStorage EfficiencyMinimum Number of disks
RAID-6

 


  • Excellent data redundancy/availability (can tolerate the lose of 2 drives)
  • Very good read performance since all of the drives can be read at the same time
  • Can lose two drives without losing data

 


  • Write performance is not that good - worse than RAID-5
  • Write performance for small I/O is not good at all
  • more computational horsepower is required for parity computations

(n - 2) / n where n is the number of drives4 (have to be identical)

 

Hybrid RAID Levels

 

As you can see, there are some limitations to each of the standard RAID levels (0-6). Some of the them have great performance (RAID-0) but pretty awful data availability or redundancy while others have very good data availability and redundancy (RAID-6) but the performance is not so hot. So as you can imagine, people started to wonder if they couldn’t combine RAID levels to combine features to perhaps achieve better performance while still having very good data redundancy and availability. This lead to what people called Hybrid RAID Levels or what is more commonly called Nested RAID levels .

 

The topic of Nested RAID levels is fairly lengthy so I will save that for another article. But the basic concept is to combine RAID levels in some fashion. For example, a common configuration is called RAID 1+0 or RAID-10. The first number (the furthest to the left) refers to the “bottom” or initial part of the RAID array. Then the second number from the left refers to the “top” level or the RAID array. The top level RAID uses the bottom level RAID configurations as building blocks.

 

In the case of RAID-10, the approach is to use multiple pairs of drives at the lowest level (RAID-1) and then to combine them using RIAD-0. This retains the goodness of RAID-1 for data availability and redundancy while gaining back some performance from RAID-0 striping.

 

Summary

This wraps our introduction to RAID. For some people it may be new and for many it will be review. Now that we’ve covered the basics, in coming articles we will be exploring Nested-RAID more in depth, including RAID-01 RAID-5, RAID-6 and RAID-10 configurations.

Have questions about RAID or topics you’d liked to see covered? Post them in the comments and we’ll try to incoorporate them as deep dive into redundant arrays.

内容概要:本文档详细介绍了Analog Devices公司生产的AD8436真均方根-直流(RMS-to-DC)转换器的技术细节及其应用场景。AD8436由三个独立模块构成:轨到轨FET输入放大器、高动态范围均方根计算内核和精密轨到轨输出放大器。该器件不仅体积小巧、功耗低,而且具有广泛的输入电压范围和快速响应特性。文档涵盖了AD8436的工作原理、配置选项、外部组件选择(如电容)、增益调节、单电源供电、电流互感器配置、接地故障检测、三相电源监测等方面的内容。此外,还特别强调了PCB设计注意事项和误差源分析,旨在帮助工程师更好地理解和应用这款高性能的RMS-DC转换器。 适合人群:从事模拟电路设计的专业工程师和技术人员,尤其是那些需要精确测量交流电信号均方根值的应用开发者。 使用场景及目标:①用于工业自动化、医疗设备、电力监控等领域,实现对交流电压或电流的精准测量;②适用于手持式数字万用表及其他便携式仪器仪表,提供高效的单电源解决方案;③在电流互感器配置中,用于检测微小的电流变化,保障电气安全;④应用于三相电力系统监控,优化建立时间和转换精度。 其他说明:为了确保最佳性能,文档推荐使用高质量的电容器件,并给出了详细的PCB布局指导。同时提醒用户关注电介质吸收和泄漏电流等因素对测量准确性的影响。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值