LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Slow USB transfer speeds (https://www.linuxquestions.org/questions/linux-hardware-18/slow-usb-transfer-speeds-850286/)

iball8888 12-14-2010 09:04 PM

Slow USB transfer speeds
 
So. I tried using my USB to transfer a 500MB file, the speed came up as 1-130 kb/s. That is pathetic. I should be getting more 25MB/s. Can anyone help me out?

Specs:

Sony Vaio vpcf12jfx/b

lspci
Code:

00:00.0 Host bridge: Intel Corporation Core Processor DMI (rev 11)
00:03.0 PCI bridge: Intel Corporation Core Processor PCI Express Root Port 1 (rev 11)
00:08.0 System peripheral: Intel Corporation Core Processor System Management Registers (rev 11)
00:08.1 System peripheral: Intel Corporation Core Processor Semaphore and Scratchpad Registers (rev 11)
00:08.2 System peripheral: Intel Corporation Core Processor System Control and Status Registers (rev 11)
00:08.3 System peripheral: Intel Corporation Core Processor Miscellaneous Registers (rev 11)
00:10.0 System peripheral: Intel Corporation Core Processor QPI Link (rev 11)
00:10.1 System peripheral: Intel Corporation Core Processor QPI Routing and Protocol Registers (rev 11)
00:1a.0 USB Controller: Intel Corporation 5 Series/3400 Series Chipset USB2 Enhanced Host Controller (rev 05)
00:1b.0 Audio device: Intel Corporation 5 Series/3400 Series Chipset High Definition Audio (rev 05)
00:1c.0 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 1 (rev 05)
00:1c.1 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 2 (rev 05)
00:1c.2 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 3 (rev 05)
00:1c.5 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 6 (rev 05)
00:1d.0 USB Controller: Intel Corporation 5 Series/3400 Series Chipset USB2 Enhanced Host Controller (rev 05)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev a5)
00:1f.0 ISA bridge: Intel Corporation Mobile 5 Series Chipset LPC Interface Controller (rev 05)
00:1f.2 SATA controller: Intel Corporation 5 Series/3400 Series Chipset 6 port SATA AHCI Controller (rev 05)
00:1f.3 SMBus: Intel Corporation 5 Series/3400 Series Chipset SMBus Controller (rev 05)
01:00.0 VGA compatible controller: nVidia Corporation GT216 [GeForce GT 330M] (rev a2)
01:00.1 Audio device: nVidia Corporation High Definition Audio Controller (rev a1)
02:00.0 Network controller: Atheros Communications Inc. AR9287 Wireless Network Adapter (PCI-Express) (rev 01)
03:00.0 SD Host controller: Ricoh Co Ltd Device e822
03:00.1 System peripheral: Ricoh Co Ltd Device e230
03:00.3 FireWire (IEEE 1394): Ricoh Co Ltd Device e832
03:00.4 SD Host controller: Ricoh Co Ltd Device e822
04:00.0 Ethernet controller: Marvell Technology Group Ltd. 88E8057 PCI-E Gigabit Ethernet Controller (rev 10)
3f:00.0 Host bridge: Intel Corporation Core Processor QuickPath Architecture Generic Non-Core Registers (rev 04)
3f:00.1 Host bridge: Intel Corporation Core Processor QuickPath Architecture System Address Decoder (rev 04)
3f:02.0 Host bridge: Intel Corporation Core Processor QPI Link 0 (rev 04)
3f:02.1 Host bridge: Intel Corporation Core Processor QPI Physical 0 (rev 04)
3f:03.0 Host bridge: Intel Corporation Core Processor Integrated Memory Controller (rev 04)
3f:03.1 Host bridge: Intel Corporation Core Processor Integrated Memory Controller Target Address Decoder (rev 04)
3f:03.4 Host bridge: Intel Corporation Core Processor Integrated Memory Controller Test Registers (rev 04)
3f:04.0 Host bridge: Intel Corporation Core Processor Integrated Memory Controller Channel 0 Control Registers (rev 04)
3f:04.1 Host bridge: Intel Corporation Core Processor Integrated Memory Controller Channel 0 Address Registers (rev 04)
3f:04.2 Host bridge: Intel Corporation Core Processor Integrated Memory Controller Channel 0 Rank Registers (rev 04)
3f:04.3 Host bridge: Intel Corporation Core Processor Integrated Memory Controller Channel 0 Thermal Control Registers (rev 04)
3f:05.0 Host bridge: Intel Corporation Core Processor Integrated Memory Controller Channel 1 Control Registers (rev 04)
3f:05.1 Host bridge: Intel Corporation Core Processor Integrated Memory Controller Channel 1 Address Registers (rev 04)
3f:05.2 Host bridge: Intel Corporation Core Processor Integrated Memory Controller Channel 1 Rank Registers (rev 04)
3f:05.3 Host bridge: Intel Corporation Core Processor Integrated Memory Controller Channel 1 Thermal Control Registers (rev 04)

lsmod

Code:

Module                  Size  Used by
nls_iso8859_1          4657  0
nls_cp437              6375  0
vfat                  10954  0
fat                    56244  1 vfat
usb_storage            50372  0
usbhid                42062  0
hid                    84678  1 usbhid
cryptd                  8140  0
aes_x86_64              7936  1
aes_generic            27631  1 aes_x86_64
parport_pc            30086  0
ppdev                  6804  0
dm_crypt              13381  0
rfcomm                40787  4
binfmt_misc            7984  1
sco                    9986  2
bnep                  11985  2
l2cap                  42304  16 rfcomm,bnep
snd_hda_codec_nvhdmi    15451  4
nvidia              11087157  46
snd_hda_codec_realtek  299524  1
snd_hda_intel          26019  4
arc4                    1497  2
snd_hda_codec        100919  3 snd_hda_codec_nvhdmi,snd_hda_codec_realtek,snd_hda_intel
snd_hwdep              6660  1 snd_hda_codec
snd_pcm                89104  3 snd_hda_intel,snd_hda_codec
snd_seq_midi            5932  0
snd_rawmidi            22207  1 snd_seq_midi
snd_seq_midi_event      7291  1 snd_seq_midi
snd_seq                57512  2 snd_seq_midi,snd_seq_midi_event
ath9k                101730  0
snd_timer              23850  2 snd_pcm,snd_seq
ath9k_common            6874  1 ath9k
ath9k_hw              314699  2 ath9k,ath9k_common
ath                    10413  2 ath9k,ath9k_hw
mac80211              266657  2 ath9k,ath9k_common
snd_seq_device          6912  3 snd_seq_midi,snd_rawmidi,snd_seq
psmouse                62080  0
uvcvideo              62379  0
btusb                  12929  2
serio_raw              4910  0
bluetooth              59245  9 rfcomm,sco,bnep,l2cap,btusb
snd                    64117  16 snd_hda_codec_realtek,snd_hda_intel,snd_hda_codec,snd_hwdep,snd_pcm,snd_rawmidi,snd_seq,snd_timer,snd_seq_device
i7core_edac            18090  0
videodev              49359  1 uvcvideo
v4l1_compat            15519  2 uvcvideo,videodev
v4l2_compat_ioctl32    12486  1 videodev
sony_laptop            34416  0
lp                    10201  0
edac_core              46822  1 i7core_edac
cfg80211              170293  4 ath9k,ath9k_common,ath,mac80211
soundcore              1240  1 snd
snd_page_alloc          8588  2 snd_hda_intel,snd_pcm
parport                37032  3 parport_pc,ppdev,lp
dm_raid45              75026  0
xor                    4709  1 dm_raid45
btrfs                506518  0
zlib_deflate          21866  1 btrfs
crc32c                  3007  1
libcrc32c              1268  1 btrfs
firewire_ohci          24679  0
ahci                  21857  0
sky2                  53371  0
libahci                26199  3 ahci
sdhci_pci              7765  0
sdhci                  18400  1 sdhci_pci
firewire_core          54327  1 firewire_ohci
led_class              3393  2 ath9k,sdhci
crc_itu_t              1739  1 firewire_core
video                  22176  0
output                  2527  1 video

lsusb
Code:

Bus 002 Device 003: ID 093a:2510 Pixart Imaging, Inc. Optical Mouse
Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 004: ID 0489:e00f Foxconn / Hon Hai
Bus 001 Device 003: ID 05ca:18ba Ricoh Co., Ltd
Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub


frankbell 12-14-2010 09:19 PM

I assume you mean a USB wireless network card.

There are lots of variables. A wireless connection is essentially a two-way radio.

Your ISP might have been having a bad moment, net congestion could have spiked, there might have been something interfering with the signal.

You could try speedtest.net, then plug into a wired connection and test again to establish some benchmarks; that at least would tell you whether the problem was isolated to the wireless or might lie somewhere else. Comparing my results with others, Speedtest seems to be fairly consistent.

iball8888 12-14-2010 09:38 PM

No. Usb as in storage. I tried using my PSP and a 4GB USB both are incredibly slow.

Electro 12-14-2010 11:34 PM

For your information USB does not mean storage. USB is a connection spec. USB is a bus interface, so adding devices to it decreases its performance. Also USB is very software dependent, so high throughput can not be done. If you want throughput use either IEEE-1394 or SATA. These are designed for high throughput and low latency thanks to DMA. USB does not have DMA, so you have to sacrifice PIO like performance.

I assuming you mean kilobytes since you do not about USB and the correct shorthand for it. The shorthand for kilobytes is KB and not Kb. An upper case B is bytes and lower case b is bits. If you want to stop the confusion, just spell it out.

A few reasons why your USB is that slow is it can not handle adjusting the speed for your mouse and for your card reader. You can try using another USB port and hope it does not share the same USB hub. You try to set the max_sectors for your USB storage device and hope it does not corrupt your data. The following is how you do it.

http://www.linux-usb.org/FAQ.html#i5

Do not set the USB storage with journal or any feature that optimizes Linux file systems for better retrieval like noalign, noatime. Using file systems like JFS or EXT2 is better. If you are copying from a notebook hard drive, the throughput will be low. Also if copying using GUI programs like Nautilus, Konqueror, Thunar, or Midnight Commander, will be slow for USB storage. USB is just a slow interface because it is a software dependent interface. Software gives creativity, but it is not great for very high throughput. Hardware is the only one can do that.

If you are using flash memory sticks, its throughput is less than a megabyte per second. Sure some are advertise to be faster than a megabyte per second.

H_TeXMeX_H 12-15-2010 02:18 AM

Make sure this option is enabled in the kernel:

Code:

bash-4.1$ zcat /proc/config.gz | grep CONFIG_USB_EHCI_TT_NEWSCHED
CONFIG_USB_EHCI_TT_NEWSCHED=y

It is for me, and it is important that it be enabled for good throughput on USB 2.0.

iball8888 12-15-2010 08:24 AM

Quote:

Originally Posted by H_TeXMeX_H (Post 4191966)
Make sure this option is enabled in the kernel:

Code:

bash-4.1$ zcat /proc/config.gz | grep CONFIG_USB_EHCI_TT_NEWSCHED
CONFIG_USB_EHCI_TT_NEWSCHED=y

It is for me, and it is important that it be enabled for good throughput on USB 2.0.

i get gzip: /proc/config.gz: No such file or directory

H_TeXMeX_H 12-15-2010 08:57 AM

I see, well get a hold of your kernel config, and check it for that option, it may be in /boot/config. Or, if you say what distro, and if it's the default kernel, we might be able to dig it up.

TobiSGD 12-15-2010 09:19 AM

Quote:

Originally Posted by Electro (Post 4191876)
If you are using flash memory sticks, its throughput is less than a megabyte per second. Sure some are advertise to be faster than a megabyte per second.

Just a side note: If that is so, I wonder how my Corsair Voyager GT has a read/write-throughput of ca. 25MB/15MB, and even my cheap sticks are doing read and write at least with 4-5MB.

H_TeXMeX_H 12-15-2010 09:44 AM

Indeed, it should be high, for my corsair voyager I get 24.3 MB/s. Mine was very low like 100 kb/s (like the OP says) before I enabled that obscure option in the kernel I mentioned.

iball8888 12-15-2010 10:52 AM

I have read previous posts on this issue that Electro was in, although he has valid points, I don' like his attitude and I refuse to get an esata or firewire connection as at this moment a small amount of computers actually have that connection readily available, and it isn't as convenient as USB. Also, my USB is plenty fast on my other PC's. I don't think its going the reported speed but when you move 8GB+ within a few minutes you have to think its good enough.

As for my kernel, I am running Mint.

Code:

uname -a
Linux anthony-VPCF12JFX 2.6.35-23-generic #41-Ubuntu SMP Wed Nov 24 11:55:36 UTC 2010 x86_64 GNU/Linux


H_TeXMeX_H 12-15-2010 12:20 PM

I can't find the kernel config for it, it seems mint doesn't care to provide it in any way. It is likely an ubuntu kernel, but that one is only in /boot/config.

iball8888 12-15-2010 01:17 PM

Would it help if I installed the latest kernel from kernel.org?

H_TeXMeX_H 12-15-2010 01:36 PM

Quote:

Originally Posted by iball8888 (Post 4192644)
Would it help if I installed the latest kernel from kernel.org?

You can, but you need to enable that option, and you need the original config, unless you know what to enable. I can't believe they didn't enable the /proc/config.gz option, it solves a lot of problems.

tonguebuster 12-15-2010 02:35 PM

Get assembly and make your own driver , it solve your problem :) ...

Electro 12-15-2010 05:38 PM

Quote:

Originally Posted by iball8888 (Post 4192505)
I have read previous posts on this issue that Electro was in, although he has valid points, I don' like his attitude and I refuse to get an esata or firewire connection as at this moment a small amount of computers actually have that connection readily available, and it isn't as convenient as USB. Also, my USB is plenty fast on my other PC's. I don't think its going the reported speed but when you move 8GB+ within a few minutes you have to think its good enough.

Sorry that I say it that way, but USB will never reach what it advertises on throughput. The 480 megabits is theoretical which means it is possible when everything is as perfect as the engineer can make it.

I do not like when people ask a question and assumes that I or others know you are talking about. I do not like when people do not use the correct units. You did not explain your problem detail enough about your problem. From the looks at your first post, it still tells me nothing what device you have problems with.

You are stating bull when you can copy 8 or more gigabytes in a few minutes using USB. For me, it takes several minutes to copy a gigabyte of data. I prefer to use a NAS to store data because using 100 megabit Ethernet beats USB on terms of throughput. I even have CONFIG_USB_EHCI_TT_NEWSCHED enabled.

Enabling CONFIG_USB_EHCI_TT_NEWSCHED can cause some problems, so Mint or Ubuntu did not enable it because some hardware had problems in the past when this option is enabled. Use it at your own risk. The following explains about the option.

http://cateee.net/lkddb/web-lkddb/US..._NEWSCHED.html

Quote:

Originally Posted by iball8888 (Post 4192644)
Would it help if I installed the latest kernel from kernel.org?

Using the latest kernel version will only help if you have problems with the present kernel that the new kernel version fixes. Compiling the same kernel version is better than upgrading the kernel version to the next stable version. The new kernel version can give you problems if your software does not support the new kernel version. When trying to re-compile the kernel, find instructions for your distribution since you are using Debian based. Debian has its own steps to compile the kernel.

Quote:

Originally Posted by H_TeXMeX_H (Post 4192660)
You can, but you need to enable that option, and you need the original config, unless you know what to enable. I can't believe they didn't enable the /proc/config.gz option, it solves a lot of problems.

Having the config output located in /proc/config.gz is an option. It is not required. It does not help for everything. It helps only the user to troubleshoot the setup and to re-compile the kernel. It also helps when using install scripts for modules or drivers. Since this file is seen by everybody that access your computer, it can be used against you. For desktops, notebooks, and workstations, it should be enabled.

Sure config can also be located in /boot, but not be always be up to date. In some cases /boot is unmounted if it is stored on a separate partition. Though in order to use the present config for compiling the kernel, you have copy it into the kernel source code and use "make oldconfig". Even if you do not have the config file, it will scan the system and use its own defaults when using "make menuconfig" or "make xconfig".


Quote:

Originally Posted by tonguebuster (Post 4192708)
Get assembly and make your own driver , it solve your problem :) ...

Writing drivers in assembly might work, but only work for 80x86 processors. Using it for other processors will not work. Linus prefers writing the drivers and the kernel in C because it can be ported to other processors besides 80x86.


All times are GMT -5. The time now is 08:21 PM.