copying files to USB 2.0 drive is damn slow

Bug #932033 reported by Teo
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Expired
Medium
Unassigned

Bug Description

Copying files from internal hard disk to a USB 2.0 pen drive transfers data at aproximately 8MBps (64Mbps).

I don't expect it to reach 100% of the theorectical maximum 60MBps but if it doesn't even get to 20% there is certainly something wrong.

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: linux-image-3.0.0-16-generic 3.0.0-16.28
ProcVersionSignature: Ubuntu 3.0.0-16.28-generic 3.0.17
Uname: Linux 3.0.0-16-generic i686
NonfreeKernelModules: nvidia
AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.24.
ApportVersion: 1.23-0ubuntu4
Architecture: i386
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: teo 936 F.... pulseaudio
 /dev/snd/pcmC0D0p: teo 936 F...m pulseaudio
CRDA: Error: [Errno 2] No such file or directory
Card0.Amixer.info:
 Card hw:0 'Intel'/'HDA Intel at 0xfebf8000 irq 49'
   Mixer name : 'Realtek ALC660-VD'
   Components : 'HDA:10ec0660,10430000,00100001 HDA:10573055,10431316,00100700'
   Controls : 25
   Simple ctrls : 16
Date: Tue Feb 14 13:45:38 2012
HibernationDevice: RESUME=UUID=b1b3e5fe-38e2-44c9-9e48-4564cd9f4d66
InstallationMedia: Ubuntu 10.04 LTS "Lucid Lynx" - Release i386 (20100429)
MachineType: ASUSTeK Computer Inc. M51Sn
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.0.0-16-generic root=UUID=173acbf5-26a0-49e3-8d2b-f1c142582cbf ro quiet splash vt.handoff=7
RelatedPackageVersions:
 linux-restricted-modules-3.0.0-16-generic N/A
 linux-backports-modules-3.0.0-16-generic N/A
 linux-firmware 1.60.1
SourcePackage: linux
StagingDrivers: zram
UpgradeStatus: Upgraded to oneiric on 2011-12-07 (68 days ago)
UserAsoundrc:
 pcm.!default { type pulse }
 ctl.!default { type pulse }
 pcm.pulse { type pulse }
 ctl.pulse { type pulse }
dmi.bios.date: 12/24/2007
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: 303
dmi.board.asset.tag: ATN12345678901234567
dmi.board.name: M51Sn
dmi.board.vendor: ASUSTeK Computer Inc.
dmi.board.version: 1.0
dmi.chassis.asset.tag: ATN12345678901234567
dmi.chassis.type: 10
dmi.chassis.vendor: ASUSTeK Computer Inc.
dmi.chassis.version: 1.0
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvr303:bd12/24/2007:svnASUSTeKComputerInc.:pnM51Sn:pvr1.0:rvnASUSTeKComputerInc.:rnM51Sn:rvr1.0:cvnASUSTeKComputerInc.:ct10:cvr1.0:
dmi.product.name: M51Sn
dmi.product.version: 1.0
dmi.sys.vendor: ASUSTeK Computer Inc.

Revision history for this message
Teo (teo1978) wrote :
Brad Figg (brad-figg)
Changed in linux (Ubuntu):
status: New → Confirmed
Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Do you know if this issue happened in a previous version of Ubuntu, or is this a new issue?

Would it be possible for you to test the latest upstream kernel? It will allow additional upstream developers to examine the issue. Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . Please test the latest v3.3 kernel[1] (Not a kernel in the daily directory). Once you've tested the upstream kernel, please remove the 'needs-upstream-testing' tag(Only that one tag, please leave the other tags). This can be done by clicking on the yellow pencil icon next to the tag located at the bottom of the bug description and deleting the 'needs-upstream-testing' text.

If this bug is fixed by the mainline kernel, please add the following tag 'kernel-fixed-upstream-KERNEL-VERSION'. For example, if kernel version 3.3-rc2 fixed the issue, the tag would be: 'kernel-fixed-upstream-v3.3-rc2'.

If the mainline kernel does not fix this bug, please add the tag: 'kernel-bug-exists-upstream'.

If you are unable to test the mainline kernel, for example it will not boot, please add the tag: 'kernel-unable-to-test-upstream'.
Once testing of the upstream kernel is complete, please mark this bug as "Confirmed".

Thanks in advance.

[1] http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.3-rc2-precise/

Changed in linux (Ubuntu):
importance: Undecided → Medium
tags: added: needs-upstream-testing
Changed in linux (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Teo (teo1978) wrote :

I'm not sure whether this is a regression or not, but I guess I would have noticed before if it was present in previous version.

One thing that I do know I had observed in previous versions (and I reported as a separate bugs) was that copying thousands of small files was very slow, and much slower than copying one big file of the same total size. Also, unzipping a big file containing the same thousands of small files from USB drive into the same USB drive was faster than copying the unzipped files from hard drive to usb drive (that is, the bottleneck was neither in creating files nor in writing them but somwhow in _transferring_ them - YET it wasn't in reading them either, because copying or unzipping them from HD to HD was "fast").
Here when I say "fast" I mean reasonably fast and much faster than the slow cases but I can't be sure whether it was the expected speed.

Now the slowness I'm observing is even in copying a single big file.

Regarding upstream kernel, I'm sorry but I'm not taking the (even small) risk of screwing up something and I don't have the time to test a live CD or something.

tags: added: kernel-unable-to-test-upstream
Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Ming Lei (tom-leiming) wrote : Re: [Bug 932033] Re: copying files to USB 2.0 drive is damn slow

In theory, the max usb 2.0 bulk transfer speed is 52MB/sec[1], also
for usb mass storage
device, there are CBW(31byte), CSW(13byte) and some control info in DATA packet,
so the actual usb mass storage performance is smaller than 52MB.

Generally usb device can not respond quickly enough to keep pace with usb host
controller, which may degrade transfer performance much. I have seen
many cheap usb
disks with only less than 10MB writing performance.

Also I seldom saw the usb mass storage device with above 40MB/sec
transfer performance.

So it is difficult to say it is a software problem or hardware
problem, but if you are interested
in the problem, you may use usbmon[2] to trace the transfer procedures
so that we
can see where the bad performance problem is.

[1], 5.8.4 Bulk Transfer Bus Access Constraints of usb 2.0 spec
[2], http://www.mjmwired.net/kernel/Documentation/usb/usbmon.txt

Ming Lei (tom-leiming)
Changed in linux (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for linux (Ubuntu) because there has been no activity for 60 days.]

Changed in linux (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.