Mysql – Recommended filesystem for MySQL (xfs vs ext4)

ext4filesystemsMySQLxfs

Setting up a MySQL 5.5 server, and wondering what the recommended filesystem is? ext4 or xfs? Running InnoDB and 40% writes 60% reads. Thanks.

Best Answer

Although XFS is good, in practice I've found ext4 to be slightly faster.

I developed an application recently and compared the I/O performance of both and found ext4 to be slightly quicker for my application which was really just opening and reading whole files into memory. Seeking around those files which a DB will do may yield different results. However, I suspect in practice you may not really notice.

One thing that I recall reading about when testing various filesystems out for the app I was developing, is that XFS can screw up rather badly when it goes wrong. Something about filling files with zeros. I'm not sure where I read this, but another search yielded a link with some comments about this happening to them. http://arstechnica.com/civis/viewtopic.php?f=16&t=1169535

Therefore I'd opt for ext4 since it's better supported, quite fast and is the default on most linux distro's and now quite mature and stable.

btrfs is getting there but but still doesn't seem to be ready for production yet. If ZFS was a real contender on Linux I'd recommend that over ext4.