There IS something broken in the FreeBSD USB 3 driver, but it's hard to locate.
So far I have invested 3 days in tracking down the issue, but I tend to give up and just recommend people NOT to use USB 3 with FreeBSD but stick with USB 2.
Below the bottom line it's about massive write speed problems with USB 3, which do NOT appear in USB 2. To distinguish the mode, I used usbconfig. If it's listed as "spd=SUPER (5.0Gbps)", the performance will be very slow. Only spd=HIGH works at the speed levels you expect. This leads to the absurd situation that USB 2 is a lot faster than USB 3 on FreeBSD.
So far I have tested on different system, from desktop to notebook, and with different media, from cheap to expensive usb stick, and external magnetic usb drives to avoid a flash-bottleneck. I also tested with different tools. From dd with different block sizes to a fully configured ZFS.
The results differ, which makes it hard to pin the problem.
The slowest experience I had was with the GT Voyager 32 GB and 64 GB stick in USB 3 mode + ZFS. Write speed went down to 50(!) kb/sec when doing zfs recv with a root filesystem. But there were also bursts with 30 MB/sec.
The fastest USB 3 experience was with an external hard drive, but i still was only able to reach around 5 MB/sec average when doing zfs recv. The really interesting thing with magnetic drives is that you can hear if it's working or not, because you can hear when it's writing stuff. I was able to observe that first it writes for 1 second, then it pauses for around 10 seconds, then another 1 second. This does not happen in USB 2 mode and the heads are writing data all the time.
I also observed that iostat always showed a qlen of constantly 10. Even when it's doing nothing. The hard drives doesn't write, but qlen is 10.
Again, all this does NOT happen with USB 2 and qlen varies wildly from 0 to 32.
So far I recommend NOT to use USB 3 with FreeBSD 13. This problem seems to exist for years already., but it's hard to pin down, because in the end it's working. It's just awfully slow.
Unfortunately I was unable to find an option to force the device to USB 2 mode, so if your computer only has USB 3 ports, you are screwed.
So far I have invested 3 days in tracking down the issue, but I tend to give up and just recommend people NOT to use USB 3 with FreeBSD but stick with USB 2.
Below the bottom line it's about massive write speed problems with USB 3, which do NOT appear in USB 2. To distinguish the mode, I used usbconfig. If it's listed as "spd=SUPER (5.0Gbps)", the performance will be very slow. Only spd=HIGH works at the speed levels you expect. This leads to the absurd situation that USB 2 is a lot faster than USB 3 on FreeBSD.
So far I have tested on different system, from desktop to notebook, and with different media, from cheap to expensive usb stick, and external magnetic usb drives to avoid a flash-bottleneck. I also tested with different tools. From dd with different block sizes to a fully configured ZFS.
The results differ, which makes it hard to pin the problem.
The slowest experience I had was with the GT Voyager 32 GB and 64 GB stick in USB 3 mode + ZFS. Write speed went down to 50(!) kb/sec when doing zfs recv with a root filesystem. But there were also bursts with 30 MB/sec.
The fastest USB 3 experience was with an external hard drive, but i still was only able to reach around 5 MB/sec average when doing zfs recv. The really interesting thing with magnetic drives is that you can hear if it's working or not, because you can hear when it's writing stuff. I was able to observe that first it writes for 1 second, then it pauses for around 10 seconds, then another 1 second. This does not happen in USB 2 mode and the heads are writing data all the time.
I also observed that iostat always showed a qlen of constantly 10. Even when it's doing nothing. The hard drives doesn't write, but qlen is 10.
Again, all this does NOT happen with USB 2 and qlen varies wildly from 0 to 32.
So far I recommend NOT to use USB 3 with FreeBSD 13. This problem seems to exist for years already., but it's hard to pin down, because in the end it's working. It's just awfully slow.
Unfortunately I was unable to find an option to force the device to USB 2 mode, so if your computer only has USB 3 ports, you are screwed.