"Best" (i.e. "universal") filesystem for portable USB drives?

If you copy 1GB file, what is the speed in MB/s for exFAT and what for ZFS?
Here are some numbers.

First, Linux kernel:
Code:
nfts linux on 2tb sn850x in 5950x:
fuse:
         ---Sequential Output----- ---Input---- ------Random-- -----Random----
         ---Block---- ---Rewrite-- ---Block---- ---ro Seeks--- -Seeks rewrite-
    MB    M/sec %CPU    M/sec %CPU   M/sec %CPU      /sec  %CPU     /sec  %CPU
 12288   152.5  23.0   193.2  25.2   2271.6  56.6  13346.2  10.6  9908.6  10.1
ntfs3:
    MB    M/sec %CPU    M/sec %CPU   M/sec %CPU      /sec  %CPU     /sec  %CPU
 12288  1497.5  92.5  2528.7  85.9   3704.1  90.8  52001.5  37.0 27514.1  26.1

FreeBSD:
Code:
ext2fs tests on freebsd.  5950x limited to 4 GB, intel optane 118 GB
kernel driver:
         ---Sequential Output----- ---Input---- ------Random-- -----Random----
         ---Block---- ---Rewrite-- ---Block---- ---ro Seeks--- -Seeks rewrite-
    MB    M/sec %CPU    M/sec %CPU   M/sec %CPU      /sec  %CPU     /sec  %CPU
 16384   929.2  59.2   407.2  27.8   1060.6  34.8  55511.6  45.6 52105.7  47.7
kldload fusefs
lklfuse -o type=ext2 /dev/nda1p1 /mnt/tmp
    MB    M/sec %CPU    M/sec %CPU   M/sec %CPU      /sec  %CPU     /sec  %CPU
 16384   189.3  12.9   110.8   8.7    275.9   6.0   4749.8   5.3  4340.4   5.2
fuse-ext2 -o rw+ /dev/nda1p1 /mnt/tmp
    MB    M/sec %CPU    M/sec %CPU   M/sec %CPU      /sec  %CPU     /sec  %CPU
 16384   197.0  11.9   125.7   8.0    315.1   7.1   4670.9   5.6  3686.5   4.8
UFS:
    MB    M/sec %CPU    M/sec %CPU   M/sec %CPU      /sec  %CPU     /sec  %CPU
 16384  1037.0  29.2   648.4  18.5   1421.3  27.9  70515.6  37.3 41371.9  30.8
ZFS compression=off:
    MB    M/sec %CPU    M/sec %CPU   M/sec %CPU      /sec  %CPU     /sec  %CPU
 16384   270.6   8.1   143.9   6.3    285.8   5.5   2835.0   3.6  2726.4   4.7
ZFS compression=on:
    MB    M/sec %CPU    M/sec %CPU   M/sec %CPU      /sec  %CPU     /sec  %CPU
 16384  3656.4  99.8  2934.0  99.7   7706.9 100.0 186341.2 299.1 111114.2 192.1
ZFS compression=zstd:
    MB    M/sec %CPU    M/sec %CPU   M/sec %CPU      /sec  %CPU     /sec  %CPU
 16384  2413.0  80.9  2121.2  97.3   5254.6 100.0 199282.6 299.0 66876.2 104.6
ZFS compression=zstd linux 6.5.0-17-lowlatency:
         ---Sequential Output----- ---Input---- ------Random-- -----Random----
         ---Block---- ---Rewrite-- ---Block---- ---ro Seeks--- -Seeks rewrite-
    MB    M/sec %CPU    M/sec %CPU   M/sec %CPU      /sec  %CPU     /sec  %CPU
 16384   820.7  94.5   485.2  97.0    915.1  99.9  45840.5 299.0 35812.8 240.3
compression=off:
    MB    M/sec %CPU    M/sec %CPU   M/sec %CPU      /sec  %CPU     /sec  %CPU
 16384   571.3  72.3   449.7  71.0   1660.9  99.9  92704.2 299.0  3736.2  12.7
ext2fs (yes, not ext4fs):
    MB    M/sec %CPU    M/sec %CPU   M/sec %CPU      /sec  %CPU     /sec  %CPU
 16384   628.1  75.6   828.6  40.2   1706.2  62.3 116026.1 113.6 97835.4 112.0
ext2fs, kernel limited to 4 GB:
    MB    M/sec %CPU    M/sec %CPU   M/sec %CPU      /sec  %CPU     /sec  %CPU
 16384   816.6  98.2   574.8  47.5   1694.6  65.4 120933.6 107.4 100704.9 111.2
ZFS compress=off:
    MB    M/sec %CPU    M/sec %CPU   M/sec %CPU      /sec  %CPU     /sec  %CPU
 16384   316.5  44.0   165.3  35.0    323.3  29.8   3242.5  16.8  3227.1  19.8
As you can see, compression alone makes a huge difference, especially on slow data medi, as is to be expected.

Benchmark:
 
Also worth reminding people that you don't have to use crappy USB sticks for portable storage. A M.2 NVMe SSD in a USB case is much better and not very expensive if you only need small capacity.
I did that with a spare NVMe drive from an upgrade. I got an Orico NVMe adapter and I've been quite happy with the performance.

As far as the rest of the topic goes, I personally use NTFS for those sorts of drives, unless I don't need them to work with multiple OSes. I've considered using something from the Linux or *BSD world other than that, but I haven't found an option that was better enough to justify choosing it.
 
The only full-performance access on all OSes is ZFS.
Unfortunately not accessible with OpenBSD.

I use an USB stick with ff2 of OpenBSD on both, Fee- and OpenBSD, but one must be careful with the label.

unfortunately FAT & is not usable with rsync, what I use to transport files.

I would also like to have a satisfactory answer to this question. I suspect, the answer is: none.

At best one have a back PC with ZFS mirror, and transfer files through ethernet cable.
Unfortunately not portable as an USB sitck.
 
the ufs/ffs of openbsd different from freebsd. I can even tar i write directly to disk no filesystem needed.
I do that, too, if everything fails. It's not really a file system but when you have tar and a direct access to the device? Pretty good. Can you do such things with windows also? tar tf /cygdrive/d?
 
works with windows dd and tar xf -
Good to know. Maybe some other archivers can do the same, as f.e. lha, zpaq, ...?
And it keeps the low level spies away, simply plugging in the stick and finding only "format this drive before you can use it" will not give them the data.
 
I'm somehow late into discussion but if the definition of portable includes devices as routers (for network filesystem) or SmartTVs I don't see any other option than NTFS or exFAT and that's it

I use ZFS whenever I can but if I want to plug it in a TV there aren't much other options than the mentioned above for large capacity disks.
 
Sure you can do that. But can you use /usr/bin/mt with it?
no, tape ioctls wont work. there is no simple way to append to an existing backup on a raw disk
you can try diferent hacks like creating partitions and/or simulate a crude allocation table but it with be a pain in the arse to calculate offsets and shit without a tool.
then you need that tool on windows and linux etc. better use fat32 with all its shitty limitations
 
Covecat, here i dont know what i'm saying here.
But could a memory mapped or file mapped loop backdevice be interesting.
The thing is you dont want complicity of a filesystem, but just mount this thing.
But Fat32 is too limited for me. Filenames , case, length of directories, and maximum length of files.
 
you can tar directly to floppies on bsd too. it even tells you to change media iirc
but no append.
more advanced backup programs could write a backup directory at the beginning of the media and use that to fast seek to different data
some sony cartriges even had some flash memory on the cartrige to store the catalog or something
 
Also, I remember that several years ago we discussed here a possibility to use UDF on flash drives. As a proof of concept I tried that, but don't remember the details and performance.
 
Also, I remember that several years ago we discussed here a possibility to use UDF on flash drives. As a proof of concept I tried that, but don't remember the details and performance.
Someone made a script for that meant to optimize for block size and compatibility. Haven't tried it, but I've come across several people over the years claiming it works well. I would use FAT32 if you don't need to store large files, exFAT otherwise.
 
Back
Top