Mysql – n ideal filesystem type for the MySQL database directory (/var/lib/thesql)

filesystemshigh-availabilityMySQL

I've used ext3 and ext4 in the past with no issues, but I've seen a lot of installations on XFS as well. What are the advantages of XFS vs ext4 vs ?? with respect to the /var/lib/mysql directory?

Does the structure and size of your database influence the suitability of each? Are there other considerations?

Also, does filesystem choice impact High Availability at all?

Best Answer

XFS seems to handle multiple writing threads more scalably than ext4 (but see this link on SSDs). NB you're more likely to see a difference with innodb than myisam.

There's a lot of other things which you should be looking at though - do you have a UPS (with smart shutdown capability)? Battery backed disk controller? Switching off the journal barriers is more dangerous on XFS than extX.

Also, does filesystem choice impact High Availability at all?

Yes. But (except for the barrier thing) there's not muc difference between ext3/4 and XFS.