I have a Crucial BX500 SSD, 960 GB in dual boot with Windows 10 Update 04/2020 and Ubuntu 20.04.1. The disk is in GPT, the EFI partition is fat32 and the rest of Windows, of course, NTFS. On Linux, I only use root and home (since I have 16GB of RAM and AMD graphics card with 4GB), both are in Ext4. That said, come and ask, for those who have a deeper knowledge about file systems, which one should I use. This is because I'm thinking of leaving the entire SSD for Ubuntu (and putting win10 on a VM). What would you recommend: BTRFS, XFS, EXT4? Which would give better performance on the SSD and would be more secure. (I remember that OpenSuSE used Btrfs on the root partition and XFS on the home). Ubuntu 20.04 suggests, at the time of a clean installation, to use XFS in Root, but points out that it is experimental. What's up? Any personal tips?
Ubuntu – Ubuntu 20.04 on SSD: Filesystem
filesystemssd
Related Solutions
According to the tests by phoronix it always depends on many factors. In one case Btrfs
will be doing much better than EXT4
when reading large files on an SSD. Similarly while considering Disk transaction performance, Ext4
can perform better than the later.
You can have a look through these tests here, here and here (WARNING: Lengthy articles).
But summing altogether, Btrfs right now does not have a quantitative performance advantage over the EXT4 file-system, Even when using in the SSD mode.
So you can choose over Ext4
for now.
According to the principle designer of BTRFS, BTRFS still has some issues as filesystems become full. The send/receive functionality to send/receive snapshot differences for offsite backup also is not fully functional yet, and online deduplication (useful for backing up virtual machine images) is going to happen maybe for the 3.11 kernel (not yet released). raidz support was new for 3.10 and I haven't had a chance to test it yet, I may do that this evening. All in all, BTRFS is still under very active development, and I prefer to wait until it's finished (or at least not getting major functionality improvements with each kernel release!) before actually using it in production.
The advantage of using BTRFS or ZFS on an external enclosure used for rsync-based backups is that you can make snapshots via e.g. a daily cron job, and then do time travel to retrieve old data if necessary (if, say, files have disappeared from your hard drive for unknown reasons and you need to get them back from past backups). I use a USB3 enclosure with ZFSonLinux for that purpose because I need de-duplication support for virtual machines (since the big .img file is always different from the perspective of rsync, de-duplication means that only the actual changed blocks in the .img file get changed on the backup rather than multiple copies of huge 30gb files). Hopefully when the 3.12 kernel comes out the BTRFS deduplication support will be mature enough that I can migrate away from ZFS for this application -- ZFS is cool and all, but the fact that it is not integrated with the Linux kernel causes issues (e.g., I use a Centos 6.4 virtual machine to do the backups because ZFS won't compile against the 3.10 kernel).
For backing up Linux filesystems, create a snapshot on your BTRFS (or LVM) and mount the snapshot (if LVM) and back it up via rsync. That assures that you'll have a consistent backup as of the snapshot time. Then when finished with the snapshot, delete it. (More important with LVM since snapshots have a significant performance impact there). My cron script that fires off the backup job also does the rotation of the snapshots (daily, weekly, monthly) on my ZFS backup filesystem before it starts actually backing up, so that I can time travel if needed.
As far as reliability, hoary old ext4 is probably the most reliable filesystem because of the way it statically allocates structures on disk, meaning you can always find them and at least get most of your data back if things crash badly. The downside is poor performance on edge cases of very large files (where the way inode chain blocks work make random access in those files very slow), issues with large filesystems (which are very slow to create and fsck), or the edge case of large numbers of small files (which exhaust the inode table). I personally continue to run ext4 on top of LVM on top of RAID for my root filesystems and use other filesystems either for performance reasons or for functionality reasons as required.
Best Answer
It is really opinion and usage based, but my 2 cents are below:
I'm writing this answer from laptop with SSD where Ubuntu is installed into ext4 (GPT, two partitions for
/
and/home
). Having no filesystem related issues since 2013.Recently I have installed SSD to other laptop for Ubuntu testing and partitioned it using btrfs. This adds fantastic features - backup and restore the filesystem snapshots by using TimeShift. This functionality is great if you need to use real hardware with snapshots like if it was VirtualMachine with snapshots.
So you have to decide by yourself what do you need.