How to set up smartphones and PCs. Informational portal
  • home
  • Mistakes
  • What are RAID arrays and why are they needed. RAID array

What are RAID arrays and why are they needed. RAID array

Now let's see what types there are and how they differ.

UC Berkeley introduced the following levels of the RAID specification, which have been adopted as the de facto standard:

  • RAID 0- high-performance disk array with striping, without fault tolerance;
  • - mirror disk array;
  • RAID 2 reserved for arrays that use Hamming code;
  • RAID 3 and 4- disk arrays with striping and a dedicated parity disk;
  • - disk array with striping and "unallocated parity disk";
  • - striped disk array using two checksums calculated in two independent ways;
  • - RAID 0 array built from RAID 1 arrays;
  • - RAID 0 array built from RAID 5 arrays;
  • - a RAID 0 array built from RAID 6 arrays.

A hardware RAID controller can support several different RAID arrays at the same time, the total number of hard drives of which does not exceed the number of slots for them. At the same time, the controller built into the motherboard has only two states in the BIOS settings (enabled or disabled), so a new hard drive connected to an unused controller slot with RAID mode enabled can be ignored by the system until it is associated as another RAID -array of type JBOD (spanned), consisting of one disk.

RAID 0 (striping - "alternating")

The mode that maximizes performance. The data is evenly distributed across the disks of the array, the disks are combined into one, which can be divided into several. Distributed read and write operations allow you to significantly increase the speed of work, since several disks simultaneously read / write their portion of data. The entire volume of disks is available to the user, but this reduces the reliability of data storage, since if one of the disks fails, the array is usually destroyed and it is almost impossible to restore data. Scope - applications that require high speeds of disk exchange, such as video capture, video editing. Recommended for use with high reliability drives.

(mirroring - "mirroring")

an array of two disks that are full copies of each other. Not to be confused with RAID 1+0, RAID 0+1, and RAID 10 arrays, which use more than two drives and more sophisticated mirroring mechanisms.

Provides an acceptable write speed and a gain in read speed when parallelizing queries.

It has high reliability - it works as long as at least one disk in the array is functioning. The probability of failure of two disks at once is equal to the product of the probabilities of failure of each disk, i.e. significantly lower than the probability of failure of a single drive. In practice, if one of the disks fails, urgent measures should be taken - redundancy should be restored again. To do this, with any RAID level (except zero), it is recommended to use hot spare disks.

Similar to RAID10, a variant of data distribution across disks, allowing the use of an odd number of disks (the minimum number is 3)

RAID 2, 3, 4

various options for distributed storage with disks allocated for parity codes and various block sizes. Currently, they are practically not used due to low performance and the need to allocate a lot of disk space for storing ECC and/or parity codes.

The main disadvantage of RAID levels 2 to 4 is the inability to perform parallel write operations, since a separate parity disk is used to store parity information. RAID 5 does not have this disadvantage. Data blocks and checksums are cyclically written to all disks in the array, there is no asymmetry in disk configuration. Checksums are the result of an XOR operation (exclusive or). Xor has a feature that makes it possible to replace any operand with the result, and, using the algorithm xor, get the missing operand as a result. For example: a xor b = c(where a, b, c- three disks of the raid array), if a refuses, we can get him by putting him in his place c and having spent xor between c and b: xor b = a. This applies regardless of the number of operands: a xor b xor c xor d = e. If it fails c then e takes his place and xor as a result we get c: a xor b xor e xor d = c. This method essentially provides version 5 fault tolerance. It only takes 1 disk to store the xor result, the size of which is equal to the size of any other disk in the raid.

Advantages

RAID5 has become widespread, primarily due to its cost-effectiveness. The size of a RAID5 disk array is calculated using the formula (n-1)*hddsize, where n is the number of disks in the array and hddsize is the size of the smallest disk. For example, for an array of four 80 GB disks, the total volume will be (4 - 1) * 80 = 240 GB. Additional resources are spent on writing information to a RAID 5 volume and performance drops, since additional calculations and write operations are required, but when reading (compared to a separate hard drive), there is a gain, because data streams from several array disks can be processed in parallel.

Flaws

The performance of RAID 5 is noticeably lower, especially on Random Write operations (writes in random order), in which performance drops by 10-25% from the performance of RAID 0 (or RAID 10), since it requires more disk operations (each operation writes, with the exception of the so-called full-stripe writes, the server is replaced on the RAID controller by four - two reads and two writes). The disadvantages of RAID 5 appear when one of the disks fails - the entire volume goes into critical mode (degrade), all write and read operations are accompanied by additional manipulations, performance drops sharply. In this case, the reliability level is reduced to the reliability of RAID-0 with the appropriate number of disks (that is, n times lower than the reliability of a single disk). If a failure occurs before the array is completely restored, or an unrecoverable read error occurs on at least one more disk, then the array is destroyed, and the data on it cannot be restored by conventional methods. It should also be taken into account that the process of RAID Reconstruction (recovery of RAID data due to redundancy) after a disk failure causes an intensive read load from disks for many hours continuously, which can cause any of the remaining disks to fail in this least protected period of RAID operation, as well as to detect previously undetected read failures in cold data arrays (data that is not accessed during normal operation of the array, archived and inactive data), which increases the risk of failure during data recovery.

The minimum number of used disks is three.

RAID 6 - similar to RAID 5, but has a higher degree of reliability - the capacity of 2 disks is allocated for checksums, 2 sums are calculated using different algorithms. Requires a more powerful RAID controller. Provides operability after simultaneous failure of two disks - protection against multiple failure. A minimum of 4 disks is required to organize an array. Typically, using RAID-6 causes about a 10-15% drop in disk group performance compared to RAID 5, which is caused by a large amount of processing for the controller (the need to calculate a second checksum, and read and overwrite more disk blocks when each block is written).

RAID 0+1

RAID 0+1 can basically mean two options:

  • two RAID 0s are merged into RAID 1;
  • three or more disks are combined into an array, and each data block is written to two disks of this array; thus, with this approach, as in "pure" RAID 1, the useful volume of the array is half of the total volume of all disks (if these are disks of the same capacity).

RAID 10 (1+0)

RAID 10 is a mirrored array in which data is written sequentially to several disks, as in RAID 0. This architecture is a RAID 0 type array, the segments of which are RAID 1 arrays instead of individual disks. Accordingly, an array of this level must contain at least 4 disks ( and always an even number). RAID 10 combines high fault tolerance and performance.

The claim that RAID 10 is the most reliable option for data storage is justified by the fact that the array will be taken out of service after the failure of all drives in the same array. With one drive failing, the chance of failure of the second one in the same array is 1/3*100=33%. RAID 0+1 will fail if two drives fail in different arrays. The chance of failure of a drive in a neighboring array is 2/3*100=66%, however, since a drive in an array with an already failed drive is no longer used, the chance that the next drive will disable the entire array is 2/2 *100=100%

an array similar to RAID5, but in addition to distributed storage of parity codes, the distribution of spare areas is used - in fact, a hard drive is used, which can be added to a RAID5 array as a spare (such arrays are called 5+ or 5+spare). In a RAID 5 array, the spare drive is idle until one of the main hard drives fails, while in a RAID 5EE array, this drive is shared with the rest of the HDD all the time, which positively affects the performance of the array. For example, a RAID5EE array of 5 HDDs can perform 25% more I/O operations per second than a RAID5 array of 4 primary and one spare HDD. The minimum number of disks for such an array is 4.

combining two (or more, but this is extremely rarely used) RAID5 arrays into a stripe, i.e. a combination of RAID5 and RAID0, partially correcting the main disadvantage of RAID5 - low data write speed due to the parallel use of several such arrays. The total capacity of the array is reduced by the capacity of two drives, but unlike RAID6, it can only tolerate a single drive failure without data loss, and the minimum number of drives required to create a RAID50 array is 6. Along with RAID10, this is the most recommended RAID level to use. in applications where high performance combined with acceptable reliability is required.

merging two RAID6 arrays into a stripe. The write speed is approximately double that of the write speed in RAID6. The minimum number of disks to create such an array is 8. Information is not lost if two disks from each RAID 6 array fail.

RAID- an abbreviation that stands for Redundant Array of Independent Disks - “a fault-tolerant array of independent disks” (previously, the word Inexpensive was sometimes used instead of Independent). The concept of a structure consisting of several disks grouped together to provide fault tolerance was born in 1987 in the seminal work of Patterson, Gibson, and Katz.

Native RAID Types

RAID-0
If we think that RAID is "fault tolerance" (Redundant ...), then RAID-0 is "zero fault tolerance", its absence. The RAID-0 structure is a "striped disk array". Data blocks are written one by one to all disks included in the array, in order. This improves performance, ideally by as much as the number of disks in the array, since writes are parallelized across multiple devices.
However, reliability is reduced by the same factor, since data will be lost if any of the drives in the array fails.

RAID-1
This is the so-called "mirror". Write operations are performed on two disks in parallel. The reliability of such an array is higher than that of a single drive, but the performance increase is insignificant (or not at all).

RAID-10
An attempt to combine the advantages of the two types of RAID and deprive them of their inherent disadvantages. If we take a RAID-0 group with increased performance, and give each of them (or the entire array) “mirror” disks to protect data from loss due to failure, we get a fault-tolerant array with increased performance as a result of using striping.
It is one of the most popular RAID types in the wild today.
Cons - we pay for all the above advantages with half the total capacity of the disks included in the array.

RAID-2
Remained entirely theoretical. This is an array in which data is encoded with an error-correcting Hamming code, which makes it possible to recover individual faulty fragments due to its redundancy. By the way, various modifications of the Hamming code, as well as its successors, are used in the process of reading data from the magnetic heads of hard drives and optical CD / DVD readers.

RAID 3 and 4
“Creative development” of the idea of ​​data protection by redundant code. The Hamming code is indispensable in the case of a “constantly unreliable” stream saturated with continuous, poorly predictable errors, such as, for example, a noisy terrestrial communication channel. However, in the case of hard disks, the main problem is not read errors (we assume that the data is given out by hard disks in the form in which we wrote them, if it works), but the failure of the entire disk.
For such conditions, you can combine a striped scheme (RAID-0) and, to protect against the failure of one of the disks, supplement the recorded information with redundancy, which will allow you to restore data if some part of it is lost, allocating an additional disk for this.
If any of the data disks is lost, we can recover the data stored on it by simple mathematical operations on redundancy data; in the event of a disk failure with redundancy data, we still have data read from a RAID-0 disk array.
Variants of RAID-3 and RAID-4 differ in that in the first case, individual bytes are interleaved, and in the second - groups of bytes, “blocks”.
The main disadvantage of these two schemes is the extremely low speed of writing to the array, since each write operation causes an update of the “checksum”, a redundancy block for the written information. Obviously, despite the striped structure, the performance of a RAID-3 and RAID-4 array is limited by the performance of a single disk, the one on which the “redundancy block” lies.

RAID-5
An attempt to circumvent this limitation gave rise to the next type of RAID, which is currently the most widely used, along with RAID-10. If writing a “redundancy block” to disk limits the entire array, let's also spread it across the disks of the array, make an unallocated disk for this information, thereby redundancy update operations will be distributed across all disks of the array. That is, as in the case of RAID-3 (4), we take disks for storing N information in the amount of N + 1 disk, but unlike Type 3 and 4, this disk is also used to store data mixed with redundancy data, like the rest N.
Flaws? And what about without them. The problem with slow recording was partly solved, but still not completely. However, writing to a RAID-5 array is slower than writing to a RAID-10 array. But RAID-5 is more “cost effective”. For RAID-10, we pay exactly half of the disks for fault tolerance, and in the case of RAID-5, this is just one disk.

However, the write speed decreases in proportion to the increase in the number of disks in the array (unlike RAID-0, where it only grows). This is due to the fact that when writing a data block, the array needs to recalculate the redundancy block, for which it reads the remaining “horizontal” blocks and recalculates the redundancy block in accordance with their data. That is, for one write operation, an array of 8 disks (7 data disks + 1 additional) will do 6 reads to the cache (the remaining data blocks from all disks to calculate the redundancy block), calculate the redundancy block from these blocks, and make 2 writes (writing a block of data to be written and overwriting a block of redundancy). In modern systems, some of the edge is taken off by caching, but nevertheless, the lengthening of the RAID-5 group, although it causes a proportional increase in read speed, but also a corresponding decrease in write speed.
The situation with the decrease in performance when writing to RAID-5 sometimes gives rise to curious extremism, for example, http://www.baarf.com/ ;)

However, since RAID-5 is the most efficient RAID structure in terms of disk consumption per megabyte, it is widely used where write speed reduction is not a decisive parameter, for example, for long-term data storage or for data that is predominantly read.
Separately, it should be mentioned that expanding a RAID-5 disk array by adding an additional disk causes a complete recalculation of the entire RAID, which can take hours, and in some cases days, during which the performance of the array drops catastrophically.

RAID-6
Further development of the RAID-5 idea. If we calculate the additional redundancy according to a law other than that used in RAID-5, then we will be able to maintain access to data if two disks in the array fail.
The price for this is an additional disk for the data of the second “redundancy block”. That is, to store data equal to the volume of N disks, we will need to take N + 2 disks. The “mathematics” of calculating redundancy blocks becomes more complicated, which causes an even greater decrease in write speed compared to RAID-5, but reliability increases. And in some cases it even exceeds the reliability level of RAID-10. It is easy to see that RAID-10 also withstands the failure of two disks in an array, however, if these disks belong to the same “mirror” or different, but not two mirrored disks. And the likelihood of just such a situation cannot be discounted.

A further increase in the numbers of RAID types occurs due to “hybridization”, so there are RAID-0 + 1, which has already been considered RAID-10, or all kinds of chimerical RAID-51, and so on.
Fortunately, they do not occur in wildlife, usually remaining a “sleep of the mind” (well, except for the RAID-10 already described above).

All modern motherboards are equipped with an integrated RAID controller, and top models even have several integrated RAID controllers. How much integrated RAID controllers are in demand by home users is a separate question. In any case, a modern motherboard provides the user with the ability to create a RAID array from several disks. However, not every home user knows how to create a RAID array, what array level to choose, and generally has a poor idea of ​​the pros and cons of using RAID arrays.
In this article, we'll give you a quick guide to creating RAID arrays on home PCs and use a specific example to show you how you can test the performance of a RAID array yourself.

History of creation

The term “RAID array” first appeared in 1987, when American researchers Patterson, Gibson and Katz from the University of California, Berkeley, in their article “A Case for Redundant Arrays of Inexpensive Discs, RAID”) described how In this way, you can combine several cheap hard drives into a single logical device so that the result is increased system capacity and speed, and the failure of individual drives does not lead to the failure of the entire system.

More than 20 years have passed since the publication of this article, but the technology for building RAID arrays has not lost its relevance today. The only thing that has changed since then is the decoding of the acronym RAID. The fact is that initially RAID arrays were not built on cheap disks at all, so the word Inexpensive (inexpensive) was changed to Independent (independent), which was more true.

Operating principle

So, RAID is a redundant array of independent disks (Redundant Arrays of Independent Discs), which is entrusted with the task of providing fault tolerance and improving performance. Fault tolerance is achieved through redundancy. That is, part of the disk space capacity is allocated for service purposes, becoming inaccessible to the user.

The increase in performance of the disk subsystem is provided by the simultaneous operation of several disks, and in this sense, the more disks in the array (up to a certain limit), the better.

Drives in an array can be shared using either parallel or independent access. With parallel access, disk space is divided into blocks (stripes) for data recording. Similarly, information to be written to disk is divided into the same blocks. When writing, individual blocks are written to different disks, and several blocks are written to different disks at the same time, which leads to an increase in performance in write operations. The necessary information is also read in separate blocks simultaneously from several disks, which also contributes to performance growth in proportion to the number of disks in the array.

It should be noted that the parallel access model is implemented only under the condition that the size of the data write request is larger than the size of the block itself. Otherwise, it is practically impossible to write several blocks in parallel. Imagine a situation where the size of a single block is 8 KB, and the size of a data write request is 64 KB. In this case, the source information is cut into eight blocks of 8 KB each. If there is an array of four disks, then four blocks, or 32 KB, can be written at the same time at a time. Obviously, in this example, the write speed and read speed will be four times higher than when using a single disk. This is true only for an ideal situation, however, the request size is not always a multiple of the block size and the number of disks in the array.

If the size of the recorded data is less than the block size, then a fundamentally different model is implemented - independent access. Moreover, this model can also be used when the size of the data to be written is larger than the size of one block. With independent access, all data of a particular request is written to a separate disk, that is, the situation is identical to working with a single disk. The advantage of the independent access model is that if multiple write (read) requests arrive at the same time, they will all be executed on separate disks independently of each other. This situation is typical, for example, for servers.

In accordance with different types of access, there are different types of RAID arrays, which are usually characterized by RAID levels. In addition to the type of access, RAID levels differ in the way in which redundant information is placed and formed. Redundant information can either be placed on a dedicated disk or distributed across all disks. There are many ways to generate this information. The simplest of these is full duplication (100 percent redundancy), or mirroring. In addition, error correction codes are used, as well as parity calculation.

RAID levels

Currently, there are several RAID levels that can be considered standardized, they are RAID 0, RAID 1, RAID 2, RAID 3, RAID 4, RAID 5 and RAID 6.

Various combinations of RAID levels are also used, which allows you to combine their advantages. This is usually a combination of some kind of fault-tolerant layer and a zero level used to improve performance (RAID 1+0, RAID 0+1, RAID 50).

Note that all modern RAID controllers support the JBOD (Just a Bench Of Disks) function, which is not intended for creating arrays - it provides the ability to connect individual disks to the RAID controller.

It should be noted that the RAID controllers integrated on motherboards for home PCs do not support all RAID levels. Dual-port RAID controllers only support levels 0 and 1, while RAID controllers with a large number of ports (for example, the 6-port RAID controller integrated into the southbridge of the ICH9R/ICH10R chipset) also support levels 10 and 5.

In addition, if we talk about motherboards based on Intel chipsets, they also implement the Intel Matrix RAID function, which allows you to create RAID matrices of several levels on several hard drives at the same time, allocating a part of the disk space for each of them.

RAID 0

RAID level 0, strictly speaking, is not a redundant array and, accordingly, does not provide data storage reliability. Nevertheless, this level is actively used in cases where it is necessary to ensure high performance of the disk subsystem. When creating a RAID level 0 array, information is divided into blocks (sometimes these blocks are called stripes), which are written to separate disks, that is, a system with parallel access is created (if, of course, the block size allows it). With the ability to concurrent I/O from multiple drives, RAID 0 provides the fastest data transfer speeds and the most efficient use of disk space because no space is required to store checksums. The implementation of this level is very simple. RAID 0 is mainly used in areas where fast transfer of large amounts of data is required.

RAID 1 (Mirrored disk)

RAID level 1 is a two-disk array with 100 percent redundancy. That is, the data is simply completely duplicated (mirrored), due to which a very high level of reliability (as well as cost) is achieved. Note that layer 1 implementation does not require prior partitioning of disks and data into blocks. In the simplest case, two drives contain the same information and are one logical drive. When one disk fails, another one performs its functions (which is absolutely transparent to the user). Restoring an array is done by simple copying. In addition, this level doubles the speed of reading information, since this operation can be performed simultaneously from two disks. Such a scheme for storing information is used mainly in cases where the price of data security is much higher than the cost of implementing a storage system.

RAID 5

RAID 5 is a fault-tolerant disk array with distributed checksum storage. When writing, the data stream is divided into blocks (stripes) at the byte level and simultaneously written to all disks in the array in a cyclic order.

Suppose the array contains n disks, and the stripe size d. For each portion of n–1 stripes checksum is calculated p.

Stripe d1 recorded on the first disc, stripe d2- on the second and so on up to the stripe d n–1, which is written to ( n–1)th disk. Next on n th disk write checksum p n, and the process is repeated cyclically from the first disk on which the stripe is written d n.

Recording process (n–1) stripes and their checksum is produced simultaneously for all n disks.

To calculate the checksum, a bitwise XOR operation is used on the data blocks being written. Yes, if there is n hard drives, d- data block (stripe), then the checksum is calculated by the following formula:

p n = d 1 d2 ... d 1–1 .

In the event of a failure of any disk, the data on it can be recovered from the control data and from the data remaining on healthy disks.

As an illustration, consider blocks of four bits. Suppose there are only five disks for storing data and writing checksums. If there is a sequence of bits 1101 0011 1100 1011, divided into blocks of four bits, then the following bitwise operation must be performed to calculate the checksum:

1101 0011 1100 1011 = 1001.

Thus, the checksum written to disk 5 is 1001.

If one of the disks, for example the fourth one, fails, then the block d4= 1100 will be unreadable. However, its value can be easily restored from the checksum and from the values ​​of the remaining blocks using the same XOR operation:

d4 = d1 d2d4p 5 .

In our example, we get:

d4 = (1101) (0011) (1100) (1011) = 1001.

In the case of RAID 5, all disks in the array are the same size, but the total capacity of the disk subsystem available for writing is reduced by exactly one disk. For example, if five disks are 100 GB, then the actual size of the array is 400 GB because 100 GB is allotted for parity information.

RAID 5 can be built on three or more hard drives. As the number of hard drives in an array increases, redundancy decreases.

RAID 5 has an independent access architecture that allows multiple reads or writes to be performed simultaneously.

RAID 10

RAID 10 is a combination of levels 0 and 1. The minimum requirement for this level is four drives. In a RAID 10 array of four drives, they are combined in pairs into level 0 arrays, and both of these arrays are combined as logical drives into a level 1 array. Another approach is also possible: initially, the disks are combined into mirrored level 1 arrays, and then logical drives based on these arrays - to a level 0 array.

Intel Matrix RAID

The considered RAID arrays of levels 5 and 1 are rarely used at home, which is primarily due to the high cost of such solutions. Most often for home PCs, it is a level 0 array on two disks that is used. As we have already noted, RAID level 0 does not provide storage security, and therefore end users are faced with a choice: create a fast, but not reliable RAID level 0 array, or, doubling the cost of disk space, - RAID- a level 1 array that provides data storage reliability, but does not provide a significant performance gain.

To solve this difficult problem, Intel has developed Intel Matrix Storage Technology, which combines the benefits of Tier 0 and Tier 1 arrays on just two physical drives. And in order to emphasize that in this case we are talking not just about a RAID array, but about an array that combines both physical and logical disks, the word “matrix” is used in the name of the technology instead of the word “array”.

So, what is a two-disk RAID matrix based on Intel Matrix Storage Technology? The basic idea is that if a system has multiple hard drives and a motherboard with an Intel chipset that supports Intel Matrix Storage Technology, it is possible to divide the disk space into several parts, each of which will function as a separate RAID array.

Consider a simple example of a RAID array of two 120 GB disks. Any of the disks can be divided into two logical disks, for example, 40 and 80 GB each. Next, two logical drives of the same size (for example, 40 GB each) can be combined into a RAID level 1 matrix, and the remaining logical drives into a RAID level 0 matrix.

In principle, using two physical disks, it is also possible to create only one or two level 0 RAID matrices, but it is impossible to obtain only level 1 matrices. That is, if the system has only two disks, then Intel Matrix Storage technology allows you to create the following types of RAID matrices:

  • one level 0 matrix;
  • two matrices of level 0;
  • level 0 matrix and level 1 matrix.

If three hard drives are installed in the system, then the following types of RAID matrices can be created:

  • one level 0 matrix;
  • one level 5 matrix;
  • two matrices of level 0;
  • two level 5 matrices;
  • level 0 matrix and level 5 matrix.

If four hard drives are installed in the system, then it is additionally possible to create a RAID matrix of level 10, as well as combinations of level 10 and level 0 or 5.

From theory to practice

If we talk about home computers, then the most popular and popular are RAID arrays of levels 0 and 1. The use of RAID arrays of three or more disks in home PCs is rather an exception to the rule. This is due to the fact that, on the one hand, the cost of RAID arrays increases in proportion to the number of disks involved in it, and on the other hand, for home computers, the capacity of the disk array is of paramount importance, and not its performance and reliability.

Therefore, in the following, we will consider RAID arrays of levels 0 and 1 based on only two disks. The purpose of our study will be to compare the performance and functionality of RAID 0 and 1 arrays based on several integrated RAID controllers, as well as to study the dependence of the speed characteristics of a RAID array on the stripe size.

The fact is that although theoretically, when using a RAID 0 array, the read and write speed should double, in practice, the increase in speed characteristics is much less modest and is different for different RAID controllers. The same is true for a RAID level 1 array: despite the fact that in theory the read speed should double, in practice everything is not so smooth.

For our comparative testing of RAID controllers, we used a Gigabyte GA-EX58A-UD7 motherboard. This board is based on the Intel X58 Express chipset with the ICH10R southbridge, which has an integrated six-port SATA II RAID controller that supports RAID levels 0, 1, 10 and 5 with the Intel Matrix RAID function. In addition, the GIGABYTE SATA2 RAID controller is integrated on the Gigabyte GA-EX58A-UD7 board, based on which two SATA II ports are implemented with the ability to organize RAID arrays of levels 0, 1 and JBOD.

The GA-EX58A-UD7 board also integrates the Marvell 9128 SATA III controller, based on which two SATA III ports are implemented with the ability to organize RAID arrays of levels 0, 1 and JBOD.

Thus, the Gigabyte GA-EX58A-UD7 board has three separate RAID controllers, on the basis of which you can create RAID arrays of levels 0 and 1 and compare them with each other. Recall that the SATA III standard is backwards compatible with the SATA II standard, so based on the Marvell 9128 controller that supports SATA III drives, you can also create RAID arrays using SATA II drives.

The test stand had the following configuration:

  • processor - Intel Core i7-965 Extreme Edition;
  • motherboard - Gigabyte GA-EX58A-UD7;
  • BIOS version - F2a;
  • hard drives - two Western Digital WD1002FBYS drives, one Western Digital WD3200AAKS drive;
  • integrated RAID controllers:
  • ICH10R,
  • GIGABYTE SATA2,
  • Marvell 9128;
  • memory - DDR3-1066;
  • memory size - 3 GB (three modules of 1024 MB each);
  • memory operation mode - DDR3-1333, three-channel operation mode;
  • video card - Gigabyte GeForce GTS295;
  • power supply - Tagan 1300W.

Testing was carried out under the operating system Microsoft Windows 7 Ultimate (32-bit). The operating system was installed on a Western Digital WD3200AAKS disk, which was connected to the SATA II controller port integrated into the ICH10R south bridge. The RAID array was assembled on two WD1002FBYS disks with SATA II interface.

To measure the speed characteristics of the created RAID arrays, we used the IOmeter utility, which is an industry standard for measuring the performance of disk systems.

IOmeter utility

Since we conceived this article as a kind of user guide for creating and testing RAID arrays, it would be logical to start with a description of the IOmeter (Input / Output meter) utility, which, as we have already noted, is a kind of industry standard for measuring the performance of disk systems. This utility is free and can be downloaded from http://www.iometer.org.

The IOmeter utility is a synthetic test and allows you to work with hard drives that are not partitioned into logical partitions, so you can test drives regardless of the file structure and reduce the influence of the operating system to zero.

When testing, it is possible to create a specific access model, or "pattern", which allows you to specify the performance of specific operations by the hard disk. In the case of creating a specific access model, it is allowed to change the following parameters:

  • the size of the data transfer request;
  • random/sequential distribution (in %);
  • distribution of read/write operations (in %);
  • the number of individual I/O operations running in parallel.

The IOmeter utility does not require installation on a computer and consists of two parts: IOmeter itself and Dynamo.

IOmeter is a control part of the program with a graphical user interface that allows you to make all the necessary settings. Dynamo is a load generator that does not have an interface. Every time you run IOmeter.exe, the Dynamo.exe load generator is automatically launched as well.

In order to start working with the IOmeter program, just run the IOmeter.exe file. This opens the main window of the IOmeter program (Fig. 1).

Rice. 1. The main window of the IOmeter program

It should be noted that the IOmeter utility allows you to test not only local disk systems (DAS), but also network drives (NAS). For example, it can be used to test the performance of the server's disk subsystem (file server) using several network clients. Therefore, some of the tabs and tools in the IOmeter utility window refer specifically to the network settings of the program. It is clear that when testing disks and RAID arrays, we will not need these features of the program, and therefore we will not explain the purpose of all the tabs and tools.

So, when you start the IOmeter program, the tree structure of all running load generators (Dynamo instances) will be displayed on the left side of the main window (in the Topology window). Each running Dynamo load generator instance is called a manager. In addition, the IOmeter program is multi-threaded and each individual thread of a Dynamo load generator instance is called a Worker. The number of running Workers always corresponds to the number of logical processor cores.

In our example, there is only one computer with a quad-core processor that supports Hyper-Threading technology, so only one manager (one instance of Dynamo) and eight (by the number of logical processor cores) Workers are started.

Actually, to test disks in this window, there is no need to change or add anything.

If you highlight the computer name in the tree structure of running instances of Dynamo with the mouse, then in the window Target tab disk target all disks, disk arrays and other drives (including network drives) installed in the computer will be displayed. These are the drives that the IOmeter program can work with. Media can be marked in yellow or blue. Yellow indicates logical media partitions, and blue indicates physical devices without logical partitions created on them. The logical partition may or may not be crossed out. The fact is that in order for the program to work with a logical partition, it must first be prepared by creating a special file on it, equal in size to the capacity of the entire logical partition. If the logical partition is crossed out, then this means that the partition has not yet been prepared for testing (it will be prepared automatically at the first stage of testing), but if the partition is not crossed out, then this means that a file has already been created on the logical partition, completely ready for testing .

Note that, despite the supported ability to work with logical partitions, it is optimal to test disks that are not partitioned into logical partitions. You can delete a logical partition of a disk very simply - through the snap-in Disk Management. To access it, just right-click on the icon. computer on the desktop and in the menu that opens, select the item Manage. In the opened window computer management on the left side, select Storage, and in it - Disk Management. After that, on the right side of the window computer management all connected drives will be displayed. By right-clicking on the desired disk and selecting the item from the menu that opens Delete Volume..., you can delete a logical partition on a physical disk. Recall that when you delete a logical partition from a disk, all information on it is deleted without the possibility of recovery.

In general, using the IOmeter utility, you can only test blank disks or disk arrays. That is, you cannot test the disk or disk array on which the operating system is installed.

So, back to the description of the IOmeter utility. In the window Target tab disk target you must select the disk (or disk array) that will be tested. Next, you need to open the tab Access Specifications(Fig. 2), on which it will be possible to determine the test scenario.

Rice. 2. Access Specifications tab of the IOmeter utility

In the window Global Access Specifications there is a list of predefined test scripts that can be assigned to the download manager. However, we will not need these scripts, so all of them can be selected and deleted (there is a button for this). Delete). After that, click on the button New to create a new test script. In the opened window Edit Access Specification you can define a disk or RAID boot scenario.

Suppose we want to find out the dependence of the speed of sequential (linear) reading and writing on the size of the data transfer request block. To do this, we need to generate a sequence of load scripts in sequential read mode at various block sizes, and then a sequence of load scripts in sequential write mode at various block sizes. Typically, block sizes are chosen as a series, each member of which is twice the previous one, and the first member of this series is 512 bytes. That is, the block sizes are as follows: 512 bytes, 1, 2, 4, 8, 16, 32, 64, 128, 256, 512 KB, 1 MB. It makes no sense to make the block size larger than 1 MB for sequential operations, because with such large data block sizes, the speed of sequential operations does not change.

So, let's create a sequential read loading script for a block of 512 bytes.

In field Name window Edit Access Specification enter the name of the download script. For example, Sequential_Read_512. Further into the field Transfer Request Size set the data block size to 512 bytes. Slider Percent Random/Sequential Distribution(percentage ratio between sequential and selective operations) we shift all the way to the left so that all our operations are only sequential. Well, the slider , which specifies the percentage between read and write operations, we shift all the way to the right so that all our operations are read-only. Other options in the window Edit Access Specification no need to change (Fig. 3).

Rice. 3. Edit Access Specification window for creating a sequential read loading script
with a data block size of 512 bytes

Click on the button Ok, and the first script we created will be displayed in the window Global Access Specifications tab Access Specifications IOmeter utilities.

Similarly, you need to create scripts for the rest of the data blocks, however, to make your work easier, it’s easier not to create a script every time by clicking on the button New, and, having selected the last created script, press the button Edit Copy(edit copy). After that, the window will open again. Edit Access Specification with the settings of our last generated script. In it, it will be enough to change only the name and size of the block. Having done a similar procedure for all other block sizes, you can start generating scripts for sequential recording, which is done in exactly the same way, except that the slider Percent Read/Write Distribution, which specifies the percentage ratio between read and write operations, must be shifted all the way to the left.

Similarly, you can create scripts for selective writing and reading.

After all the scripts are ready, they need to be assigned to the boot manager, that is, indicate which scripts it will work with Dynamo.

To do this, we check once again that in the window topology the computer name is highlighted (that is, the load manager on the local PC), and not a separate Worker. This ensures that load scenarios are assigned to all Workers at once. Next in the window Global Access Specifications select all the load scenarios we created and press the button Add. All selected load scenarios will be added to the window (Fig. 4).

Rice. 4. Assigning the created load scenarios to the load manager

After that, you need to go to the tab Test Setup(Fig. 5), where you can set the execution time for each script we created. For this, the group run time set the execution time of the load scenario. It will be enough to set the time equal to 3 minutes.

Rice. 5. Setting the execution time of the load scenario

In addition, in the field test description you must specify the name of the entire test. In principle, this tab has a lot of other settings, but for our tasks they are not needed.

After all the necessary settings have been made, it is recommended to save the created test by clicking on the button with the image of a floppy disk on the toolbar. The test is saved with *.icf extension. Subsequently, you can use the created load script by running not the IOmeter.exe file, but the saved file with the *.icf extension.

Now you can proceed directly to testing by clicking on the button with the image of the flag. You will be prompted to name the test results file and select its location. The test results are saved in a CSV file, which is then easy to export to Excel and, by setting a filter on the first column, select the desired data with the test results.

During testing, intermediate results can be observed on the tab result display, and you can determine which load scenario they belong to on the tab Access Specifications. In the window Assigned Access Specification running script is shown in green, completed scripts in red, and scripts not yet executed in blue.

So, we have covered the basic techniques of working with the IOmeter utility, which will be required to test individual disks or RAID arrays. Note that we have not talked about all the features of the IOmeter utility, but a description of all its features is beyond the scope of this article.

Creating a RAID array based on the GIGABYTE SATA2 controller

So, we start creating a two-disk RAID array using the GIGABYTE SATA2 RAID controller integrated on the board. Of course, Gigabyte itself does not produce chips, and therefore a relabeled chip from another company is hidden under the GIGABYTE SATA2 chip. As you can see from the INF file of the driver, this is a JMicron JMB36x series controller.

Access to the controller settings menu is possible at the stage of system boot, for which you need to press the key combination Ctrl + G when the corresponding inscription appears on the screen. Naturally, first in the BIOS settings you need to define the operation mode of two SATA ports related to the GIGABYTE SATA2 controller as RAID (otherwise access to the RAID array configurator menu will be impossible).

The GIGABYTE SATA2 RAID Controller setup menu is pretty straightforward. As we have already noted, the controller is dual-port and allows you to create RAID arrays of level 0 or 1. Through the controller settings menu, you can remove or create a RAID array. When creating a RAID array, it is possible to specify its name, select the array level (0 or 1), set the stripe size for RAID 0 (128, 84, 32, 16, 8 or 4K), and also determine the size of the array.

Once an array has been created, no changes to it are possible. That is, you cannot subsequently change for the created array, for example, its level or stripe size. To do this, you first need to delete the array (with data loss), and then create it again. Actually, this is not unique to the GIGABYTE SATA2 controller. The impossibility of changing the parameters of the created RAID arrays is a feature of all controllers, which follows from the very principle of implementing a RAID array.

Once a GIGABYTE SATA2 controller-based array has been created, current information about it can be viewed using the GIGABYTE RAID Configurer utility, which is installed automatically with the driver.

Creating a RAID array based on the Marvell 9128 controller

Configuring the Marvell 9128 RAID controller is possible only through the BIOS settings of the Gigabyte GA-EX58A-UD7 board. In general, it must be said that the menu of the Marvell 9128 controller configurator is somewhat raw and can mislead inexperienced users. However, we will talk about these minor flaws a little later, but for now we will consider the main functionality of the Marvell 9128 controller.

So, although this controller supports SATA III drives, it is also fully compatible with SATA II drives.

The Marvell 9128 controller allows you to create a RAID array of levels 0 and 1 based on two disks. For a level 0 array, you can specify a stripe size of 32 or 64 KB, and you can also specify the name of the array. In addition, there is such an option as Gigabyte Rounding, which needs an explanation. Despite the name, consonant with the name of the manufacturer, the Gigabyte Rounding function has nothing to do with it. Moreover, it has nothing to do with a RAID level 0 array, although it can be defined in the controller settings specifically for an array of this level. Actually, this is the first of those shortcomings of the Marvell 9128 controller configurator that we mentioned. The Gigabyte Rounding feature is only defined for RAID level 1. It allows you to use two drives (for example, different manufacturers or different models) with slightly different capacities to create a RAID level 1 array. The Gigabyte Rounding function just sets the difference in the sizes of two disks used to create a RAID level 1 array. In the Marvell 9128 controller, the Gigabyte Rounding function allows you to set the difference in disk sizes to 1 or 10 GB.

Another drawback of the Marvell 9128 controller configurator is that when creating a RAID level 1 array, the user has the option to select the stripe size (32 or 64 KB). However, the concept of a stripe is not defined at all for a RAID level 1 array.

Creating a RAID array based on the controller integrated in the ICH10R

The RAID controller integrated into the ICH10R southbridge is the most common one. As already noted, this RAID controller is 6-port and supports not only the creation of RAID 0 and RAID 1 arrays, but also RAID 5 and RAID 10.

Access to the controller settings menu is possible at the stage of system boot, for which you need to press the key combination Ctrl + I when the corresponding inscription appears on the screen. Naturally, you must first define the operating mode of this controller as RAID in the BIOS settings (otherwise, access to the menu of the RAID array configurator will be impossible).

The RAID controller setup menu is quite simple. Through the controller settings menu, you can delete or create a RAID array. When creating a RAID array, you can specify its name, select the array level (0, 1, 5, or 10), set the stripe size for RAID 0 (128, 84, 32, 16, 8, or 4K), and define the size of the array.

RAID Performance Comparison

To test RAID arrays using the IOmeter utility, we created sequential read, sequential write, selective read, and selective write load scenarios. The sizes of data blocks in each load scenario were the following sequence: 512 bytes, 1, 2, 4, 8, 16, 32, 64, 128, 256, 512 KB, 1 MB.

On each of the RAID controllers, a RAID 0 array with all allowed stripe sizes and a RAID 1 array were created. In addition, in order to be able to evaluate the performance gain obtained from using a RAID array, we also tested a single disk on each of the RAID controllers.

So, let's turn to the results of our testing.

GIGABYTE SATA2 controller

First of all, let's look at the results of testing RAID arrays based on the GIGABYTE SATA2 controller (Figure 6-13). In general, the controller turned out to be literally mysterious, and its performance was simply disappointing.

Rice. 6.Speed ​​consistent
and selective disk operations
Western Digital WD1002FBYS

Rice. 7.Speed ​​consistent

with a stripe size of 128 KB
(GIGABYTE SATA2 controller)

Rice. 12. Sequential speed
and selective operations for RAID 0
with a stripe size of 4 KB
(GIGABYTE SATA2 controller)

Rice. 13.Speed ​​sequential
and selective operations
for RAID 1 (GIGABYTE SATA2 controller)

Looking at the performance of a single drive (no RAID), the maximum sequential read speed is 102 MB/s and the maximum sequential write speed is 107 MB/s.

When creating a RAID 0 array with a stripe size of 128 KB, the maximum sequential read and write speed increases to 125 MB / s, that is, an increase of about 22%.

With a stripe size of 64, 32, or 16 KB, the maximum sequential read speed is 130 MB/s, and the maximum sequential write speed is 141 MB/s. That is, with the specified stripe sizes, the maximum sequential read speed increases by 27%, and the maximum sequential write speed - by 31%.

Actually, this is not enough for a level 0 array, and I would like the maximum speed of sequential operations to be higher.

With a stripe size of 8 KB, the maximum speed of sequential operations (read and write) remains approximately the same as with a stripe size of 64, 32, or 16 KB, but there are obvious problems with selective reading. As the data block size increases up to 128 KB, the selective read speed (as it should be) increases in proportion to the data block size. However, with a data block size of more than 128 KB, the selective read speed drops to almost zero (to about 0.1 MB / s).

With a stripe size of 4 KB, not only the speed of selective reading drops with a block size of more than 128 KB, but also the speed of sequential reading with a block size of more than 16 KB.

Using a RAID 1 array on a GIGABYTE SATA2 controller makes little difference (compared to a single drive) in sequential read speed, but the maximum sequential write speed drops to 75 MB/s. Recall that for a RAID 1 array, the read speed should increase, and the write speed should not decrease compared to the read and write speed of a single disk.

Based on the test results of the GIGABYTE SATA2 controller, only one conclusion can be drawn. Using this controller to create RAID 0 and RAID 1 arrays makes sense only when all other RAID controllers (Marvell 9128, ICH10R) are already enabled. Although it is rather difficult to imagine such a situation.

Controller Marvell 9128

The Marvell 9128 controller showed much faster performance compared to the GIGABYTE SATA2 controller (Figure 14-17). Actually, the differences appear even when the controller works with one disk. While the GIGABYTE SATA2 controller has a maximum sequential read speed of 102 MB/s and is achieved with a data block size of 128 KB, for the Marvell 9128 controller the maximum sequential read speed is 107 MB/s and is achieved with a data block size of 16 KB.

When you create a RAID 0 array with a stripe size of 64 and 32 KB, the maximum sequential read speed increases to 211 MB / s, and sequential write - up to 185 MB / s. That is, with the specified stripe sizes, the maximum sequential read speed increases by 97%, and the maximum sequential write speed - by 73%.

There is no significant difference in speed between RAID 0 arrays with a stripe size of 32 and 64 KB, however, using a stripe of 32 KB is more preferable, since in this case the speed of sequential operations with a block size of less than 128 KB will be slightly higher.

When creating a RAID 1 array on the Marvell 9128 controller, the maximum sequential operation speed is almost unchanged compared to a single drive. So, if for a single disk the maximum sequential operation speed is 107 MB / s, then for RAID 1 it is 105 MB / s. Also note that for RAID 1, the selective read speed is slightly degraded.

In general, it should be noted that the Marvell 9128 controller has good speed characteristics and can be used both to create RAID arrays and to connect single disks to it.

Controller ICH10R

The RAID controller built into the ICH10R proved to be the highest performing we have ever tested (Figure 18-25). When used with a single drive (without creating a RAID array), its performance is actually the same as that of the Marvell 9128 controller. The maximum sequential read and write speed is 107 MB and is achieved with a data block size of 16 KB.

Rice. 18. Sequential speed
and selective operations
for Western Digital WD1002FBYS drive (ICH10R controller)

If we talk about the RAID 0 array on the ICH10R controller, then the maximum sequential read and write speed does not depend on the size of the stripe and is 212 MB / s. Only the size of the data block depends on the stripe size, at which the maximum value of the sequential read and write speed is achieved. As the test results show, for RAID 0 based on the ICH10R controller, it is optimal to use a 64 KB stripe. In this case, the maximum sequential read and write speed is achieved with a data block size of only 16 KB.

So, in summary, we emphasize once again that the RAID controller built into the ICH10R significantly outperforms all other integrated RAID controllers in terms of performance. And given that it also has more functionality, it is optimal to use this particular controller and simply forget about the existence of all the others (unless, of course, SATA III drives are used in the system).

Hard drives play an important role in the computer. Various user information is stored on them, the OS is launched from them, etc. Hard drives do not last forever and have a certain margin of safety. And also each hard drive has its own distinctive characteristics.

Most likely, someday you have heard that so-called raid arrays can be made from ordinary hard drives. This is necessary in order to improve the performance of drives, as well as to ensure the reliability of information storage. In addition, such arrays can have their own numbers (0, 1, 2, 3, 4, etc.). In this article, we will tell you about RAID arrays.

RAID is a collection of hard drives or a disk array. As we have already said, such an array ensures the reliability of data storage, and also increases the speed of reading or writing information. There are various RAID configurations, which are marked with numbers 1, 2, 3, 4, and so on. and differ in the functions they perform. By using such arrays with configuration 0, you will greatly improve performance. A single RAID array guarantees the complete safety of your data, because if one of the drives fails, the information will be located on the second hard drive.

In fact, RAID array is 2 or n-th number of hard drives connected to the motherboard that supports the ability to create raids. Programmatically, you can select the raid configuration, that is, specify how these same disks should work. To do this, you need to specify the settings in the BIOS.

To install the array, we need a motherboard that supports raid technology, 2 identical (completely in all respects) hard drives, which we connect to the motherboard. In BIOS, you need to set the parameter SATA Configuration: RAID. When the computer boots up, press the key combination CTR-I, and already there we carry out the RAID setup. And after that, as usual, we install Windows.

It is worth paying attention to the fact that if you create or delete a raid, then all information that is on the drives is deleted. Therefore, you must first make a copy of it.

Let's take a look at the RAID configurations we've already talked about. There are several of them: RAID 1, RAID 2, RAID 3, RAID 4, RAID 5, RAID 6, etc.

RAID-0 (striping), a.k.a. zero-level array or "null array". This level increases the speed of working with disks by an order of magnitude, but does not provide additional fault tolerance. In fact, this configuration is a purely formal raid array, because with this configuration there is no redundancy. Recording in such a bundle occurs in blocks that are written one by one to different disks of the array. The main disadvantage here is the unreliability of data storage: if one of the disks in the array fails, all information is destroyed. Why is it so? And this happens because each file can be written in blocks to several hard drives at once, and if any of them fails, the integrity of the file is violated, and, therefore, it is not possible to restore it. If you value speed and regularly make backups, then this array level can be used on a home PC, which will give a noticeable performance boost.

RAID-1 (mirroring)- mirror mode. You can call this level of RAID arrays the level for the paranoid: this mode gives almost no increase in system performance, but absolutely protects your data from damage. Even if one of the disks fails, an exact copy of the lost one will be stored on another disk. This mode, like the first one, can also be implemented on a home PC by people who value the data on their disks extremely.

When building these arrays, an information recovery algorithm is used using Hamming codes (an American engineer who developed this algorithm in 1950 to correct errors in the operation of electromechanical computers). To ensure the operation of this RAID controller, two groups of disks are created - one for storing data, the second group for storing error correction codes.

This type of RAID is not widely used in home systems due to the excessive redundancy of the number of hard drives - for example, in an array of seven hard drives, only four will be allocated for data. With an increase in the number of disks, redundancy decreases, which is reflected in the table below.

The main advantage of RAID 2 is the ability to correct emerging errors "on the fly" without reducing the speed of data exchange between the disk array and the central processor.

RAID 3 and RAID 4

These two types of disk arrays are very similar in their construction scheme. Both use several hard drives to store information, one of which is used solely for the placement of checksums. Three hard drives are enough to create RAID 3 and RAID 4. Unlike RAID 2, data recovery "on the fly" is impossible - information is restored after replacing a failed hard drive for some time.

The difference between RAID 3 and RAID 4 is the level of data partitioning. In RAID 3, information is split into separate bytes, which leads to a serious slowdown when writing / reading a large number of small files. In RAID 4, data is divided into separate blocks, the size of which does not exceed the size of one sector on the disk. As a result, the processing speed of small files is increased, which is critical for personal computers. For this reason, RAID 4 has become more widespread.

A significant disadvantage of the arrays under consideration is the increased load on the hard disk intended for storing checksums, which significantly reduces its resource.

RAID-5. The so-called fault-tolerant array of independent disks with distributed checksum storage. This means that on an array of n disks, n-1 disks will be allocated for direct data storage, and the last one will store the checksum of the n-1 stripe iteration. To explain more clearly, imagine that we need to write some file. It will be divided into portions of the same length and in turn will begin to be recorded cyclically on all n-1 disks. The checksum of the bytes of the data portions of each iteration will be written to the last disk, where the checksum will be implemented by a bitwise XOR operation.

It is worth noting right away that if any of the disks fails, it will all go into emergency mode, which will significantly reduce performance, because. to assemble the file together, unnecessary manipulations will be performed to restore its “missing” parts. If two or more disks fail at the same time, the information stored on them cannot be recovered. In general, the implementation of the fifth-level raid array provides a fairly high access speed, parallel access to various files, and good fault tolerance.

To a large extent, the above problem is solved by building arrays according to the RAID 6 scheme. In these structures, the storage of checksums, which are also cyclically and evenly distributed to different disks, is allocated an amount of memory equal to the volume of two hard disks. Instead of one, two checksums are calculated, which guarantees data integrity in case of simultaneous failure of two hard drives in the array at once.

The advantages of RAID 6 are a high degree of information security and a lower performance drop in the process of data recovery when replacing a damaged disk than in RAID 5.

The disadvantage of RAID 6 is a decrease in the overall data exchange rate by about 10% due to an increase in the amount of necessary checksum calculations, as well as due to an increase in the amount of written / read information.

Combined RAID types

In addition to the main types discussed above, various combinations of them are widely used, which compensate for certain shortcomings of simple RAID. In particular, the use of RAID 10 and RAID 0+1 schemes is widespread. In the first case, a pair of mirror arrays are combined into a RAID 0, in the second, on the contrary, two RAID 0 arrays are combined into a mirror. In both cases, the increased performance of RAID 0 is added to the security of RAID 1 information.

Often, in order to increase the level of protection of important information, RAID 51 or RAID 61 construction schemes are used - mirroring of already highly protected arrays ensures exceptional data safety in case of any failures. However, it is impractical to implement such arrays at home due to excessive redundancy.

Building an array of disks - from theory to practice

A specialized RAID controller is responsible for building and managing the operation of any RAID. Much to the relief of the average PC user, in most modern motherboards these controllers are already implemented at the chipset southbridge level. So, to build an array of hard drives, it is enough to take care of acquiring the required number of them and determining the desired RAID type in the corresponding section of the BIOS setup. After that, in the system, instead of several hard drives, you will see only one, which can be divided into sections and logical drives if desired. Please note that if you are still using Windows XP, you will need to install an additional driver.

And finally, one more piece of advice - to create a RAID, purchase hard drives of the same size, the same manufacturer, the same model, and preferably from the same batch. Then they will be equipped with the same sets of logic and the operation of the array of these hard drives will be the most stable.

Tags: , https://website/wp-content/uploads/2017/01/RAID1-400x333.jpg 333 400 Leonid Borislavsky /wp-content/uploads/2018/05/logo.pngLeonid Borislavsky 2017-01-16 08:57:09 2017-01-16 07:12:59 What are RAID arrays and why are they needed

The shift in focus from processor-centric to data-centric applications is driving the importance of storage systems. At the same time, the problem of low throughput and fault tolerance characteristic of such systems has always been quite important and always required its solution.

In the modern computer industry, magnetic disks are widely used as a secondary storage system, because, despite all their shortcomings, they have the best characteristics for the corresponding type of device at an affordable price.

Features of the technology for building magnetic disks have led to a significant discrepancy between the increase in the performance of processor modules and the magnetic disks themselves. If in 1990 5.25″ disks with an average access time of 12ms and a delay time of 5ms (with a spindle speed of about 5,000 rpm 1) were the best among serial ones, today the palm belongs to 3.5″ disks with an average access time of 5ms and delay time 1 ms (at 10,000 rpm spindle speed). Here we see an improvement in technical performance of about 100%. At the same time, processor performance increased by more than 2,000%. Much of this is possible because processors have the direct benefits of using VLSI (Very Large Integration). Its use not only makes it possible to increase the frequency, but also the number of components that can be integrated into the chip, which makes it possible to introduce architectural advantages that allow parallel computing.

1 - Average data.

The current situation can be described as a secondary storage I/O crisis.

Increasing performance

The impossibility of a significant increase in the technological parameters of magnetic disks entails the need to look for other ways, one of which is parallel processing.

If you arrange a data block across N disks of some array and organize this placement so that there is a possibility of simultaneous reading of information, then this block can be read N times faster (without taking into account the block formation time). Since all data is transmitted in parallel, this architectural decision is called parallel access array(an array with parallel access).

Parallel arrays are typically used for applications that require large data transfers.

Some tasks, on the contrary, are characterized by a large number of small requests. Such tasks include, for example, database processing tasks. By distributing database records across array disks, you can spread the load by independently positioning the disks. This architecture is called independent access array(array with independent access).

Increasing fault tolerance

Unfortunately, as the number of disks in an array increases, the reliability of the entire array decreases. With independent failures and an exponential distribution of MTBF, the MTTF of the entire array (mean time to failure) is calculated by the formula MTTF array = MMTF hdd /N hdd disks).

Thus, there is a need to increase the fault tolerance of disk arrays. To increase the fault tolerance of arrays, redundant coding is used. There are two main types of encoding used in redundant disk arrays - duplication and parity.

Duplication, or mirroring, is most commonly used in disk arrays. Simple mirror systems use two copies of the data, each copy being placed on separate disks. This scheme is quite simple and does not require additional hardware costs, but it has one significant drawback - it uses 50% of disk space to store a copy of information.

The second way to implement redundant disk arrays is to use redundant encoding with parity calculation. Parity is calculated as the XOR operation of all characters in the data word. The use of parity in redundant disk arrays reduces the overhead to the value calculated by the formula: HP hdd =1/N hdd (HP hdd - overhead; N hdd - number of disks in the array).

History and development of RAID

Although disk-based storage systems have been in production for 40 years, mass production of fault-tolerant systems has only recently begun. Redundant disk arrays, commonly referred to as RAID (redundant arrays of inexpensive disks) were introduced by researchers (Petterson, Gibson and Katz) at the University of California at Berkeley in 1987. But RAID systems became widespread only when disks suitable for use in redundant arrays became available and sufficiently productive. Since the official report on RAID in 1988, research into redundant disk arrays has exploded in an attempt to provide a wide range of solutions in the price-performance-reliability trade-off.

There was an incident with the abbreviation RAID. The fact is that inexpensive disks at the time of writing were all disks that were used in a PC, as opposed to expensive mainframe (mainframe) disks. But for use in RAID arrays, it was necessary to use quite expensive equipment compared to other PC configurations, so RAID began to be deciphered as a redundant array of independent disks 2 - a redundant array of independent disks.

2 - Defining a RAID Advisory Board

RAID 0 has been introduced by the industry as the definition of a non-fault tolerant disk array. At Berkeley, RAID 1 was defined as a mirrored disk array. RAID 2 is reserved for arrays that use Hamming code. RAID levels 3, 4, 5 use parity to protect data from single faults. It was these levels, inclusive of the 5th, that were presented at Berkeley, and this RAID systematics was adopted as the de facto standard.

RAID levels 3,4,5 are quite popular, they have a good disk space utilization, but they have one significant drawback - they are resistant only to single failures. This is especially true when using a large number of disks, when the likelihood of more than one device being idle at the same time increases. In addition, they are characterized by a long recovery, which also imposes some restrictions on their use.

To date, a sufficiently large number of architectures have been developed that ensure the array's operability with the simultaneous failure of any two disks without data loss. Among the whole set, it is worth noting two-dimensional parity (two-space parity) and EVENODD, which use parity for encoding, and RAID 6, which uses Reed-Solomon encoding.

In a two-space parity scheme, each data block participates in the construction of two independent codewords. Thus, if a second disk in the same codeword fails, a different codeword is used to reconstruct the data.

The minimum redundancy in such an array is achieved with an equal number of columns and rows. And it is equal to: 2 x Square (N Disk) (in "square").

If the two-dimensional array is not organized into a "square", then when implementing the above scheme, the redundancy will be higher.

The EVENODD architecture has a fault-tolerance scheme similar to 2-space parity, but a different arrangement of information blocks that guarantees minimal overutilization of capacities. As in two-space parity, each data block participates in the construction of two independent codewords, but the words are placed in such a way that the redundancy factor is constant (unlike the previous scheme) and is equal to: 2 x Square (N Disk).

By using two characters for checking, parity and non-binary codes, the data word can be constructed to provide fault tolerance in the event of a double fault. This scheme is known as RAID 6. A non-binary code based on Reed-Solomon coding is usually calculated using tables or as an iterative process using linear feedback registers, which is a relatively complex operation requiring specialized hardware.

Considering that the use of classic RAID variants, which provide sufficient fault tolerance for many applications, often has unacceptably low performance, researchers from time to time implement various tricks that help increase the performance of RAID systems.

In 1996, Savage and Vilks proposed AFRAID, A Frequently Redundant Array of Independent Disks. This architecture somewhat sacrifices fault tolerance for speed. In an attempt to compensate for the small-write problem that is common with RAID 5 arrays, it is permissible to leave striping without parity calculation for a period of time. If the disk intended for parity recording is busy, then parity recording is postponed. It has been theoretically proven that a 25% reduction in fault tolerance can increase performance by 97%. AFRAID actually changes the failure model of single fault tolerant arrays because a codeword that does not have updated parity is susceptible to disk failures.

Instead of sacrificing fault tolerance, you can use traditional performance enhancements such as caching. Given that disk traffic is bursty, you can use the writeback cache to store data when the disks are busy. And if the cache memory is made in the form of non-volatile memory, then, in the event of a power failure, the data will be saved. In addition, deferred disk operations make it possible to combine small blocks in an arbitrary order to perform more efficient disk operations.

There are also many architectures that, while sacrificing space, increase performance. Among them are delayed modification to the log disk and various schemes for modifying the logical data allocation to the physical one, which allow you to distribute operations in the array more efficiently.

One of the options - parity logging(parity registration), which involves solving the small-write problem and more efficient use of disks. Parity logging involves deferring a parity change in RAID 5, writing it to the FIFO log (FIFO type log), which is located partly in the controller's memory and partly on disk. Given that accessing a full track is on average 10 times more efficient than accessing a sector, large amounts of modified parity data are collected using parity registration, which are then collectively written to a disk designed to store parity across the entire track.

Architecture floating data and parity(float and parity), which allows the physical allocation of disk blocks to be reallocated. Free sectors are placed on each cylinder to reduce rotational latency(rotational delays), data and parity are placed in these free spaces. In order to ensure operability during a power failure, the parity and data card must be stored in non-volatile memory. If you lose the location map, all data in the array will be lost.

virtual stripping- is a floating data and parity architecture using writeback cache. Naturally realizing the positive aspects of both.

In addition, there are other ways to improve performance, such as the distribution of RAID operations. At one time, Seagate built support for RAID operations into its drives with Fiber Chanel and SCSI interfaces. This made it possible to reduce traffic between the central controller and the disks in the array for RAID 5 systems. This was a major innovation in the realm of RAID implementations, but the technology did not get a ticket to life, as some features of the Fiber Chanel and SCSI standards weaken the failure model for disk arrays.

For the same RAID 5, the TickerTAIP architecture was introduced. It looks like this - the central control mechanism originator node (initiator node) receives user requests, selects a processing algorithm and then transfers disk work and parity to the worker node (worker node). Each worker node handles some subset of the disks in the array. As in the Seagate model, worker nodes transfer data between themselves without the participation of the initiating node. In the event of a failure of a working node, the disks that it served become inaccessible. But if the codeword is constructed in such a way that each character is processed by a separate worker node, then the fault tolerance scheme repeats RAID 5. To prevent failures of the initiator node, it is duplicated, so we get an architecture that is tolerant of failures of any of its nodes. For all its positive features, this architecture suffers from the problem of "write errors" ("write hole"). Which implies an error occurs when the code word is changed by several users at the same time and the node fails.

We should also mention a fairly popular way to quickly restore a RAID - using a free disk (spare). If one of the disks in the array fails, the RAID can be rebuilt using a free disk instead of the failed one. The main feature of such an implementation is that the system goes into its previous state (fail-safe state without external intervention). With a distributed sparing architecture, spare disk logical blocks are physically distributed across all disks in the array, eliminating the need to rebuild the array if a disk fails.

In order to avoid the recovery problem that is typical for classic RAID levels, an architecture is also used, which is called parity declustering(parity distribution). It involves placing fewer, larger logical drives on smaller, larger physical drives. Using this technology, the response time of the system to a request during reconstruction is more than doubled, and the reconstruction time is significantly reduced.

Architecture of the main levels of RAID

Now let's look at the architecture of the basic levels of RAID in more detail. Before considering, let's make some assumptions. To demonstrate the principles of building RAID systems, consider a set of N disks (for simplicity, N will be considered an even number), each of which consists of M blocks.

The data will be denoted - D m,n , where m is the number of data blocks, n is the number of subblocks into which the data block D is divided.

Disks can be connected to either one or several data transfer channels. Using more channels increases the throughput of the system.

RAID 0 Striped Disk Array without Fault Tolerance

It is a disk array in which data is divided into blocks, and each block is written (or read) to a separate disk. Thus, it is possible to perform multiple I/O operations at the same time.

Advantages:

  • the highest performance for applications requiring intensive processing of I / O requests and large data volumes;
  • ease of implementation;
  • low cost per unit volume.

Flaws:

  • not a fault-tolerant solution;
  • A single drive failure results in the loss of all data in the array.

RAID 1. Disk array with duplication or mirroring (mirroring)

Mirroring is a traditional way to increase the reliability of a small disk array. In the simplest version, two disks are used, on which the same information is recorded, and in the event of a failure of one of them, its duplicate remains, which continues to work in the same mode.

Advantages:

  • ease of implementation;
  • ease of array recovery in case of failure (copy);
  • Sufficiently high performance for applications with high request intensity.

Flaws:

  • high cost per volume unit - 100% redundancy;
  • low data transfer rate.

RAID 2. Fault-tolerant disk array using the Hamming Code (ECC).

The over-coding used in RAID 2 is called Hamming code. The Hamming code allows you to correct single and detect double faults. Today it is actively used in the technology of encoding data in RAM such as ECC. And encoding data on magnetic disks.

In this case, an example is shown with a fixed number of disks due to the cumbersome description (the data word consists of 4 bits, respectively, the ECC code of 3).

Advantages:

  • fast error correction ("on the fly");
  • very high data transfer rate of large volumes;
  • as the number of disks increases, overhead costs decrease;
  • a fairly simple implementation.

Flaws:

  • high cost with a small number of disks;
  • low request processing speed (not suitable for transaction-oriented systems).

RAID 3. Fault-tolerant array with parallel data transfer and parity (Parallel Transfer Disks with Parity)

The data is divided into subblocks at the byte level and written simultaneously to all disks in the array except one, which is used for parity. Using RAID 3 solves the problem of high redundancy in RAID 2. Most of the control disks used in RAID level 2 are needed to determine the position of a bad bit. But this is not necessary, since most controllers are able to detect when a disk has failed by means of special signals, or additional encoding of information written to the disk and used to correct random failures.

Advantages:

  • very high data transfer rate;
  • Disk failure has little effect on array performance;

Flaws:

  • difficult implementation;
  • low performance with a high intensity of requests for data of a small volume.

RAID 4. Fault-tolerant array of independent disks with shared parity disk (Independent Data disks with shared Parity disk)

The data is split at the block level. Each block of data is written to a separate disk and can be read separately. Parity for a group of blocks is generated on write and checked on read. RAID Level 4 improves the performance of small data transfers through parallelism, allowing more than one I/O access to occur at the same time. The main difference between RAID 3 and 4 is that in the latter, data striping is done at the sector level, not at the bit or byte level.

Advantages:

  • very high speed of reading data of large volumes;
  • high performance with high intensity of data reading requests;
  • low overhead for implementing redundancy.

Flaws:

  • very low performance when writing data;
  • low speed of reading small data with single requests;
  • performance asymmetry with respect to reading and writing.

RAID 5. Independent Data disks with distributed parity blocks

This level is similar to RAID 4, but unlike the previous one, parity is distributed cyclically across all disks in the array. This change improves the performance of writing small amounts of data on multitasking systems. If write operations are planned properly, then it is possible to process up to N/2 blocks in parallel, where N is the number of disks in the group.

Advantages:

  • high data recording speed;
  • sufficiently high data reading speed;
  • high performance with high intensity of data read/write requests;
  • low overhead for implementing redundancy.

Flaws:

  • data read speed is lower than in RAID 4;
  • low read / write speed of small data with single requests;
  • rather complicated implementation;
  • complex data recovery.

RAID 6. Independent Data disks with two independent distributed parity schemes

Data is partitioned at the block level, similar to RAID 5, but in addition to the previous architecture, a second scheme is used to improve fault tolerance. This architecture is double fault tolerant. However, when performing a logical write, there are actually six disk accesses, which greatly increases the processing time for one request.

Advantages:

  • high fault tolerance;
  • sufficiently high speed of processing requests;
  • relatively low overhead for implementing redundancy.

Flaws:

  • very complex implementation;
  • complex data recovery;
  • very low write speed.

Modern RAID controllers allow you to combine different RAID levels. Thus, it is possible to implement systems that combine the advantages of different levels, as well as systems with a large number of disks. Usually this is a combination of zero level (stripping) and some kind of fault-tolerant level.

RAID 10 Redundant Parallel Fault Tolerant Array

This architecture is a RAID 0 type array, the segments of which are RAID 1 arrays. It combines very high fault tolerance and performance.

Advantages:

  • high fault tolerance;
  • high performance.

Flaws:

  • very high cost;
  • limited scaling.

RAID 30. Fault-tolerant array with parallel data transfer and increased performance.

It is a RAID 0 type array, the segments of which are RAID 3 arrays. It combines fault tolerance and high performance. Typically used for applications requiring large serial data transfers.

Advantages:

  • high fault tolerance;
  • high performance.

Flaws:

  • high price;
  • limited scaling.

RAID 50 Fault Tolerant Distributed Parity Array with Higher Performance

It is a RAID 0 type array, the segments of which are RAID 5 arrays. It combines fault tolerance and high performance for high-demand applications with high data transfer speed.

Advantages:

  • high fault tolerance;
  • high data transfer rate;
  • high request processing speed.

Flaws:

  • high price;
  • limited scaling.

RAID 7. Fault-tolerant array optimized for performance. (Optimized Asynchrony for High I/O Rates as well as High Data Transfer Rates). RAID 7® is a registered trademark of Storage Computer Corporation (SCC)

To understand the architecture of RAID 7, consider its features:

  1. All data transfer requests are processed asynchronously and independently.
  2. All read/write operations are cached via the high speed x-bus.
  3. A parity disk can be placed on any channel.
  4. The array controller's microprocessor uses a process-oriented real-time operating system.
  5. The system has good scalability: up to 12 host interfaces and up to 48 disks.
  6. The operating system controls the communication channels.
  7. Standard SCSI drives, buses, motherboards and memory modules are used.
  8. The high-speed X-bus is used to work with the internal cache memory.
  9. The parity generation procedure is integrated into the cache.
  10. Drives attached to a system can be declared as freestanding.
  11. An SNMP agent can be used to manage and monitor the system.

Advantages:

  • high data transfer rate and high query processing speed (1.5 - 6 times higher than other standard RAID levels);
  • high scalability of host interfaces;
  • the speed of data writing increases with the increase in the number of disks in the array;
  • there is no need for additional data transfer for parity calculation.

Flaws:

  • the property of one manufacturer;
  • very high cost per unit volume;
  • short warranty period;
  • cannot be serviced by the user;
  • you need to use an uninterruptible power supply to prevent data loss from the cache memory.

Let us now consider the standard levels together to compare their characteristics. The comparison is made within the architectures mentioned in the table.

RAIDMinimum
disks
Need
in disks
Fail-
stability
Speed
data transmission
Intensity
processing
requests
Practical
usage
0 2 N very high
up to N x 1 disk
Graphics, video
1 2 2N* R > 1 disk
W = 1 disc
up to 2 x 1 disk
W = 1 disc
small file servers
2 7 2N ~RAID 3Lowmainframes
3 3 N+1 LowGraphics, video
4 3 N+1 RWR=RAID 0
W
file servers
5 3 N+1 RWR=RAID 0
W
database servers
6 4 N+2the tallestlowR > 1 disk
W
used very rarely
7 12 N+1 the tallestthe tallestdifferent types of applications

Clarifications:

  • * - commonly used option is considered;
  • k is the number of subsegments;
  • R - reading;
  • W - entry.

Some aspects of the implementation of RAID systems

Consider three main options for implementing RAID systems:

  • software (software-based);
  • hardware - bus-oriented (bus-based);
  • hardware - autonomous subsystem (subsystem-based).

It cannot be unambiguously said that one implementation is better than another. Each option for organizing the array satisfies certain user needs, depending on financial capabilities, the number of users and the applications used.

Each of the above implementations is based on the execution of program code. They actually differ in where this code is executed: in the computer's central processor (software implementation) or in a specialized processor on the RAID controller (hardware implementation).

The main advantage of software implementation is low cost. But at the same time, it has many disadvantages: low performance, loading with additional work on the central processor, and an increase in bus traffic. Simple RAID levels - 0 and 1 - are usually implemented in software, since they do not require significant calculations. Given these features, RAID systems with software implementation are used in entry-level servers.

Hardware implementations of RAID are correspondingly more expensive than software implementations because they use additional hardware to perform I/O operations. At the same time, they unload or free the central processor and the system bus and, accordingly, allow you to increase performance.

Bus-oriented implementations are RAID controllers that use the high-speed bus of the computer in which they are installed (more recently, the PCI bus is usually used). In turn, bus-oriented implementations can be divided into low-level and high-level ones. The former usually do not have SCSI chips and use the so-called RAID port on the motherboard with a built-in SCSI controller. In this case, the functions of processing the RAID code and I / O operations are distributed between the processor on the RAID controller and the SCSI chips on the motherboard. Thus, the central processor is freed from processing additional code and bus traffic is reduced compared to the software version. The cost of such boards is usually low, especially if they are focused on RAID - 0 or 1 systems (there are also implementations of RAID 3, 5, 10, 30, 50, but they are more expensive), so they are gradually crowding out software implementations from the entry-level server market. High-level controllers with bus implementation have a slightly different structure than their younger brothers. They take care of all the I/O and RAID code execution functions. In addition, they are not so dependent on the implementation of the motherboard and, as a rule, have more features (for example, the ability to connect a module to store information in the cache in the event of a motherboard failure or power failure). Such controllers are usually more expensive than low-level ones and are used in mid-range and high-end servers. They, as a rule, implement RAID levels 0.1, 3, 5, 10, 30, 50. Taking into account that bus-oriented implementations are connected directly to the computer's internal PCI bus, they are the most productive among the systems under consideration (when organizing a single host systems). The maximum speed of such systems can reach 132 MB/s (32bit PCI) or 264 MB/s (64bit PCI) at 33MHz bus frequency.

Along with the listed advantages, the bus-oriented architecture has the following disadvantages:

  • dependence on the operating system and platform;
  • limited scalability;
  • limited possibilities for organizing fault-tolerant systems.

All these disadvantages can be avoided by using autonomous subsystems. These systems have a completely autonomous external organization and, in principle, are a separate computer that is used to organize information storage systems. In addition, if the technology of fiber optic channels is successfully developed, the performance of autonomous systems will in no way be inferior to bus-oriented systems.

Usually, an external controller is placed in a separate rack and, unlike systems with a bus organization, it can have a large number of input / output channels, including host channels, which makes it possible to connect several host computers to the system and organize cluster systems. In systems with a stand-alone controller, hot standby controllers can be implemented.

One of the disadvantages of autonomous systems is their high cost.

Given the above, we note that autonomous controllers are usually used to implement high-capacity data warehouses and cluster systems.

Top Related Articles