Ask 10 system engineers, which is the best Raid level and 8 will answer : Raid 5. The other two will ask the smart question :“for which application ?”
This is the start of a somewhat long article I think. The discussion is long and interesting.
When you try to evaluate the different Raid levels, you should be concerned with the kind of data transfers that will occur on it. Is it going to be a system with mostly Sequential transfers like a File-Server ? or is it going to be a system with mostly Random transfers like a Database Server ? Or is it going to be a mixture, and in that mixture, which kind of transfer occurs most ?
First, lets assume we are going to perform 400 Writes and 600 reads on a series of Raidsets. This means that the system will be working with mostly Reads, but still quite some Writes to deal with as well.
What would be the result for a Raid 0 ? (afterwards we can compare with Raid 1+0 and Raid 5
Let’s assume we have three Raid 0 Raidsets. each totalling in 72 GB Net Storage
In a Raidset with 2 disks, the total number of Reads and Writes gives you the number of IO’s so in this case, the number of IO’s (for 400 writes and 600 reads) is 1000 IO’s
When you only have 2 disks, you split those IO’s across the 2 disks, giving a total of 500 IO’s /disk
When we have 3 disks, we gain some speed because the total number of IO’s can be split across more disks. This gives you now 250 IO’s / disk
With 8 disks, the result will be 125 IO’s / disk
2 disks of 36GB = 1000/2 = 500 IO’s per disk
4 disks of 18GB = 1000/4 = 250 IO’s per disk
8 disks of 9GB = 1000/8 = 125 IO’s per disk
And what about Raid 1+0 ?
In a Raid 1+0, everything that has to be written has to be written twice. Reads can be performed across all disks.
Since we now have to take into account the writing, the number of IO’s to process is (400*2)+600 = 1400 IO’s / 4 = 350 IO’s /disk.
With 8 disks, this will give you 175 IO’s /disk With 16 disks : 87 IO’s /disk
4 disks of 36GB = 1400 /4 = 350 IO’s per disk
8 disks of 18GB = 1400/8 = 175 IO’s per disk
16 disks of 9GB = 1400/16 = 87 IO’s per disk
And Raid 5 ?
Raid 5 is a different story. In raid 5, each time you write something, the parity has to be calculated and written to the disks. But more importantly, to be able to write the parity and the data, a Raid 5 has
to read the data and parity that exists on the disk already – change it and write the data. The result is that the number of IO’s on Raid 5 for this same writing is much higher.
For 600 Reads and 400 writes, Raid 5 will take (4 * 400) + 600 = 2200 IO’s
3 disks of 36GB = 2200 / 3 = 733 IO’s / disk
5 disks of 18GB = 2200/5 = 440 IO’s / disk
9 disks of 9 GB = 2200/9 = 244 IO’s / disk
So, it is true, that 3 disks in Raid 5 is not as expensive to have fault tollerance… but is it really cheap ? If I add 1 extra disk to it and create a Raid 1+0 in stead of a Raid 5, I get the same capacity – I double my speed and I double my fault tollerance. (in a Raid 1+0 with 4 disks, when you have a second disk failing, you still have a 2/3 chance your system is up and running. With Raid 5, your system is down.
More on a next issue.