Should RAID 5 be used in a MySQL server?

Usually the answer should be “no!”. RAID level 5 is hardly ever a good choice for any database storage. It comes with a very high overhead as each write turns into a sequence of four physical I/O operations, two reads and two writes, in order not only to update a data block, but also to re-calculate and update the corresponding checksum block. The resulting penalty is not just slower writes. The extra operations mean the storage I/O capacity is reduced too.

Another disadvantage of using RAID 5 could be its very poor performance when it works in degraded mode. In such configuration a disk failure means some data was actually lost, but RAID 5 can rebuild the missing pieces on-the-fly as requests arrive. But reconstructing blocks is nowhere near as efficient as just reading them from disk.

In most cases using alternative RAID levels is advised. Both RAID 1 and RAID 10 offer equal data redundancy and protection against disk failures, while at the same time offer better and more reliable performance. Example: Under a mixed read/write workload RAID 10 array over four 15k RPM disks should offer approximately 500 IOPS, while RAID 5 only 300 IOPS.

When using RAID 5 can make sense? In rare cases when disk capacity is much more important than performance, such as in archive databases that aren’t used a lot.

[MySQL Health Check]
About Maciej Dobrzanski

A MySQL consultant with the primary focus on systems, databases and application stacks performance and scalability. Expert on open source technologies such as Linux, BSD, Apache, nginx, MySQL, and many more. @linkedin

Speak Your Mind

*