Choosing a filesystem for your Linux/Unix server

  • HOME
  • >
  • >
  • Choosing a filesystem for your Linux/Unix server
Last Updated: 

Either for your workstation or a production system, the question of "which filesystem should I use?" always come up at some point. This decision is even more critical when setting up a production web servers or a database server. The defacto standard use to be Ext3, and now Ext4, though there is many other options available depending on your use case.

Some critical steps to consider before choosing a filesystem:

  1. Which Operarting System and versions will you be running (Ubuntu 20.04, CentOS 7, etc.)?
  2. What hardware do you depend on for storage (nvme, ssd, hdd, fusion-io, etc.)?
  3. What kind of workload and servcie do you plan to run (Database, Web, Caching, etc.)?

Check out the complete list of filesystem on Wikipedia for a detailed features comparison.

In the case of a MySQL Server you can try to benchmark your own server with the excellent tool SysBench and read this good article on Percona Website.

Here is a complete benchmark done with SysBench with a MySQL Server 4.1 on various filesystems where we can see the High Performance of XFS in a MySQL Environment: MySQL FileSystems Benchmark.

To conclude about filesystems, there is no "best filesystem", as any tuning performance aspect on a Linux/Unix box your choice will depend on your workload, your data integrity needing, the requested size, the disk characteristics, journaling needs, etc. Important things is to well understand your server bottleneck (you can use iostat and dd) then you could define your needs and choose your filesystem.

👉 Another important point will be to choose the correct scheduler. Nowadays, the default one is generally good, cfq : Completely Fair Queueing.

Related linux posts that you may like
What are the Differences Between Vi and Vim?
Review of the main differences between the Vi/Ex POSIX standard and the Vim implementation.
sudo: no tty present and no askpass program specified
Learn what is askpass and how to solve the 'sudo: no tty present and no askpass program specified' error when using sudo to execute a command.
What is the Bash Null Command?
Learn about the Bash null command, also known as the POSIX shell colon command. This post cover concrete use cases and pitfalls to avoid.