I’m kind of interested in trying a USB device myself, as it should work.
What are your mount options? (In /etc/fstab?)
With btrfs, there a few basic things you can do to help with this high latency device.
I would use the options:
UUID=XX-X-XX / btrfs subvol=/@,noautodefrag,nodiscard,noatime,compress 0 0
-
noautodefrag - I changed my mind here, autodefrag is extra I/O attempting to optimise. And you hardly ever need to defrag btrfs in the way it operates in 2G chunks.
-
space_cache=v2
Edit: space_cache=v2 has been then default since v4.5
-
noatime - Disable file access times
Massive performance improvement as metadata doesn’t constantly get hammered
-
compress - compress all newly written data at the default compression level. The default is compress=zstd:3, which is fine and fast. You can experiment with higher, zstd:7 would probably be a good place to aim high, the trade off gets almost exponentially worse with higher values.
I’m not even a fan of compression, but this is a case where you want to offload some of the work to your CPU, and less data needs to be transferred over USB.
To make the whole volume compressed, we would have to run:
btrfs filesystem defrag -r -v -czstd:3 /
We don’t have to do it now, but to see the benefits it will need to be done.
@andreas85 knows a lot more about compression than I. I’ve only dabbled here and there.
Is this an NVMe drive in the enclosure? If so..
nodiscard - Disables on the fly TRIM for your drive
Since kernel 6.2, btrfs does default to discard=async
Perform a scheduled manual TRIM (weekly usually suffices), this will make everything faster day to day.
If you don’t want to remember, you can enable this service (it will TRIM all mounted file systems that support it):
$ systemctl status fstrim
○ fstrim.service - Discard unused blocks on filesystems from /etc/fstab
Loaded: loaded (/usr/lib/systemd/system/fstrim.service; static)
Active: inactive (dead) since Mon 2026-02-02 00:03:46 MST; 12h ago
Invocation: d91592da5e6949ea839029b12a18169c
TriggeredBy: ● fstrim.timer
Docs: man:fstrim(8)
Process: 59663 ExecStart=/usr/bin/fstrim --listed-in /etc/fstab:/proc/self/mountinfo --verbose --quiet-unsupported (code=exited, status=0/SUCCESS)
Main PID: 59663 (code=exited, status=0/SUCCESS)
Mem peak: 2.5M
CPU: 1.656s
But the point is to run this,when you don’t put load on the system.