We took a typical USB 3.1 thumb drive and performed three types of test. One was Sysbench with its fileio mode, which we used for synchronous reads and writes. It’s a synthetic test, but it does stress a filesystem far more than most manual file operations. Second was the Postmark read test (100,000 transactions), while the third was the dataset test, which involved unpacking a Linux kernel tarball on to the drive.
The results turned out to be interesting and varied between Sysbench, Postmark and the dataset unpacking. The more strenuous Sysbench test revealed that Ext4 was the fastest filesystem in terms of simultaneous read/write operations that involved large files already on the drive. However, when it came to a more dense flow of thousands of tiny files, XFS was the best according to both Postmark and the dataset test. Btrfs seemed to reside in the mid-range, with fairly good results, although we doubt whether there’s any sense in using the snapshot feature on flash storage – but who knows? Btrfs showed very balanced results anyway. Reiser5 ran rather well in all tests, even outperforming Ext4 in the dataset unpack test.
The NTFS results were expectably poor due to the fact that so far we have only got a slower FUSE-based NTFS-3G driver, which often sees huge slowdowns, though with some exceptions (for example, Sysbench seems to favour NTFS). The downsides of NTFS-3G dissolve when we work with large files on our USB drive. That said, in certain scenarios, you won’t notice any difference between NTFS, XFS or Reiser5 on a flash drive. Summarising all observations, XFS seems to be the best option for a flash drive when dealing with small operations, while Ext4 is better for more serious I/O. Btrfs is also very strong, but you need to be cautious and keep an eye on things such as available free space (Btrfs health greatly depends on it). The safe option remains Ext4, which topped the chart in Sysbench, but lagged a little in the dataset test. It’s still a very fast and reliable filesystem, which works well with various types of storage, flash being no exception. XFS shines when dealing with small files, but loses its glory on heavier loads, which shows very sharply when stressing a USB flash drive.