[Bug 244356] Writing to a USB 3.0 stick is very slow

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Tue May 26 10:03:20 UTC 2020


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=244356

--- Comment #89 from Olivier Certner <olivier.freebsd at free.fr> ---
Last test on SD_128G was done with UFS+SU, block size and fragment size set to
64k. Unfortunately, I got lots of (apparently transient) write errors in
`dmesg`, so not sure whether results are really representative. Either the
stick is failing, or the controller still doesn't like the pattern of accesses
presented to it.

Each transaction's size is 64k at least, sometimes 128k. Perhaps strangely,
errors are reported mostly for 128k-aligned addresses (~94% of the time). Might
be because the first write was to the upper 64k part of a 128k block. And since
I'm not seeing them with exFAT, this would hint for a flash block size of
precisely 128k. I did some more stats about clusters of errors, but nothing
especially interesting jumped to my eye.

For the record, global bandwidth is again bad (4.8MiB/s; 28MiB/s not counting
stalls), stalls account for ~83% of total test duration. Around 84GiB were
copied. If I do the same statistics after around ~18GiB have been copied, for
them to be more comparable with previous tests, I get 17.4MiB/s overall
bandwidth, which is way much better than best reported bandwidth for UFS so far
(around x2). There is a steep bandwidth decrease after about 14GiB have been
transferred. Prior to this point bandwidth is >= 20MiB/s, sometimes growing up
to 50MiB/s. After this point, bandwidth is always below 10MiB/s, in general
less than half of it (but with some spikes to 10MiB/s now and then).

The bandwidth decrease is much less clear with exFAT. It happens after a lot
more data have been transferred (>= 68GiB, going from ~60MiB/s to ~30MiB/s), is
not as dramatic as bandwidth can recover to up to 75% of the initial value
sometimes, and may not be comparable since I saw that for some reason files get
overwritten (strange, I should figure this out).

Now going to try simple `yes | dd` tests on Linux and FreeBSD, after full stick
zeroing.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-usb mailing list