Choosing a filesystem for your Linux/Unix server

  • HOME
  • >
  • LINUX
  • >
  • 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...
5 Simple Steps On How To Debug a Bash Shell Script
Learn how to quickly debug scripts in Bash with those 5 simple steps that use some of the Bash shell special properties.
A Complete Guide to the Bash Environment Variables
A complete guide on the Linux Bash environment variables with details on how to set, unset, and use the specials shell variables or define custom environment variables.
How To Make A Custom Bash Shell Prompt
Learn how to customize your shell prompt and the specificity of the Bash Prompt variables PROMPT_COMMAND, PROMPT_DIRTRIM, PS0, PS1, PS2, PS3, and PS4.
The Most Useful Bash Shortcuts That You Will Want To Use
A detailed review of the most useful Terminal and Bash shortcuts to improve your productivity when typing command-lines and how to customize the ones you don't like.