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...
How To Create Simple Menu with the Shell Select Loop?
The select loop is not a regular shell loop. It can be used in Bash to generate a simple menu from which a user can select numbered options.
What is the Right Way to Loop in Bash?
Looping over a list of numbers or words is a building block in shell scripts. Learn how to write Bash loops, including for loop, while loop, and until loop.
What is the Best Way to Count Files in a Directory?
Learn how to count the number of files in a directory using the Linux command line ls, find, and a native bash shell solution with globs and arrays.
5 Mistakes To Avoid For Writing High-Quality Bash Comments
Adding comments in your Bash scripts is necessary to ensure maintainability over time. This post covers 5 Bash comments mistakes to avoid in your shell scripts.