0

I've been configuring dedicated MySQL server (linux) with 3x 300 GB SSD in SoftRaid. I'm trying to decide which Raid to use to get best performance. I'm expecting this database to be a read-heavy (90% select) and not so write heavy (5% insert+update). Storage capacity is not so important as performance. Is it better to use RAID 1 or RAID 5?

Thanks

  • Do your benchmarks. Without knowing your database and your workload, we can hardly guess what is going to work best for you. – Fox Aug 17 '15 at 14:06

2 Answers2

1

Since you are using SSD's performance should already be excellent. However you should be aware of the write penalty RAID5 incurs, but since you have specified a read heavy load then a 3 disk RAID5 will be faster on reads than a 2 disk RAID 1. I believe softRaid allows for a 3 disk mirror and I have never used softRaid so I am unable to comment on whether or not the reads will be faster with the 1, vs the 5.

Just be aware, RAID5 is parity based and RAID1 is a mirror. I would go for RAID1, since its always faster at writing that RAID5 and your reads will probably be similar between the two anyway.

But, there is no substitute for doing your own benchmarks to see what works best with your workload.

tomstephens89
  • 981
  • 1
  • 11
  • 23
  • 1
    I agree with tomstephens89, but it would be better for you to do your own benchmarks on your own hardware. Use md to build the RAID and use something like 'dd if=/dev/md16 of=/dev/null bs=1M count=10000' to do a read test. There are almost certainly other/better tests, but DD is quick and simple. If you can increase your disk count to 4, you might get better performance from RAID10. Also, I believe Linux can only calculate RAID5 parity single threaded. Not sure if that will bottleneck you at all. – qovert Aug 17 '15 at 15:32
0

RAID 1 just mirrors the drives which will only slow you down vs just 1 drive non raid. If you meant RAID 0 (Striping) then that would be your fastest option, but there would be no fault tolerance so if 1 drive goes the whole array is dead. RAID 5 will give the best of both worlds, it wouldn't be quite as fast, but with SSD's performance should not be an issue. Also a drive can fail and you will still have your data. Since this is software RAID make sure you have a good CPU as it will be performing all of the RAID operations for you.

Brian
  • 41
  • 6