Best file system for Linux

No matter what distribution you are using now, soon or later if you job somehow depend on Linux productivity you will come to hard decision of which file system to use. Prior to start describing pros and cons of each file system and advise something, I would like do express some ideas about hardware part.sgi

Today (Feb 2014) you have various way of keeping information. Outsource way online, special dedicated devices, rented or colocated servers, disks, flash drives, tapes and optical media (CD, DVD, BD). I’m not going to describe all the benefits of each tool. I wish to make some statements which will help you to select suitable files system on disks: HDD or SSD.

Here I also wish to mention that HDD approach is not so obvious as it looks like. It is not only the device could be NAS or Server or simple PC, but it could be also variety of interfaces which makes big impact on you decision for selecting the file system. Some more parameter for misunderstanding will be added by RAID implementation (if it is requested).sas-wd

So HDD. The main parameter of HDD is it’s interface. Modern interfaces are: SATA 2/3, SAS/SAS2. The second very important parameter is speed of rotation: usually 7.2K, 10K, 10.5K, 15K. The third parameter is producer definition of this device (for storage, home, corporate, server, DB, CCTV).

As for interface, I do prefer SAS. Yes, it requires controller, it requires specific drivers which in theory could prevent your from using it with your favorite distro, but if worth to have it, especially latest SAS2. As for spin, I do prefer 7.2K – the main motivation is price, it is as cheap as simple SATA 7.2K HDD but in combination with SAS it is fare more advanced in term of speed, reliability and monitoring. As for definition, I prefer the drive to be marked as “for corporate or DB use”. For instance WD RE (1-4 series) of Hitachi (Ultra). Sometime producer likes the MBTF “pure marketing” measurements definition, like 1-2 million hours, but in reality that means nothing at all. The only exception when I can afford to by “cheap” drive if I do RAID10 (but I did it twice in my life, and only once with cheap drives). So the SAS2 drive with any rotation speed is my choice. It is more predictable device and I don’t like surprises.

ssd-pny

As for SSD everything looks more pretty straight forward. You can find SAS SSD but it will be non mainstream standard solution, with all limitation of buying “specific” hardware, and this is what I’m trying to avoid at any cost. So SATA3 SSD is perfect choice. What you should really pay attention is the ssd life limit and number of read/write cycles. It is a bit of a challenge to find this information and highlight it from various marketing shit, but the figures you should consider as your minimal for SSD of 120 GB are: 1.4 PT (PetaByte) for total usage and at least 10 000 write/read cycles. Keep in mind that for expensive devices these features could be 10 times higher with the same capacity. Good example is the PNY SSD9SC120GEDA-PB 120 GB SSD.

So now it is clear of the disk (non Raid) where the file system could live it’s happy life. So now the question is – which one it should be. First of all I will try to tell which one to avoid. It is not the final statement but just the thoughts from my personal experience.

Old file systems. Some one will pray on it’s “mature reliability” but I will never advise anybody to use EXT2, EXT3, FS (FreeBSD), JFS, Reiser (old one), XFS (prior Kernel 3.2) or BTFRS (prior Kernel 3.4), ZFS (good results only for Solaris system). Just don’t spend your time, especially for the first six systems

So, what is rest: EXT4, XFS and BTFRS. First, few words about BTFRS – this is the future, since the Linux Kernel 3.10 is available it contains production ready btfrs system, the only problem is the absence of any production ready Linux distribution with such kernel. Keep in mind that SuSe Linux already declared BTFRS as production ready.

ext4

sgibtrfs-opensuse

As for me, I left EXT4 for only for loader and root system purposes. In other words I’m avoiding EXT4 every where it is possible. For any data like Web Server content, databases partitions, or other non-OS data I’m using XFS file system (sometimes mounted with noatime parameter especially for MySQL DB partitions for better performance). It was hard step to decide to drop EXT4 from my list, but I spent enough time to make up my mind. The final push to this decision was RedHat announcement that XFS will be default file system in their version new RedHat 7.

Conclusion. At the current moment I suggest everybody to use “new” XFS file system, which is suitable for almost any tasks. There are some fears about lost partitions after power cut. This is true but only for default mounting settings for the systems with Linux Kernel prior version 2.6.32, and don’t forget that power supply is your own responsibility, so don’t be greedy for UPS and backup culture. I do also recommend to move out from EXT4 (main disadvantage – slower than XFS performance for concurrent I/O operations).  In future I suggest try where it is possible new BTFRS file system, which I suppose will become default standard for majority of distros.

Leave a Comment.

This site uses Akismet to reduce spam. Learn how your comment data is processed.