LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices



Closed Thread
 
Search this Thread
Old 10-19-2008, 11:34 AM   #1
uncertain
Member
 
Registered: Oct 2008
Location: Katowice, Poland
Distribution: Ubuntu, Backtrack, FC10
Posts: 40

Rep: Reputation: 15
Slow USB write speeds.


I'm using Ubuntu Hardy Heron, and since a system update back in June or July, I've had horribly slow USB write speeds. I can read from external HDDs and Flash drives at normal USB2.0 speeds, but write speeds are painfully slow, as in less than 5MB/s.

I've been reading up on this since I first noticed the problem. Not everybody seems to have this problem, and for every person that does have the problem, everybody has their own fix ideas that might work for them but don't seem to work for anyone else.

The problem doesn't seem to be distro-specific, nor does it seem to be tied to any one kernel or driver version. Some forum posts go back as far as the introduction of USB2.0. I've seen this exact problem - normal read speeds/slow write speeds - reported here in LQ, as well as on forums for Ubuntu, Mint, Arch, Suse, Fedora, and Debian (and probably some others I may have missed).

Launchpad has a bug report that claims GVFS is the culprit, and lists adding "pci=routeirq" to the kernel boot options in /boot/grub/menu.lst, but this solution does nothing for me except make my GUI sluggish and barely responsive while file transfers are happening. Another post I read somewhere suggests adding "irqpoll" to the boot options, but this has no effect for me.

I can definitively say that GVFS is not the problem. I've done multiple un-/re-installs of Ubuntu Hardy, Kubuntu Hardy, Xubuntu Hardy, and even Ubuntu Intrepid Ibex - all of them start out with blazing fast (approaching 30MB/s write speeds) for USB device writes, but eventually end up writing at 8MB/s, and the speed always tapers off as the file is written. A typical 700MB .avi file transfer to an external HDD will take me up to six solid minutes, when copying a file from the same HDD will take 30 or so seconds.

During my various Ubuntu installs, from inside Synaptic, I've locked the versions for GVFS, Nautilus, and the Kernel before ever connecting to the internet. The problem always arises.

Hopefully, this can end up being one thread where those of us who are experiencing this problem can get together and find a common cause. That being said, here's a ton of info that should get us started.

I'm running a Toshiba Satelliet a135 Laptop.
Output of lspci-v:
Code:
zero@zero-laptop:~$ lspci -v
00:00.0 Host bridge: Intel Corporation Mobile 945GM/PM/GMS, 943/940GML and 945GT Express Memory Controller Hub (rev 03)
	Subsystem: Toshiba America Info Systems Unknown device ff00
	Flags: bus master, fast devsel, latency 0
	Capabilities: <access denied>

00:02.0 VGA compatible controller: Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller (rev 03) (prog-if 00 [VGA controller])
	Subsystem: Toshiba America Info Systems Unknown device ff02
	Flags: bus master, fast devsel, latency 0, IRQ 17
	Memory at dc100000 (32-bit, non-prefetchable) [size=512K]
	I/O ports at 1800 [size=8]
	Memory at c0000000 (32-bit, prefetchable) [size=256M]
	Memory at dc200000 (32-bit, non-prefetchable) [size=256K]
	Capabilities: <access denied>

00:02.1 Display controller: Intel Corporation Mobile 945GM/GMS/GME, 943/940GML Express Integrated Graphics Controller (rev 03)
	Subsystem: Toshiba America Info Systems Unknown device ff02
	Flags: bus master, fast devsel, latency 0
	Memory at dc180000 (32-bit, non-prefetchable) [size=512K]
	Capabilities: <access denied>

00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 02)
	Subsystem: Toshiba America Info Systems Unknown device ff01
	Flags: bus master, fast devsel, latency 0, IRQ 21
	Memory at dc440000 (64-bit, non-prefetchable) [size=16K]
	Capabilities: <access denied>

00:1c.0 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 1 (rev 02) (prog-if 00 [Normal decode])
	Flags: bus master, fast devsel, latency 0
	Bus: primary=00, secondary=02, subordinate=02, sec-latency=0
	I/O behind bridge: 00002000-00002fff
	Memory behind bridge: d6000000-d7ffffff
	Prefetchable memory behind bridge: 00000000d0000000-00000000d1ffffff
	Capabilities: <access denied>

00:1c.1 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 2 (rev 02) (prog-if 00 [Normal decode])
	Flags: bus master, fast devsel, latency 0
	Bus: primary=00, secondary=04, subordinate=04, sec-latency=0
	I/O behind bridge: 00003000-00003fff
	Memory behind bridge: d8000000-d9ffffff
	Prefetchable memory behind bridge: 00000000d2000000-00000000d3ffffff
	Capabilities: <access denied>

00:1c.2 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 3 (rev 02) (prog-if 00 [Normal decode])
	Flags: bus master, fast devsel, latency 0
	Bus: primary=00, secondary=05, subordinate=05, sec-latency=0
	I/O behind bridge: 00004000-00004fff
	Memory behind bridge: da000000-dbffffff
	Prefetchable memory behind bridge: 00000000d4000000-00000000d5ffffff
	Capabilities: <access denied>

00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #1 (rev 02) (prog-if 00 [UHCI])
	Subsystem: Toshiba America Info Systems Unknown device ff00
	Flags: bus master, medium devsel, latency 0, IRQ 19
	I/O ports at 1820 [size=32]

00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #2 (rev 02) (prog-if 00 [UHCI])
	Subsystem: Toshiba America Info Systems Unknown device ff00
	Flags: bus master, medium devsel, latency 0, IRQ 20
	I/O ports at 1840 [size=32]

00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #3 (rev 02) (prog-if 00 [UHCI])
	Subsystem: Toshiba America Info Systems Unknown device ff00
	Flags: bus master, medium devsel, latency 0, IRQ 18
	I/O ports at 1860 [size=32]

00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #4 (rev 02) (prog-if 00 [UHCI])
	Subsystem: Toshiba America Info Systems Unknown device ff00
	Flags: bus master, medium devsel, latency 0, IRQ 17
	I/O ports at 1880 [size=32]

00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller (rev 02) (prog-if 20 [EHCI])
	Subsystem: Toshiba America Info Systems Unknown device ff00
	Flags: bus master, medium devsel, latency 0, IRQ 19
	Memory at dc444000 (32-bit, non-prefetchable) [size=1K]
	Capabilities: <access denied>

00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev e2) (prog-if 01 [Subtractive decode])
	Flags: bus master, fast devsel, latency 0
	Bus: primary=00, secondary=06, subordinate=0a, sec-latency=56
	Memory behind bridge: dc000000-dc0fffff
	Capabilities: <access denied>

00:1f.0 ISA bridge: Intel Corporation 82801GBM (ICH7-M) LPC Interface Bridge (rev 02)
	Subsystem: Toshiba America Info Systems Unknown device ff00
	Flags: bus master, medium devsel, latency 0
	Capabilities: <access denied>

00:1f.2 IDE interface: Intel Corporation 82801GBM/GHM (ICH7 Family) SATA IDE Controller (rev 02) (prog-if 80 [Master])
	Subsystem: Toshiba America Info Systems Unknown device ff00
	Flags: bus master, 66MHz, medium devsel, latency 0, IRQ 20
	I/O ports at 01f0 [size=8]
	I/O ports at 03f4 [size=1]
	I/O ports at 0170 [size=8]
	I/O ports at 0374 [size=1]
	I/O ports at 18b0 [size=16]
	Capabilities: <access denied>

00:1f.3 SMBus: Intel Corporation 82801G (ICH7 Family) SMBus Controller (rev 02)
	Subsystem: Toshiba America Info Systems Unknown device ff00
	Flags: medium devsel, IRQ 11
	I/O ports at 18c0 [size=32]

04:00.0 Ethernet controller: Atheros Communications Inc. AR242x 802.11abg Wireless PCI Express Adapter (rev 01)
	Subsystem: Askey Computer Corp. Unknown device 7106
	Flags: bus master, fast devsel, latency 0, IRQ 16
	Memory at d8000000 (64-bit, non-prefetchable) [size=64K]
	Capabilities: <access denied>

05:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8101E PCI Express Fast Ethernet controller (rev 01)
	Subsystem: Toshiba America Info Systems Unknown device ff00
	Flags: bus master, fast devsel, latency 0, IRQ 220
	I/O ports at 4000 [size=256]
	Memory at da000000 (64-bit, non-prefetchable) [size=4K]
	[virtual] Expansion ROM at d4000000 [disabled] [size=64K]
	Capabilities: <access denied>

06:04.0 CardBus bridge: Texas Instruments PCIxx12 Cardbus Controller
	Subsystem: Toshiba America Info Systems Unknown device ff00
	Flags: bus master, medium devsel, latency 168, IRQ 17
	Memory at dc006000 (32-bit, non-prefetchable) [size=4K]
	Bus: primary=06, secondary=07, subordinate=0a, sec-latency=176
	Memory window 0: 50000000-53fff000 (prefetchable)
	Memory window 1: 54000000-57fff000
	I/O window 0: 00001400-000014ff
	I/O window 1: 00001c00-00001cff
	16-bit legacy interface ports at 0001

06:04.1 FireWire (IEEE 1394): Texas Instruments PCIxx12 OHCI Compliant IEEE 1394 Host Controller (prog-if 10 [OHCI])
	Subsystem: Toshiba America Info Systems Unknown device ff00
	Flags: bus master, medium devsel, latency 32, IRQ 16
	Memory at dc005000 (32-bit, non-prefetchable) [size=2K]
	Memory at dc000000 (32-bit, non-prefetchable) [size=16K]
	Capabilities: <access denied>

06:04.2 Mass storage controller: Texas Instruments 5-in-1 Multimedia Card Reader (SD/MMC/MS/MS PRO/xD)
	Subsystem: Toshiba America Info Systems Unknown device ff00
	Flags: bus master, medium devsel, latency 57, IRQ 18
	Memory at dc004000 (32-bit, non-prefetchable) [size=4K]
	Capabilities: <access denied>

06:04.3 SD Host controller: Texas Instruments PCIxx12 SDA Standard Compliant SD Host Controller (prog-if 01)
	Subsystem: Toshiba America Info Systems Unknown device ff00
	Flags: bus master, medium devsel, latency 57, IRQ 20
	Memory at dc005800 (32-bit, non-prefetchable) [size=256]
	Capabilities: <access denied>
Output of lsmod:
Code:
zero@zero-laptop:~$ sudo lsmod
[sudo] password for zero: 
Module                  Size  Used by
xt_limit                3584  8 
xt_tcpudp               4096  12 
ipt_LOG                 7296  8 
ipt_MASQUERADE          4608  0 
ipt_TOS                 3200  0 
ipt_REJECT              5632  1 
nf_conntrack_irc        7576  0 
nf_conntrack_ftp       10144  0 
xt_state                3328  6 
wlan_tkip              13696  2 
nls_iso8859_1           4992  0 
nls_cp437               6656  0 
vfat                   14464  0 
fat                    54556  1 vfat
af_packet              23812  4 
ipv6                  267780  12 
i915                   32512  2 
drm                    82452  3 i915
rfcomm                 41744  2 
l2cap                  25728  13 rfcomm
bluetooth              61156  4 rfcomm,l2cap
vboxdrv                61104  0 
ppdev                  10372  0 
acpi_cpufreq           10796  1 
cpufreq_userspace       5284  0 
cpufreq_stats           7104  0 
cpufreq_powersave       2688  0 
cpufreq_conservative     8712  0 
cpufreq_ondemand        9740  1 
freq_table              5536  3 acpi_cpufreq,cpufreq_stats,cpufreq_ondemand
sbs                    15112  0 
sbshc                   7680  1 sbs
dock                   11280  0 
coretemp                8448  0 
sbp2                   24072  0 
parport_pc             36260  0 
lp                     12324  0 
parport                37832  3 ppdev,parport_pc,lp
joydev                 13120  0 
pcmcia                 40876  0 
wlan_scan_sta          14720  1 
pcspkr                  4224  0 
ath_rate_sample        14336  1 
serio_raw               7940  0 
evdev                  13056  7 
snd_hda_intel         344856  3 
snd_pcm_oss            42144  0 
snd_mixer_oss          17920  1 snd_pcm_oss
sdhci                  19076  0 
tifm_7xx1               8576  0 
psmouse                40336  0 
mmc_core               51460  1 sdhci
tifm_core              11012  1 tifm_7xx1
snd_pcm                78596  2 snd_hda_intel,snd_pcm_oss
yenta_socket           27276  1 
rsrc_nonstatic         13696  1 yenta_socket
pcmcia_core            40596  3 pcmcia,yenta_socket,rsrc_nonstatic
snd_page_alloc         11400  2 snd_hda_intel,snd_pcm
snd_hwdep              10500  1 snd_hda_intel
iTCO_wdt               13092  0 
snd_seq_dummy           4868  0 
iTCO_vendor_support     4868  1 iTCO_wdt
ath_pci               101024  0 
wlan                  207728  5 wlan_tkip,wlan_scan_sta,ath_rate_sample,ath_pci
ath_hal               192592  3 ath_rate_sample,ath_pci
snd_seq_oss            35584  0 
snd_seq_midi            9376  0 
snd_rawmidi            25760  1 snd_seq_midi
snd_seq_midi_event      8320  2 snd_seq_oss,snd_seq_midi
battery                14212  0 
container               5632  0 
snd_seq                54224  6 snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_seq_midi_event
snd_timer              24836  2 snd_pcm,snd_seq
snd_seq_device          9612  5 snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_rawmidi,snd_seq
video                  19856  0 
output                  4736  1 video
ac                      6916  0 
snd                    56996  17 snd_hda_intel,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_hwdep,snd_seq_dummy,snd_seq_oss,snd_rawmidi,snd_seq,snd_timer,snd_seq_device
button                  9232  0 
intel_agp              25492  1 
soundcore               8800  1 snd
agpgart                34760  3 drm,intel_agp
shpchp                 34452  0 
pci_hotplug            30880  1 shpchp
iptable_nat             8324  0 
nf_nat                 20396  2 ipt_MASQUERADE,iptable_nat
nf_conntrack_ipv4      19080  8 iptable_nat
nf_conntrack           66752  7 ipt_MASQUERADE,nf_conntrack_irc,nf_conntrack_ftp,xt_state,iptable_nat,nf_nat,nf_conntrack_ipv4
iptable_mangle          3712  0 
iptable_filter          3840  1 
ip_tables              14820  3 iptable_nat,iptable_mangle,iptable_filter
x_tables               16132  9 xt_limit,xt_tcpudp,ipt_LOG,ipt_MASQUERADE,ipt_TOS,ipt_REJECT,xt_state,iptable_nat,ip_tables
ext3                  136840  2 
jbd                    48404  1 ext3
mbcache                 9600  1 ext3
sg                     36880  0 
sr_mod                 17956  0 
cdrom                  37408  1 sr_mod
sd_mod                 30720  4 
usb_storage            73664  0 
libusual               19108  1 usb_storage
ata_piix               19588  4 
pata_acpi               8320  0 
ata_generic             8324  0 
libata                159344  3 ata_piix,pata_acpi,ata_generic
scsi_mod              151436  6 sbp2,sg,sr_mod,sd_mod,usb_storage,libata
ohci1394               33584  0 
ieee1394               93752  2 sbp2,ohci1394
ehci_hcd               37900  0 
uhci_hcd               27024  0 
usbcore               146412  5 usb_storage,libusual,ehci_hcd,uhci_hcd
r8169                  33156  0 
thermal                16796  0 
processor              37384  4 acpi_cpufreq,thermal
fan                     5636  0 
fuse                   50708  3 
vesafb                  8964  1 
fbcon                  42912  72 
tileblit                3456  1 fbcon
font                    9472  1 fbcon
bitblit                 6784  1 fbcon
softcursor              3072  1 bitblit
The last lines of dmesg pertaining to mounting my external disk:
Code:
[ 2237.395061] usb 5-1: new high speed USB device using ehci_hcd and address 7
[ 2237.528705] usb 5-1: configuration #1 chosen from 1 choice
[ 2237.529130] scsi7 : SCSI emulation for USB Mass Storage devices
[ 2237.529624] usb-storage: device found at 7
[ 2237.529630] usb-storage: waiting for device to settle before scanning
[ 2242.524853] usb-storage: device scan complete
[ 2242.525457] scsi 7:0:0:0: Direct-Access     STECH    Simple Drive     8.14 PQ: 0 ANSI: 0
[ 2242.530173] sd 7:0:0:0: [sdb] 625142448 512-byte hardware sectors (320073 MB)
[ 2242.531038] sd 7:0:0:0: [sdb] Write Protect is off
[ 2242.531046] sd 7:0:0:0: [sdb] Mode Sense: 23 00 00 00
[ 2242.531052] sd 7:0:0:0: [sdb] Assuming drive cache: write through
[ 2242.532409] sd 7:0:0:0: [sdb] 625142448 512-byte hardware sectors (320073 MB)
[ 2242.533283] sd 7:0:0:0: [sdb] Write Protect is off
[ 2242.533290] sd 7:0:0:0: [sdb] Mode Sense: 23 00 00 00
[ 2242.533295] sd 7:0:0:0: [sdb] Assuming drive cache: write through
[ 2242.533302]  sdb: sdb1
[ 2242.544829] sd 7:0:0:0: [sdb] Attached SCSI disk
[ 2242.544916] sd 7:0:0:0: Attached scsi generic sg2 type 0
Output of lsusb -v pertaining to the just-mounted drive:
Code:
zero@zero-laptop:~$ lsusb -v

Bus 005 Device 007: ID 4971:ce03  
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x4971 
  idProduct          0xce03 
  bcdDevice            8.14
  iManufacturer           1 
  iProduct                2 
  iSerial                 3 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           32
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xc0
      Self Powered
    MaxPower                2mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol     80 Bulk (Zip)
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               1
can't get device qualifier: Operation not permitted
can't get debug descriptor: Operation not permitted
cannot read device status, Operation not permitted (1)
Output of cat /proc/bus/usb/devices:
Code:
zero@zero-laptop:~$ cat /proc/bus/usb/devices

T:  Bus=05 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480 MxCh= 8
B:  Alloc=  0/800 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=0000 ProdID=0000 Rev= 2.06
S:  Manufacturer=Linux 2.6.24-21-generic ehci_hcd
S:  Product=EHCI Host Controller
S:  SerialNumber=0000:00:1d.7
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   4 Ivl=256ms

T:  Bus=05 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  7 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=4971 ProdID=ce03 Rev= 8.14
S:  Manufacturer=STECH   
S:  Product=Simple Drive    
S:  SerialNumber=0010101140702E42
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  2mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=125us

T:  Bus=04 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 2
B:  Alloc=  0/900 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=0000 ProdID=0000 Rev= 2.06
S:  Manufacturer=Linux 2.6.24-21-generic uhci_hcd
S:  Product=UHCI Host Controller
S:  SerialNumber=0000:00:1d.3
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   2 Ivl=255ms

T:  Bus=03 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 2
B:  Alloc=  0/900 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=0000 ProdID=0000 Rev= 2.06
S:  Manufacturer=Linux 2.6.24-21-generic uhci_hcd
S:  Product=UHCI Host Controller
S:  SerialNumber=0000:00:1d.2
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   2 Ivl=255ms

T:  Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 2
B:  Alloc=  0/900 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=0000 ProdID=0000 Rev= 2.06
S:  Manufacturer=Linux 2.6.24-21-generic uhci_hcd
S:  Product=UHCI Host Controller
S:  SerialNumber=0000:00:1d.1
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   2 Ivl=255ms

T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 2
B:  Alloc=  0/900 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=0000 ProdID=0000 Rev= 2.06
S:  Manufacturer=Linux 2.6.24-21-generic uhci_hcd
S:  Product=UHCI Host Controller
S:  SerialNumber=0000:00:1d.0
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   2 Ivl=255ms
sudo hdparm -tT /dev/sdb
Code:
zero@zero-laptop:~$ sudo hdparm -tT /dev/sdb
[sudo] password for zero: 

/dev/sdb:
 Timing cached reads:   1698 MB in  2.00 seconds = 849.57 MB/sec
 Timing buffered disk reads:   94 MB in  3.05 seconds =  30.85 MB/sec
If there's any other info I can provide, I'd be happy to. I want to get this problem licked.
http://img262.imageshack.us/img262/8...eenshotmw3.png
 
Old 10-21-2008, 12:34 AM   #2
Electro
Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
USB is not meant to be use for storage. It is meant to replace communication ports and PS/2 connections. USB can not handle high speed data all the time because it is too software dependent. Using GUI programs will always tries to sync the data to figure the difference of size. If you use IEEE-1394 (aka Firewire or i.Link) or even better SATA, your storage device will be a lot faster. I suggest do not use a program that gauges how long to copy or move files because you get lower performance. When mounting external USB drives, do not use sync as a mount option.

Everybody has this problem. It is just how USB works in any operating system.

The utility hdparm is not a benchmark tool because it only calculates raw performance.
 
Old 10-21-2008, 09:54 AM   #3
uncertain
Member
 
Registered: Oct 2008
Location: Katowice, Poland
Distribution: Ubuntu, Backtrack, FC10
Posts: 40

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Electro View Post
Everybody has this problem. It is just how USB works in any operating system.
For over two years, it wasn't a problem for me until this past summer. That's across four versions of Ubuntu (Edgy, Feisty, Gutsy, and Hardy), Slax, Slackware, Backtrack, Debian, DreamLinux, and Mint. It certainly isn't a problem on any of the Vista or XP installs I have laying around, either. Not only do I have slow speeds (never higher than 8MB/s) when transferring files to an external hard disk, but doing that causes my GUI to become sluggish. If USB wasn't meant for storage purposes, flash drives and external hard disks wouldn't exist.

How do I change the automount options for the half-dozen or so USB storage devices I use regularly? I've yet to see any definitive answer on how to make these changes, and I've been searching on this problem for four months now.. All that shows up in my fstab is my root partition, home partition, and swap space.

Last edited by uncertain; 10-21-2008 at 09:58 AM.
 
Old 10-21-2008, 07:12 PM   #4
Electro
Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
I recommend turn off automount so those utilities do not automatically mount them. If you insist of using them, look up hal and dbus. I do not use them because I prefer not adding a line to /etc/fstab to ease mounting external storage devices instead I mount them manually. This takes more time, but I can mount it as read-only if I want to just browse the files with out editing them.

For me it is always a problem with USB. It is not meant to be used with storage devices. Intel pushed this interface to developers throats to make devices while Apple did not get any chance to provide IEEE-1394 for Intel or AMD systems until many years later.

A sluggish GUI means your distribution have set the kernel to preemptive for desktop use which is OK for normal daily use. In some cases preemptive for desktop use will make the kernel to take more time processing programs while sacrificing bandwidth. I prefer voluntary preemptive for server use for higher bandwidth which works quite nicely.

Windows 2000/XP and Windows Vista has a complete different infrastructure for USB compared to Linux. The USB storage module, usbstorage, in Linux is reversed engineer. The USB low performance storage module, uba, is supposedly replace usbstorage but it seems it will not. I strongly recommend use IEEE-1394 for the best possible performance for external storage.
 
Old 10-22-2008, 07:39 AM   #5
uncertain
Member
 
Registered: Oct 2008
Location: Katowice, Poland
Distribution: Ubuntu, Backtrack, FC10
Posts: 40

Original Poster
Rep: Reputation: 15
My devices aren't being mounted in sync mode, anyways:
Code:
zero@zero-laptop:~$ cat /proc/mounts | grep vfat
/dev/sdb1 /media/disk vfat rw,nosuid,nodev,relatime,uid=1000,fmask=0077,dmask=0077,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8 0 0
zero@zero-laptop:~$
And it is recognized as a USB2.0 Device, and speed is detected at 480Mb/s, as ooposed to 12:
Code:
zero@zero-laptop:~$ cat /proc/bus/usb/devices

T:  Bus=05 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=13fe ProdID=1a00 Rev= 1.00
S:  Manufacturer=        
S:  Product=USB DISK 2.0    
S:  SerialNumber=07690790A475
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=200mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
And yet, I get this:
http://img262.imageshack.us/img262/8...eenshotmw3.png
 
Old 10-22-2008, 06:09 PM   #6
Electro
Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
When will you learn that GUI programs like that will not provide you accurate results. Also USB is a very, very limited connection, so throughput will be affected when trying to sync data. Again GUI programs that gauges the length of time and throughput will sync the data to get a before and after values then it calculate the difference between the values to get a result for write performance.

USB is just slow period. I strongly recommend you use IEEE-1394 or SATA for external storage. When using either IEEE-1394 or SATA for external data storage, you will get equal performance as internal storage drives.

You could use IOzone, Bonnie++, or other storage benchmark utilities to figure out the throughput. It should not be any different.
 
Old 10-22-2008, 07:30 PM   #7
uncertain
Member
 
Registered: Oct 2008
Location: Katowice, Poland
Distribution: Ubuntu, Backtrack, FC10
Posts: 40

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Electro View Post
USB is just slow period. I strongly recommend you use IEEE-1394 or SATA for external storage. When using either IEEE-1394 or SATA for external data storage, you will get equal performance as internal storage drives.
I don't currently own any 1394 or SATA devices. What I do own is an external USB hard disk and a handful of thumb drives.

I know they're not as fast as other storage devices, but my entire point is that until a system update in a few months back - all the way from my days towards the end of Edgy Efts' life cycle (early Spring of 2007), through Feisty Fawn, clear through Gutsy Gibbon and on into my first couple months of using Hardy Heron - I had USB read and write speeds that approached and sometimes hit 30MB/s.

If that's not a technically-accurate measure, as you say, then let me put it this way:

Writing three or four gigs of movie (.avi) files to my external hard disk - as recent as a few months ago - used to take no more than a few minutes, and now it takes almost ONE FULL HOUR to make it happen. How's that for a scientific analysis?

When I first bought this Toshiba Satellite a135 laptop brand-new in April of '07, the first thing I did when I got it home was resize the default Vista install and slap Feisty Fawn into it. I had 20 to 30MB/s transfer speeds. It is capable of it. It used to do it.

Since I first noticed this problem back in June or July, I've re-installed Ubuntu almost ten times trying to track this down (One Feisty, one Gutsy, and Hardy KDE, Gnome, and XFCE twice each). I could re-install it right now and get those transfer speeds again but the performance would die again after the first update.

I shouldn't have to re-install an entire OS from scratch and lock version numbers on every single installed package in order to fix this. The problem should be identifiable and correctable. I shouldn't have to go out and blow a couple hundred bucks on new hardware when I know for a fact that there's nothing wrong with what I already own. (Everything works fine under Vista on the same computer. Everything works fine when I boot the same computer off of a live-cd by any distro that has one.) These same devices have always automounted and there never used to be a problem. Everybody says "manually mount without sync", but as I showed, my automount isn't using sync so that's obviously not the problem. And it's not "just how USB works on any system" - because it used to work completely differently on this very same system.

Please - If you have no advice to offer or a practical method for me to hunt down this problem, unsubscribe this thread and let me try to get help from someone who does.

Last edited by uncertain; 10-22-2008 at 07:35 PM.
 
Old 10-23-2008, 03:56 PM   #8
jbahr
LQ Newbie
 
Registered: Oct 2008
Posts: 3

Rep: Reputation: 0
Slow USB

Right. Electro doesn't know what he's talking about. IEEE 1394 tops out at 786 Mbit/sec and USB 2.0 at 480 Mbits/sec. In practice, firewire mass storage devices aren't any faster.

We've done tests on very fast compact flash devices on USB 2.0 and achieved well over 30 MB/sec reading and writing. That being said, I don't know what could be wrong with your USB setup (sorry).

We have a client who needs to preload a large (like 100,000 per month) number of audio players with content. We have done tests with them, mounted as raw devices and no file system. We found that we could write to one of them with good performance, but write speeds dropped dramatically after two or three devices were added and just got worse from there. We tried PCI-based USB 2.0 controllers, no external hubs, and doing the sync's ourselves and nothing helped. It looks like there may be a bottleneck in libusb or somewhere in the kernel. Anybody have any ideas?

I was thinking of looking at the fast USB library in the USRP project, haven't had time yet. It enqueues multiple URBs and does I/O about as fast as it can get done.

J
 
Old 10-23-2008, 05:02 PM   #9
uncertain
Member
 
Registered: Oct 2008
Location: Katowice, Poland
Distribution: Ubuntu, Backtrack, FC10
Posts: 40

Original Poster
Rep: Reputation: 15
Well, one other clue to my specific problems might be that they're not limited solely to USB devices - moving files between partitions on my internal HDD is just as time-consuming.

No too long ago, I was heading out the door to go somewhere with the wife and my new habit is to set my files to copy while I'm away or asleep. I selected all the files in my Videos folder I wanted to save to my USB disk, but I accidentally hit the Delete key, sending them to the Trash Bin. "No big deal," I thought, "I'll just move them back to Videos and then move them to the disk."

I have my Home directory on a its' own partition, and moving the files from Trash back to ~/Videos took as long as it would have to move them to the USB device.

Since then, I've come to learn that moving files between my Home dir (or anywhere else in Ubuntu) and my Windows partition also has the bad write lag.

Reading files from anywhere isn't a problem - I can run an .avi file right off my USB HDD through VLC and have no problems. If I want to read that same file and write it to a different partition, that's where the problem comes in.
 
Old 10-24-2008, 12:54 AM   #10
Electro
Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
Quote:
Originally Posted by jbahr View Post
Right. Electro doesn't know what he's talking about. IEEE 1394 tops out at 786 Mbit/sec and USB 2.0 at 480 Mbits/sec. In practice, firewire mass storage devices aren't any faster.

We've done tests on very fast compact flash devices on USB 2.0 and achieved well over 30 MB/sec reading and writing. That being said, I don't know what could be wrong with your USB setup (sorry).

We have a client who needs to preload a large (like 100,000 per month) number of audio players with content. We have done tests with them, mounted as raw devices and no file system. We found that we could write to one of them with good performance, but write speeds dropped dramatically after two or three devices were added and just got worse from there. We tried PCI-based USB 2.0 controllers, no external hubs, and doing the sync's ourselves and nothing helped. It looks like there may be a bottleneck in libusb or somewhere in the kernel. Anybody have any ideas?

I was thinking of looking at the fast USB library in the USRP project, haven't had time yet. It enqueues multiple URBs and does I/O about as fast as it can get done.

J
I know what I am talking about. IEEE-1394 is faster than USB because of its hardware. What you do not know, USB has too much over head to handle high data transfers for long periods. USB does not use DMA to handle large amounts of data quickly and by it self. Also USB is not a point to point interface. USB relies on packets for transmission, so these packets will reduces bandwidth significantly if the size of the packets are chosen wisely. When IEEE-1394 is used, its point to point connection works the same as SCSI so it can provide equal performance. It also provides DMA, so the processor can do other things while the IEEE-1394 device is transferring data.

Using PCI cards for USB will not be any different than using on-board USB. The same holds true with IEEE-1394.

Linux has a lot of redundancies in place for writing data. The checks that Linux is doing for every write task is reducing the bandwidth of USB. With USB being dependent on software for its tasks penalizes USB's bandwidth even further.

Stating theoretical speeds does not work in the real world. USB will never even come close to 480 megabits per second. The reason why is because it relies heavily on software for I/O and all the hubs that is between the host and the device deteriorates the signal.

Yes, Linux USB subsystem has poor performance although it is reliable and stable. Windows on the hand is not reliable and stable for USB, but it has high performance.

On my setups I get up to 15 megabytes per second with USB. This is with using a GUI program. If I use cp, I am sure it will get a lot higher. The file systems that I tested with is EXT3 to FAT32. Both file systems are known to not provide high bandwidth.

A compact flash that has 30 megabytes per second is hard for me to believe. A lot of buffering is involve in that throughput. Compact flash can not go any higher than a few megabytes per second.

Quote:
Originally Posted by uncertain View Post
Well, one other clue to my specific problems might be that they're not limited solely to USB devices - moving files between partitions on my internal HDD is just as time-consuming.

No too long ago, I was heading out the door to go somewhere with the wife and my new habit is to set my files to copy while I'm away or asleep. I selected all the files in my Videos folder I wanted to save to my USB disk, but I accidentally hit the Delete key, sending them to the Trash Bin. "No big deal," I thought, "I'll just move them back to Videos and then move them to the disk."

I have my Home directory on a its' own partition, and moving the files from Trash back to ~/Videos took as long as it would have to move them to the USB device.

Since then, I've come to learn that moving files between my Home dir (or anywhere else in Ubuntu) and my Windows partition also has the bad write lag.

Reading files from anywhere isn't a problem - I can run an .avi file right off my USB HDD through VLC and have no problems. If I want to read that same file and write it to a different partition, that's where the problem comes in.
AVI files encoded in Xvid, Divx, or h.264 will have no problems with USB because the bandwidth require for AVI using those codecs is around 300 to 600 kilobytes per second.

One problem that always comes up is processor usage since an AVI file using huffyuv video codec can easily be play back with no notice of dropped frames. The file is directly read from a USB storage drive with ReiserFS.

Again USB is very, very software dependent. If you want high throughput, use a file system that does not take much processor usage, do not use a GUI program to copy files to it, and use a very, very high performance processor. If you want the copying of several big files to be done fast, use either IEEE-1394 or SATA. If you do not want to, you have to bite your lip and use USB.

Please do not compare Windows and Linux. They both are very different on how they handle USB.
 
Old 10-24-2008, 01:49 AM   #11
uncertain
Member
 
Registered: Oct 2008
Location: Katowice, Poland
Distribution: Ubuntu, Backtrack, FC10
Posts: 40

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Electro View Post
A compact flash that has 30 megabytes per second is hard for me to believe. A lot of buffering is involve in that throughput. Compact flash can not go any higher than a few megabytes per second.

[...]

Again USB is very, very software dependent. If you want high throughput, use a file system that does not take much processor usage, do not use a GUI program to copy files to it, and use a very, very high performance processor. If you want the copying of several big files to be done fast, use either IEEE-1394 or SATA. If you do not want to, you have to bite your lip and use USB.
Believe it:
http://img511.imageshack.us/img511/1...eenshotir2.png
No, it's not quite 30MB/s, but it's still A FULL 20MB/S FASTER THAN WHAT I AVERAGE NOW.

Either buy me a 1394/SATA drive and mail it to me, or shut the hell up about it!

I'm here trying to find out why my USB devices don't go as fast as they do when I'm running a fresh install; I'm not here trying to start a debate about which kind of external storage is better and why.

I'll ask one more time:

Please - If you don't have any practical advice for me on how to track down this problem, unsubscribe this thread and let me try to find someone who does.

As a side note, cp and mv commands have the same slow write times. Only when copying and moving to the USB device; not copying or moving from the device.

Last edited by uncertain; 10-24-2008 at 01:56 AM.
 
Old 10-24-2008, 02:45 AM   #12
Electro
Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
Quote:
Originally Posted by uncertain View Post
Believe it:
http://img511.imageshack.us/img511/1...eenshotir2.png
No, it's not quite 30MB/s, but it's still A FULL 20MB/S FASTER THAN WHAT I AVERAGE NOW.

Either buy me a 1394/SATA drive and mail it to me, or shut the hell up about it!

I'm here trying to find out why my USB devices don't go as fast as they do when I'm running a fresh install; I'm not here trying to start a debate about which kind of external storage is better and why.

I'll ask one more time:

Please - If you don't have any practical advice for me on how to track down this problem, unsubscribe this thread and let me try to find someone who does.

As a side note, cp and mv commands have the same slow write times. Only when copying and moving to the USB device; not copying or moving from the device.
I already gave you practicable advice and you do not care thinking. I am not starting a debate. I telling the truth about USB. It has always been slow. Do a search in this forum and many other forums. You will get the same thing.

At this time the best advice I can give you right now since you do not care of taking my advice is talk to a kernel developer that is handling USB subsystem for Linux.
 
Old 10-24-2008, 10:02 AM   #13
uncertain
Member
 
Registered: Oct 2008
Location: Katowice, Poland
Distribution: Ubuntu, Backtrack, FC10
Posts: 40

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Electro View Post
Compact flash can not go any higher than a few megabytes per second.
Here's a screenshot of me doing a file transfer to that same USB hard-drive on a Fresh Install of Hardy Heron, screaming along at a thought-to-be-unattainable 19.9MB/s. (The file transfer completed in just barely over two minutes; that's a gigabyte-a-minute, as opposed to a gigabyte every ten minutes, for all you scientific types.) I'd be willing to bet it's only running that slow because I'm compiling compiz-fusion in the background. That shot is sort of an oddball, too - it actually hung closer to 20 or 21 most of the time. The speed did vary pretty widely, though, and dipped as low as 13 or 14.

http://img293.imageshack.us/img293/2...erationit1.png

I figured what the heck and did a fresh install, locking all the version number on installed packages before connecting to the net.

I should note that I'm pretty darn sure that it will eventually degrade, and I'll be stuck back at 3 or 4 or 5 MB/s again, but here's the thing:
That's why I started this thread - so I can find out why and fix it without having to reinstall.

Last edited by uncertain; 10-24-2008 at 12:08 PM.
 
Old 10-24-2008, 12:45 PM   #14
uncertain
Member
 
Registered: Oct 2008
Location: Katowice, Poland
Distribution: Ubuntu, Backtrack, FC10
Posts: 40

Original Poster
Rep: Reputation: 15
Update:

25.3 Megabytes/Sec

800MB+ file transferred in under one minute.

http://img143.imageshack.us/img143/3...erationbi5.png
 
Old 10-29-2008, 07:29 AM   #15
uncertain
Member
 
Registered: Oct 2008
Location: Katowice, Poland
Distribution: Ubuntu, Backtrack, FC10
Posts: 40

Original Poster
Rep: Reputation: 15
Kernel update last night broke it again. Ubuntu update listed the version # as 2.6.24-21.43

File transfers are back down to 4 or 5 MB/s and GUI is all but completely unresponsive while the transfer is in action.

http://img530.imageshack.us/img530/8...erationdv1.png

What a kick in the *****.

Last edited by uncertain; 10-29-2008 at 07:31 AM.
 
  


Closed Thread

Tags
firewire, speed, transfer, usb


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
USB 2.0 slow write but fast read, solution yet? ArchNGEL Linux - Hardware 15 02-17-2008 02:33 PM
USB thumb drive write speeds too fast xaos5 Linux - Hardware 1 01-19-2007 04:04 AM
finding cd/dvdrw read/write speeds? slinky2004 Linux - General 4 01-08-2006 10:32 PM
USB transfer speeds incredibly slow apachedude Suse/Novell 3 10-20-2005 07:16 PM
slow fat32 write speeds xiang83 Slackware 0 08-10-2004 08:53 AM


All times are GMT -5. The time now is 07:35 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration