Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
1  
I don't think it makes much of a difference, seeing as InnoDB more or less just creates one giant file on the filesystem. I imagine that almost any filesystem other than a copy-on-write filesystem like zfs or Btrfs is pretty good at reading and writing byte ranges of a file on a filesystem that contains just a few dozen files. Note that you can also put InnoDB on a raw partition (no filesystem), though that doesn't seem to be a popular thing to do. –  Celada Sep 19 '12 at 1:42
add comment

1 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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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