Concerning the innoDB storage engine, should the innodb_log_group_home_dir option (The directory path to the InnoDB log files) be configured to another disk, other than the default directory, in order to separate the log I/O activity from the actual data files?

Are there advantages, like in other DBMS, to put the data directory on a RAID5 storage volume and the redo log on a RAID1?


Yes, that would be a good idea. I have mentioned a FaceBook Engineer's Blog about doing that, along with putting the DoubleWrite Buffer and Tablespace Files in other places, in my other posts

RAID5 ??? OMG, NO !!!!!

Please do not put anything InnoDB-related in RAID5

Since you will need the the redo logs only in the event of crash recovery, I would go with RAID10 SAS Drives for the redo logs because they are sequentially written files. I would shy away from RAID1 because you want full redundancy of disk in the event of a disk crash. RAID5 does plenty of parity checking which can inhibit sequential writes.

| improve this answer | |

RAID-5 controller with a battery-backed write cache is excellent. Writes appear (to MySQL) to be instantaneous.

When comparing RAID-5 to -10, you need to decide whether you are comparing N drives to N drives or comparing M GB to M GB.

N drives: RAID-10 scatters its reads across N drives; So does RAID-5. Writes hit 2 drives in either case, but the read-modify-write for the parity block may make RAID-5 slightly slower.

M GB: Now you are comparing, say, 6 RAID-10 drives to 4 RAID-5 drives (to get 3 drives' worth of space). So RAID-10 probably wins on both reads and writes.

But... Unless you are saturating the I/O, the RAID controller hides the differences.

RAID-5 or -10 is better than manually putting files on different drives:

  • Less risk of running out of disk space on one drive when there is plenty of free space on other drives.
  • The I/O is more evenly spread out, hence better throughput. By manually splitting, you are likely to get one drive over-worked while the others are less busy.

One problem with "battery-backed": The controller periodically drains the battery to extend its lifetime. At that point, the write cache is turned off, and writes become miserably slow. (This cycling lasts a few minutes, and happens maybe twice a year.)

Both RAID-5 and RAID-10 can withstand a single-drive failure. -5 cannot handle 2 failures at once; -10 can handle some 2-drive failures. (See also -6.)

Since drive failure is one of many things that can go bad (motherboard, controller, power surge, earthquake, tornado, manual goof, software bug, overtemp due to AC failure, ...), I think it is shortsighted to think only about RAID (or even DRBD) when looking at HA, BCP, etc.

I vote for a single filesystem with N drives and RAID-5 or -10 with BBWC.

Well, that's for spinning drives.

For a mixed HD/SSD system, put "logs" on HD since sequential access is relatively fast; put InnoDB stuff on SSD, where random access is important. If possible, get a brand of SSD that guarantees atomic 16KB writes, then turn off InnoDB's "double write buffering".

For all-SSD, make sure the wear-leveling is good enough so that all drives don't wear out at the same time (thereby rendering RAID useless).

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.