Choosing the Best Linux Filesystem for Your SSD

When setting up a new Linux install with an SSD, many don’t know what file system to go with. This is understandable, as file systems are not talked about enough. When people install Linux, often times they select the default options without thinking about it. That’s not the right way to go about these things.

In this article we’ll go over the best file systems for your SSD on Linux. We’ll rank them and go over the positives and negatives of each.

1. Btrfs

ssd-btrfs

Btrfs has many enemies. The detractors say it is unstable, and this can be true as it is in very heavy development. Still, it actually is a pretty solid file system for basic usage. especially when talking about solid state drives. The main reason is that Btrfs doesn’t journal unlike some other popular filesystems, saving precious write space for SSDs and the files on them.

The Btrfs filesystem also supports TRIM, a very important feature for SSD owners. TRIM allows for the wiping of unused blocks, something critical to keeping a solid-state drive healthy on Linux. Filesystem TRIM is supported by other filesystems. This really isn’t the main reason to consider Btrfs for your solid-state drive when using Linux.

A good reason to consider Btrfs is the snapshot feature. Though it is very true that the same thing can be accomplished on other file systems with an LVM setup, other filesystems do not come close to how useful it can be. With Btrfs, users can easily take snapshots of filesystems and restore them at a later date if there are any issues. For users looking for the best SSD support on Linux, it’s crazy not to at least give Btrfs a look.

2 EXT4

ssd-ext4

For those not looking for fancy features like “copy-on-write” or filesystem “snapshots” done the Btrfs way, Extended 4 may be a good choice for a solid-state drive. 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.

However, the reason that it is not #1 on this list is for a simple reason. Extended 4 is not designed with SSDs in mind. It is true that it has file system trim support (a critical SSD feature), but outside of that the filesystem was never designed for this use case. Why? It uses a filesystem journal. This means that the filesystem is constantly writing logs down and informing the system of every single change. This can quickly wear out the limited write-space on an SSD running Linux.

Ext4 is a satisfactory choice for solid-state drives with filesystem journaling disabled, and a decent choice for most users, but it should not be the first choice.

3 XFS

ssd-xfs

One of the main reasons the XFS file system is used is for its support of large chunks of data. By far, XFS can handle large data better than any other filesystem on this list and do it reliably too. This is why XFS might be a great candidate for an SSD. As modern computing gets more and more advanced, data files get larger and more demanding. It makes sense to use a filesystem that can take into account all of this increase in data and do it reliably.

XFS, like Ext4, is a journaling filesystem. However, unlike Extended 4, it is not possible to disable journaling, thus it can be iffy to use on an SSD. Still, the filesystem is constantly called “high performance,” meaning it makes perfect sense to turn to this filesystem for high performance drives. Additionally, XFS supports standard SSD features and even defragmenting. SSD users unafraid of the journaling feature must take note of XFS when contemplating their new installation.

4 F2FS

ssd-samsung

F2FS is a filesystem developed by Samsung specifically for a new class of data storage: NAND. NAND is what people mean when they refer to “flash memory” and is how a solid-state drive stores data. F2FS is a relatively new, unknown technology. Despite this, it has already had some real success on Linux and elsewhere. Many F2FS fans seem to agree: why find a file system that plays nice with an SSD when there is one specifically built for it?

The downside to F2FS is that right now only power users can get it going. Most, if not all, Linux distributions do not support installing to it in their installation tools. The Linux kernel needs configuring and tweaking before usage. However, if you are a power user looking to get the most out of your solid-state drive on Linux, this is a filesystem you must look into. It might be a pain to set up, but it is worth it.

Conclusion

Solid-state drives are the new normal, but for some reason many Linux users are still unsure of what filesystems to go with, or even tweak them for better results. This is a shame. It is my hope that as solid-state drives become more prevalent on Linux, better filesystem choices within installers will follow.

Image credit: SSD_Questions,_Answered, Bonifacio_Global_City

Subscribe to our newsletter!

Our latest tutorials delivered straight to your inbox

Derrik Diener

Derrik Diener is a freelance technology blogger.