Conclusions

Well, if you arrived here, congratulation: you had the patience to analyze about 20 graphs!

So, in the end, which filesystem should you choose for your server, EXT4 or XFS? As stated above, it all depends on the expected workload type. Below are my recommendations:

  • workstation machine: you can not go wrong with any of these two filesystems. While EXT4 is better at files creation and deletion (a common job on any machine), XFS re-balance the choice thank to higher speed with large files and near-perfect fragmentation resistance

  • development machine: if you plan to often create / delete / check any large volume, absolutely go with XFS

  • web server (apache + mysql): although EXT4 is competitive, XFS's higher MySQL and large files performances give it the edge here

  • file server: if you plan to store and actively use some large files, go with XFS; in the other case (small files) go with EXT4

  • MySQL database server: I slightly prefer XFS for this kind of workload

  • PostgreSQL server: definitely go with EXT4

  • virtualization (consolidation) server: while virtual machine consolidation is a very complex topic and a definitive answer will require extensive testing, I think that XFS should be the better choice as it has great large files performance and excellent fragmentation behavior (also don't forget its on-line defrag utility)

UPDATE 05/04/2011: Paul ask me to better explain the different filesystem choice for the two different database systems benchmarked (MySQL and PostgreSQL). The point is that, while both MySQL and PostgreSQL are very common opensource database, their implementations (and, in a certain extent, their purposes) are very different. For example, MySQL has optimization aimed at converting (or delaying) some random I/O operations in sequential ones. With these optimizations, MySQL can coalesce some random I/O operations in only one sequential read/write. PostgreSQL, instead, use different optimizations and generally tend to not delay random I/O writes. So, it is not surprising that EXT4 and XFS have quite different behaviors with these two different database server.

Remember that the above benchmark were collected with write barriers disabled! If you had to enable them to guarantee data integrity, the absolute results can be quite different (but the relative standing should remain more-or-less similar).

Feel free to contact me at This email address is being protected from spambots. You need JavaScript enabled to view it. to discuss this article.