I have an external hard drive on which i want to make a backup of my files.
Which file system between XFS and ext4 will be the fastest to write data on the hard drive?
Let me throw my practical answer into the ring: Go with ext4. You will see no read/write differences vs. XFS except in extreme edge cases (mass deletions of hundreds of thousands of small files, for example).
You will also find more community support for ext4 at places like AskUbuntu, simply because it is so widely used.
One notable disadvantage of XFS is that it cannot be shrunk (decrease partition size), so you would have to backup, repartition/reformat, restore if you ever wanted to decrease your XFS partition size.
The answer depends on your precise requirements.
ext4 has become the default filesystem for several of the popular Linux distributions including Ubuntu, Fedora and openSUSE. ext4 features several improvements over its predecessor, amongst which include support for files upto 16 tebibytes ( 1 tebibytes equals 1,024 gibibyes , with 1gibibyte equal to 1.074 gigabytes) and a maximum volume size of upto 1 Exbibyte. It is backward compatible with ext3 and ext2, making it possible to mount ext3 and ext2 as ext4. This will slightly improve performance, because certain new features of ext4 can also be used with ext3 and ext2, such as the new block allocation algorithm.
XFS is a highly scalable, high-performance file system which was originally designed at Silicon Graphics, Inc. It was created to support extremely large filesystems. XFS supports a maximum file system size of 8 exbibytes minus one (i.e. 263-1 bytes), though this is subject to block limits imposed by the host operating system. 32-bit Linux systems limit both file and file system size to 16 tebibytes.
There is a lot of information out there on this subject, but I would Start Here and try to explore if you want to take this further.
I hope this helps.
I would recommend this choice as of now. The default options for this file system are perhaps not the best in terms of performance (in comparison to XFS) but are safe for data. When you have an external hard disk, it is not as protected as an internal one.
On a laptop for instance, even if the electricity is plugged out, you still have a battery, so the internal had drive is rather safe. However, an external plugged hard disk can be prone to disconnection, e.g.: you get up with your laptop while forgeting about the attached drive.
Provides good performance for many enterprise work load, and probably some desktop ones too. However, you have a higher risk than upon disconnection or loss of power than some of the files are truncated to 0. XFS now offers options to prevent this but they are often not activated by default.
In 1 or 2 years I would recommend that file system as it supports checksum for data and journal. An external hard disk is more exposed than an internal one, so I consider this feature a must. But I would avoid it for now as there is no proper/stable tool for file system check and reparation. And for backup purposes I would also avoid it yet as it has too much restriction on the number of hard links which could prevent some backup tools to wok properly.
However, it provides an upgrade path from ext4. So when it get stable you could migrate your ext4 external disk to btrfs.
I have seen many Benchmarks of these filesystems, I think is better EXT4, but the difference with XFS i think is minimal...
In read/write benchmarks there are not so many differences and i use EXT4, and it is fantastic.
I'd recommend against ext4 if you have serious workload.
We have two build servers that run concurrent builds of our software, and if we do more than 1 concurrent build, we get hung tasks, which then force the build to exit. If we do only 1 build at a time, it completes fine. However, this defeats the purpose of having a multi-cpu, multi-core machine which could theoretically do 8 simultaneous builds (or 1 -j8 build)
Experience with ext4 isn't too good. It's still too young to use in the real world.
XFS is the best choice here since external drives are CPU intensive and highly dependent on the USB bus. When using extreme low power or high performance applications choices like these make a huge difference. XFS has worked great for me on an Atom N450 based appliance I built at home. It uses a whopping 9W and serves data fine.