Software vs Hardware Raid in Linux

Software vs Hardware Raid in Linux

An interesting real case experiment of various raid levels, and file system options.

Using RAID 5 with chunk of 128k, and Ext3 with a stride of 16 and block of 4k seems to be the best!
..and something that suprises me is that raid 50 was slower and less cost effective in terms of available storage than Raid 5.

I spent last night reformatting my raid array into RAID 10, then kernel RAID 10 level (rather than a RAID 0 array of RAID 1 arrays), then RAID 50, before going back to RAID 5. There was no real difference in output, and since RAID 5 maximises the storage space, it was an easy decision.

Which indicates that I need a much faster external SCSI box. All the discs are 10k u160 or better. The box is only a SUN UW Box. e.g. u40. I guess the bus is completely saturated!

For anybody who wants to experminent with software RAID in linux, MDADM is really the way to go. It’s just so easy….!

mdadm -v --create /dev/md0 --raid-devices=6 --level=raid5 /dev/sd[abcdef]1

mkfs.ext3 /dev/md0

mount /dev/mdo /mnt/raid

will create, build a filesystem and mount a 6 drive RAID 5 array. I should mention that between steps 1 and 2, you really should wait until the array has finished synchronising and reconstructing itself. Although this point is not essential, it will slow things down. Also MDADM is quite clever, and leaves a drive out as a spare. It constructs the array in degraded mode. That is the array is missing a drive. This speeds things up as there are less drives to saturate the bus.

3 Replies to “Software vs Hardware Raid in Linux”

  1. Hi, I read your article on RAID quite a long time ago when I was setting up some Dell rack hardware raid machine. Recently I revisited it as I was setting up my home raid array. My question is why didn’t you choose stride size of 32 (instead of 16) if you were using block size of 4k and a chunk size of 128k? ie 128/4 = 32?

  2. I’m afraid that I didn’t really understand what stride meant. I’d only just started playing with RAID when I wrote that, and I really just took the findings from that article and used them blindly!

    That RAID device has been formatted quite a few times since then!!!

  3. Well, if it means anything. Your article was quite instrumentive in getting the URI CS dept running on software RAID. In fact, beyond all the machine stability problems we had with the Dell hardware raid I bewlieve it was your bonnie++ benchmarks that clued me in to the idea that the performance of our hardware raid was quite poor.

    Going back to discussion of your benchmarks. It took me a little while but I finally learned that bonnie++ 1.93c benchmarks for chr tests changed from the ones in 1.01 and the benchmarks are not comparable.

Comments are closed.