PC to USB transfer slow

I'm having trouble with USB transfer,not with external hard disk.

Transfer starts with like, for the transfer of 700MB file it starts with 30mb/s and towards the end it stops at 0s and stays put for like 3-4 mins to transfer the last bit.

I have tried different USB devices, but no luck. Is it a bug?

Another important point is, in Kubuntu there is no such issue. So is it something related to Gnome?

I'm using Ubuntu 11.10 64bit.

Somebody please help, it's really annoying.

Here are the details.

PC >> all of my drives are in ext4.

USB >> I tried ext3,ntfs and fat32. All having the same problem.

Here are my USB controllers details:

root@LAB:~# lspci|grep USB
00:1a.0 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #4 (rev 03)
00:1a.1 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #5 (rev 03)
00:1a.2 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #6 (rev 03)
00:1a.7 USB Controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #2 (rev 03)
00:1d.0 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #1 (rev 03)
00:1d.1 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #2 (rev 03)
00:1d.2 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #3 (rev 03)
00:1d.7 USB Controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #1 (rev 03)

Here is an example of one transfer.

I connected one of my 4GB usb device.

Nov 24 12:01:25 LAB kernel: [ 1175.082175] userif-2: sent link up event.
Nov 24 12:01:25 LAB kernel: [ 1695.684158] usb 2-2: new high speed USB device number 3 using ehci_hcd
Nov 24 12:01:25 LAB mtp-probe: checking bus 2, device 3: "/sys/devices/pci0000:00/0000:00:1d.7/usb2/2-2"
Nov 24 12:01:26 LAB mtp-probe: bus: 2, device: 3 was not an MTP device
Nov 24 12:01:26 LAB kernel: [ 1696.132680] usbcore: registered new interface driver uas
Nov 24 12:01:26 LAB kernel: [ 1696.142528] Initializing USB Mass Storage driver...
Nov 24 12:01:26 LAB kernel: [ 1696.142919] scsi4 : usb-storage 2-2:1.0
Nov 24 12:01:26 LAB kernel: [ 1696.143146] usbcore: registered new interface driver usb-storage
Nov 24 12:01:26 LAB kernel: [ 1696.143150] USB Mass Storage support registered.
Nov 24 12:01:27 LAB kernel: [ 1697.141657] scsi 4:0:0:0: Direct-Access     SanDisk  U3 Cruzer Micro  8.02 PQ: 0 ANSI: 0 CCS
Nov 24 12:01:27 LAB kernel: [ 1697.168827] sd 4:0:0:0: Attached scsi generic sg2 type 0
Nov 24 12:01:27 LAB kernel: [ 1697.169262] sd 4:0:0:0: [sdb] 7856127 512-byte logical blocks: (4.02 GB/3.74 GiB)
Nov 24 12:01:27 LAB kernel: [ 1697.169762] sd 4:0:0:0: [sdb] Write Protect is off
Nov 24 12:01:27 LAB kernel: [ 1697.169767] sd 4:0:0:0: [sdb] Mode Sense: 45 00 00 08
Nov 24 12:01:27 LAB kernel: [ 1697.171386] sd 4:0:0:0: [sdb] No Caching mode page present
Nov 24 12:01:27 LAB kernel: [ 1697.171391] sd 4:0:0:0: [sdb] Assuming drive cache: write through
Nov 24 12:01:27 LAB kernel: [ 1697.173503] sd 4:0:0:0: [sdb] No Caching mode page present
Nov 24 12:01:27 LAB kernel: [ 1697.173510] sd 4:0:0:0: [sdb] Assuming drive cache: write through
Nov 24 12:01:27 LAB kernel: [ 1697.175337]  sdb: sdb1

After that I initiated one transfer.

lsof -p 3575|tail -2

mv      3575 root    3r   REG    8,8 1719599104 4325379 /media/Misc/The Tree of Life (2011) DVDRip XviD-MAXSPEED/The Tree of Life (2011) DVDRip XviD-MAXSPEED www.torentz.3xforum.ro.avi

mv      3575 root    4w   REG   8,17 1046347776      15 /media/SREE/The Tree of Life (2011) DVDRip XviD-MAXSPEED/The Tree of Life (2011) DVDRip XviD-MAXSPEED www.torentz.3xforum.ro.avi

Here are the total time spent on that transfer.

root@LAB:/media/SREE# time mv /media/Misc/The\ Tree\ of\ Life\ \(2011\)\ DVDRip\ XviD-MAXSPEED/ /media/SREE/

real    11m49.334s
user    0m0.008s
sys 0m5.260s


root@LAB:/media/SREE# df -T|tail -2

/dev/sdb1     vfat     3918344   1679308   2239036  43% /media/SREE

/dev/sda8     ext4   110110576  60096904  50013672  55% /media/Misc

Do you think this is normal?? Approximately 12 minutes for 1.6Gb transfer?

Thanks.


Solution 1:

It sounds like the high number at the start is more of a cache value and when it fills up, Ubuntu is forced to wait for space before writing more.

Try watching iostat -k 5 (5 = 5 seconds refresh) from sysstat package (start it before you start the copy) and see if the write KB/s figure ever approaches 30MB/s - I'm guessing not and it's writing at a few hundred KB/s the entire way through.