Which is best Linux file System for SSD? Btrfs, ext4, XFS, F2FS

While formatting partitions on a Linux PC, you’ll see a wide variety of file system options. Or Setting up a new SSD on your Linux laptop or desktop doesn’t know what file system to go with. Don’t worry here four ( Btrfs, ext4, XFS, F2FS ) best Linux filesystem for SSD with pros and cons.

What is Linux File System?

A file system is a logical collection of files on a partition or disk, And partition is a container for information and can span an entire hard drive if desired. Linux file system starts with the root (/) directory. All files and directories are created and managed under this (root) directory. Since root directory stands on the top of file system, it has no parent directory. Besides root directory, every directory has a parent directory. Linux allows us to create as many files and directories as we want. We can create files under the existing directories or may create new directories.

best Linux filesystem for SSD

Linux File System Directories

/bin: Where Linux core commands reside like ls, mv.

/boot: Where boot loader and boot files are located.

/dev: Where all physical drives are mounted like USBs DVDs.

/etc: Contains configurations for the installed packages.

/home: Where every user will have a personal folder to put his folders with his name like /home/like geeks.

/lib: Where the libraries of the installed packages located since libraries shared among all packages unlike windows, you may find duplicates in different folders.

/media: Here is the external devices like DVDs and USB sticks are mounted and you can access their files from here.

/mnt: Where you mount other things Network locations and some distros you may find your mounted USB or DVD.

/opt: Some optional packages are located here and this is managed by the package manager.

/proc: Because everything on Linux is a file, this folder for processes running on the system, and you can access them and see much info about the current processes.

/root: The home folder for the root user.

/sbin: Like /bin, but binaries here are for root user only.

/tmp: Contains the temporary files.

/usr: Where the utilities and files shared between users on Linux.

/var: Contains system logs and other variable data.

Now you have a good idea about what the Linux file system is. Let’s discuss 4 best Linux filesystem for SSD.

Ext4 (fourth extended filesystem)

Ext4 is the default file system on most Linux distributions for a reason. It’s an improved version of the older Ext3 file system that includes a lot of great features, including ones for Solid State Drives (SSDS).

The reason that Ext4 is often recommended is that it is the most used and trusted filesystem out there on Linux today. It is used in massive data centers and in production, on all types of hard drives, including solid-state drives. If you’re a user that doesn’t care much about filesystems, do use this one.

Advantages of using Ext4

  1. Ext4 is widely used on almost every Linux distribution today, and most Linux users are familiar with Ext4, so finding help when using it on your SSD isn’t very difficult.
  2. Along with the support for TRIM, Ext4 also includes a lot of other SSD optimizations (for performance).
  3. Users can disable journaling to protect the limited read/write nature of their SSD.

Disadvantages of using Ext4

  1. Ext4 is built on older technology, so it lacks modern file-system features found in systems like E2FS and BtrFS.
  2. Ext4 has journaling on by default, and new users likely won’t know how to disable it to save read/writes on their SSDs.

BtrFS (B-Tree File System)

when talking about solid state drives, Btrfs is a pretty solid file system for basic usage. Initially designed at Oracle Corporation for use in Linux, Btrfs is a new kind of file-system that was created to mitigate problems, improve system performance, and make repair simple.

One reason that many people consider BtrFS for an SSD is that it doesn’t use a file system journal. Not having journaling allows it to save on write space (which is limited on SSDs). Also, it has a more modern architecture, which makes it quite fast when accessing data. In addition, BtrFS also has a robust snapshot feature, which allows users to create (and roll-back) changes to the system instantly.

As you might expect, BtrFS supports the usual SSD features like TRIM, and other SSD optimizations (like defragmentation, etc.).

Advantages of using BtrFS

  1. BtrFS doesn’t have journaling on by default, so unlike Ext4, you won’t need to turn it off if you don’t want file system journals eating into your read/write rate.
  2. The file system is new and under development so new features are added regularly.
  3. BtrFS has an SSD defragmentation feature that allows users to clean up the data on their drive.

Disadvantages of using BtrFS

  1. BtrFS is highly unstable and has the potential to crash and corrupt your data if something goes wrong.
  2. BtrFS has a copy-on-write feature that is arguably just as bad as filesystem journaling, and could (potentially) exhaust your SSD read/write limit.

XFS (Extend File system)

The XFS file system is well-known for its ability to handle and manage significant portions of data reliably, high-performance and speed. By far, XFS can handle large data better than any other file system on this list and do it reliably too. So, if you have a lot of data, need to access it fast and plan to store it on an SSD, XFS is a great choice. When you install a Linux OS to XFS on an SSD, you’ll get features comparable to Ext4, such as TRIM, and other optimizations. You’ll also get an SSD defragmentation feature.

Advantages of using XFS

  1. XFS is well-known for its ability to handle large amounts of data with ease. By using XFS on your SSD, you can ensure that your files are safe.
  2. The performance advantages of XFS on an SSD mean that you’ll be able to transfer and access files and data much quicker than other file systems.
  3. XFS has an SSD defragmentation feature, which is very useful, and will help keep your drive healthy.

Disadvantages of using XFS

  1. XFS is a journaling file-system, and it’s not possible to disable this feature. Not being able to disable journaling is something to be wary about if you’re worried about the SSD read/write limit.

F2FS (Flash-Friendly File System)

The Flash-Friendly File System (F2FS) is a file system developed by Samsung specifically for NAND-based storage devices on Linux and other operating systems that support it. F2FS only focuses on flash memory, so it has dozens of optimizations for SSDs on Linux. However, many Linux users shy away from it as not every Linux distribution supports it in their installation tool.

Advantages of using F2FS

  1. F2FS is explicitly designed for SSDs and other flash storage devices, so your OS will run efficiently and fast.
  2. F2FS is modern and relatively new, so it will most likely get new features as time goes on.

Disadvantages of using F2FS

  1. F2FS is a very new file system. While it’s true that lots of Linux distributions are starting to support it, it can’t be said that every single Linux OS out there makes it easy to install.

Hope this post help to choose the best Linux file system for SSD on your Linux laptop or desktop. Which file system you use on your Linux machine, share on comments below.

Also Read:

One Reply to “Which is best Linux file System for SSD? Btrfs, ext4, XFS, F2FS”

  1. I’ve been using BTRFS on Kubuntu since Kubuntu 16.04 beta. It has been faultless for me in every configuration I have tried it. I started using it on a single spinner, then added another spinner and converted it to RAID 1. Tried that for a while and then converted back to a RAID 0 on one drive, using the second drive as an archival backup.
    In my experience BTRFS has been very stable. About a year ago I swapped the first spinner with a 500GB SSD and moved my @ and @home subvolumes onto it. I generally do a fresh install when a new LTS comes out and that’s what I did when 18.04 was released. When systemd detects an SSD it activates trimfs automatically for once a week performance. Cautionary notes: 1) DO NOT install a dynamic database system to a BTRFS drive. It will corrupt the drive. If you want to use VirtualBox or lvmkqev then split off a piece of the drive and format it with EXT4 and point your vhds to it. Also, BTRFS devs have written that it is not wise to create more than 8 snapshots per subvolume.

    I experimented extensively with various applications that create snapshots automatically or do so with the click of a button. None of them work as well as making the snapshots manually, IMO. A snapshot takes only a second or two and one can snapshot botth @ and @home in less than 10 seconds, total. On my system doing a send and receive to an archival drive takes about 5-8 minutes for @ and about 10-12 minutes for @home. However, when I use the incremental method (using the -p parameter) @ takes less than a minute and @home takes about a minute.

    One aspect of BTRFS that I love is the ability to take the system snapshots, install software or do experiments with your configuration. If things work out take backup snapshots. If they don’t work out then it takes only about 5 minutes to roll back to the previous snapshots and reboot.

    I will never install a Linux distro if it does not allow me to install BTRFS as the root file system. I don’t have enough EEC RAM to run ZFS and besides, neither ZFS nor XFS are root file system choices in the Ubuntu installer.

Leave a Reply

Your email address will not be published.