Introduced
??
???? Often when discussing the performance of different RAID protection types, the conclusion will be that RAID-1 provides better read and write performance, RAID-5 read performance is good, but write performance is not as high as raid-1,raid-6 protection level, but write performance is relatively worse, RAID10 is to provide the best performance and data protection, but the cost is highest and so on. In fact, the factors that determine these performance considerations are simple, which is raid write penalty (write penalty). This article explains in principle the write penalty for different raid protection levels and how to calculate the available iops by writing penalties.
More information
??
RAID-5? Example of Write penalty :
??
???? The most basic considerations for storage plan planning are two, performance and capacity. Performance calculations can be divided into iops and bandwidth requirements. Calculate ioPS, throw away the storage array's cache and the front-end port. Calculating the ioPS of the back-end physical disks does not simply add up the maximum iops of the physical disks. The reason is that for different RAID levels, there is a need for some special calculations in the data writing process to ensure that the data can be recovered when there is a physical disk corruption. For example, for RAID-5, data changes on any disk on the stripe will recalculate the check digit. As shown in the stripe of a 7+1 RAID-5, seven disks store data, and the last disk stores the check digit.
??
??
???? For the writing of one data, we assume that the data written on the fifth disk is 1111, as shown in. Then the entire RAID-5 needs to complete the writing process into the following steps:
??
??
- Read the original data 0110, and then do an XOR operation with the new data 1111:? 0110 xor 1111 = 1001
- Read the original check digit 0010
- do an XOR operation with the original check digit with the value calculated in the first step: ? 0010 XOR 1001 = 1011
- 1111 new data is then written to the data disk, and the new check bit computed by the third step is written to the check disk.
?
???? As seen in the above steps, for any write, on the storage side, two reads + two writes are required, so the value of RAID-5 's write penalty is 4.
?
??
different RAID level of Write Penalty :
??
The following table lists the various RAID levels Write Penalty values:
??
RAID |
Write penalty |
0 |
1 |
1 |
2 |
5 |
4 |
6 |
6 |
10 |
2 |
??
?
RAID-0 : direct stripe, one write to the corresponding physical disk each time the data is written
RAID-1 and ten : RAID-1? and RAID-10 's writing penalty is very simple to understand, because the image of the data exists, so a write will be two times.
RAID-5 :RAID-5 due to the existence of a mechanism to calculate the check digit, it is necessary to read the data, read the check bit, write the data, write the check bit four steps, so the RAID-5 write penalty value is 4.
RAID-6 :RAID-6 because of the existence of two check bit, compared with RAID-5, need to read two check bit and write two check bit, so RAID-6 write penalty value is 6.
??
??
Calculation IOPS:
??
???? According to the above description, in the actual storage scenario design process, the calculation of the actual available IOPS must be included in the raid write penalty calculation. The formula is calculated as follows:
?
the total Physical disk IOPS =? of the physical disk iops?x Number of disks
??
available for IOPS =? (The Physical disk total iops?x Write Percentage ÷? RAID write penalty)? +? (The Physical disk total iops?x read%)
?
???? Assuming that the physical disk that makes up the RAID-5 can provide a total of up to IOPS, and that the application that uses that storage is 50%/50%, the actual available IOPS for the front-end host are:
?
(A. x 50%? ÷? 4) + (* 50%) = 312.5 IOPS
?
Read and write ratios for different applications can be found in the following examples: Description of different application storage IO types
?
Reference
??
about different application storage IO description of the type
On RAID write penalty (write penalty) and IOPS calculation