On Wed, May 20, 2009 at 08:48:34PM -0000, Night64 wrote:
> Thanks for the info, Ts'o. But your comment about libusual caught my eye. In
> Ubuntu 9.04 this module still shows up, right?
> 
> [81601.434729] usbcore: registered new interface driver libusual

Oops, sorry, that's what I get for not checking the driver names more
closely.  libusual is mostly harmless; it's the mapping function that
arbitrates between ub and usb-storage drivers.  The USB low
performance device driver is ub.ko, normally found in,
kernel/drivers/block/ub.ko:

% find /lib/modules -name ub.ko 
/lib/modules/2.6.27-9-generic/kernel/drivers/block/ub.ko
/lib/modules/2.6.28-11-generic/kernel/drivers/block/ub.ko

You really, really, *really* want to avoid using the low performance
USB driver at all costs.  Fortunately at least with modern kernels
libusual defaults to trying to prefer the usb-storage driver.  I'm not
sure of the time frame, but a while ago, some distributions were
defaulting to using the ub driver, and *boy* was that a disaster.

The ub driver is useful in embedded devices where you might not want
to have the full USB stack (udev, hal, etc.), but I'm not sure why it
anyone would want it to use it on a normal system....

Simon's observation is quite right, some flash devices are just slow.
Note that "1x" flash devices will only write at 150k/s.  A "16x"
device will write at 2.4 MB/s.  And this is assuming the filesystem
doesn't get in the way.  This is the speed rating used by Compact
Flash or Secure Digital (CF or SD) cards.  USB sticks generally don't
have speed ratings at all, and depending on what you've purchased,
they could be quite slow indeed.  Note that with SD cards, sometimes
the high speeds advertised (i.e., 150x) may not apply at all unless
you have special hardware --- or sometimes the manufacturers are just
lying.  But given that there do exist "1x" flash devices that only
write at 150k/s should be a warning that some flash devices Are Just
Slow.  Hence my request that people who are really interested in
debugging this should use USB hard drives, and not USB flash devices
--- there's no way for us on the other side to know whether you are
using a high quality or low-quality flash device, and so the speed
problem could just be normal operation.

In general, sometimes small writes will seem to go fast, because they
get cached in memory.  But just because the write operation seems to
have completed doesn't mean that it's really done, or that it's safe
to remove the flash device.  So when you see an LED on a USB stick
flashing, that's a sign that it's still writing out.  If you write a
very large file, eventually there's no more memory available, and so
now the slow write speed becomes visible to the user.

So this is why I'm becoming more and more convinced that we should
just nuke this bug from orbit and start over.  Naive users who don't
understand this, can often see normal system performance, and report a
"me too!", and this just gums up the works.

There ***may*** be a real bug hiding in here somewhere, by some users.
Or it culd be a configuration bug; or a hardware bug.  But there are
too many users who are saying, "I'm seeing this too!", when in fact
they may just be seeing normal system behaviour.

                                        - Ted

-- 
file transfers on USB disk are very slow
https://bugs.launchpad.net/bugs/197762
You received this bug notification because you are a member of Ubuntu
Desktop Bugs, which is a bug assignee.

-- 
desktop-bugs mailing list
desktop-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/desktop-bugs

Reply via email to