Home >Common Problem >What is the difference between raid1 and raid5?

What is the difference between raid1 and raid5?

青灯夜游
青灯夜游Original
2020-11-19 11:23:1725775browse

Differences: 1. Different security, RAID1 is higher than RAID5; 2. Disk utilization is different, RAID5 is higher than RAID1; 3. RAID1 is suitable for scenarios with many read operations, while RAID5 is suitable for scenarios with many write operations. scene.

What is the difference between raid1 and raid5?

Redundant array of independent disks (RAID, redundant array of independent disks) stores the same data in different places on multiple hard disks (therefore, redundant array room) method. By placing data on multiple hard drives, input and output operations can overlap in a balanced manner, improving performance. Because multiple hard drives increase mean time between failures (MTBF), storing redundant data also increases fault tolerance.

RAID 1

RAID 1 is called disk mirroring. The principle is to mirror the data of one disk to another disk, which means that the data is written to one disk. At the same time, an image file will be generated on another idle disk to maximize the reliability and repairability of the system without affecting performance. As long as at least one disk in any pair of mirror disks in the system can be used , the system can run normally even when half of the hard disks have problems. When a hard disk fails, the system will ignore the hard disk and instead use the remaining mirror disks to read and write data, which has good disk redundancy capabilities. Although this is absolutely safe for data, the cost will also increase significantly. The disk utilization rate is 50%. With four 80GB hard drives, the available disk space is only 160GB. In addition, a RAID system with a hard drive failure is no longer reliable. The damaged hard drive should be replaced in time, otherwise the remaining mirror disks will also have problems and the entire system will collapse. After replacing the new disk, the original data will take a long time to synchronize the mirror. The external access to the data will not be affected, but the performance of the entire system will be reduced at this time. Therefore, RAID 1 is mostly used in situations where critical and important data is saved.

RAID 1 mainly implements disk mirroring through secondary reading and writing, so the load on the disk controller is also quite heavy, especially in environments that require frequent data writing. In order to avoid performance bottlenecks, it is necessary to use multiple disk controllers.

RAID5

RAID5 (Independent Disk Structure with Distributed Parity). As can be seen from its schematic diagram, its parity code exists on all disks, where p0 represents the parity value of the 0th zone, and the other meanings are the same. The read efficiency of RAID5 is very high, the write efficiency is average, and the block-based collective access efficiency is good. Because the parity codes are on different disks, reliability is improved. However, it does not solve the parallelism of data transmission well, and the design of the controller is also quite difficult. The important difference between RAID 3 and RAID 5 is that every data transfer in RAID 3 involves all array disks. For RAID 5, most data transfers only operate on one disk and can be operated in parallel. There is "write loss" in RAID 5, that is, each write operation will generate four actual read/write operations, including two reading of old data and parity information, and two writing of new data and parity information.

The difference between RAID1 and RAID5

1. In terms of reading and writing: RAID1 reading is no different from a single disk. Writing requires writing on both sides; RAID5 has the best reading performance. The write performance is lower than the write operation to a single disk; so RAID1 is suitable for scenarios with many read operations, while RAID5 is suitable for scenarios with many write operations.

2. Security: RAID1 is higher than RAID5.

3. Disk utilization: RAID5 is higher than RAID1.

4. Cost: RAID1 is higher than RAID5.

5. Application: RAID1 is suitable for storing important data; RAID5 is a solution that takes into account storage performance, data security and storage cost.

The above is the detailed content of What is the difference between raid1 and raid5?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:What format is jpeg?Next article:What format is jpeg?