You are not logged in.

#1 2012-03-04 18:02:33

igorazevedo
Member
Registered: 2012-03-04
Posts: 2

Really slow USB tranfer

Hello everyone! I have Arch installed on my desktop pc and I'm experiencing problems with the USB transfers.
When I try to copy files to a storage disk, it starts fine (around 24mb/s) and it then slows down until it reaches about 1mb/s. It took me almost 1 hour to copy a 600mb to my phone.
I've tried it with 2 different usb sticks and with my phone, the problem is always the same.

The kernel I'm using is 3.2.6-2-ARCH, however I don't think it has anything to do with it as I had this problem before I upgraded the kernel and also when I had Ubuntu installed.
I don't think this is a hardware problem either because I've tried booting with Windows 7 and it works just fine.

Here's what I got from the logs when I plugged in my phone:

[99277.193437] usb 1-1: new high-speed USB device number 4 using ehci_hcd
[99277.953252] Initializing USB Mass Storage driver...
[99277.953454] scsi6 : usb-storage 1-1:1.3
[99277.953651] usbcore: registered new interface driver usb-storage
[99277.953654] USB Mass Storage support registered.
[99277.966661] usbcore: registered new interface driver uas
[99278.954391] scsi 6:0:0:0: Direct-Access     ZTE      Mass storage     0100 PQ: 0 ANSI: 2
[99278.956606] sd 6:0:0:0: [sdb] Attached SCSI removable disk
[99307.139629] sd 6:0:0:0: [sdb] 15548416 512-byte logical blocks: (7.96 GB/7.41 GiB)
[99307.140379] sd 6:0:0:0: [sdb] No Caching mode page present
[99307.140384] sd 6:0:0:0: [sdb] Assuming drive cache: write through
[99307.142003] sd 6:0:0:0: [sdb] No Caching mode page present
[99307.142007] sd 6:0:0:0: [sdb] Assuming drive cache: write through
[99307.146286]  sdb: sdb1

There's also another problem which I think is related to this... When I'm copying files, chromium stops "responding", as if something is throttling my internet connection and the browser.
This comes up as soon as I start the transfer:

[100560.683331] INFO: task chromium:1515 blocked for more than 120 seconds.
[100560.683335] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[100560.683337] chromium        D 0000000101c9e67e     0  1515   1462 0x00000000
[100560.683342]  ffff8800c4429e18 0000000000000086 ffff880000000000 ffffffff8109c12e
[100560.683347]  ffff8800c4714020 ffff8800c4429fd8 ffff8800c4429fd8 ffff8800c4429fd8
[100560.683351]  ffff880128b51c80 ffff8800c4714020 ffff8800c4429d38 00000000ffffffff
[100560.683355] Call Trace:
[100560.683363]  [<ffffffff8109c12e>] ? get_futex_key+0x14e/0x2b0
[100560.683367]  [<ffffffff8109c81a>] ? futex_wake+0x10a/0x130
[100560.683372]  [<ffffffff81459b7f>] schedule+0x3f/0x60
[100560.683375]  [<ffffffff8145c135>] rwsem_down_failed_common+0xc5/0x160
[100560.683379]  [<ffffffff8145c1e3>] rwsem_down_write_failed+0x13/0x20
[100560.683383]  [<ffffffff812424b3>] call_rwsem_down_write_failed+0x13/0x20
[100560.683386]  [<ffffffff8145b805>] ? down_write+0x25/0x27
[100560.683390]  [<ffffffff81132702>] sys_mmap_pgoff+0x122/0x230
[100560.683394]  [<ffffffff8101a5b2>] sys_mmap+0x22/0x30
[100560.683397]  [<ffffffff8145d382>] system_call_fastpath+0x16/0x1b

Last edited by igorazevedo (2012-03-06 20:10:26)

Offline

#2 2012-03-04 19:57:55

aesiris
Member
Registered: 2012-02-25
Posts: 97

Re: Really slow USB tranfer

lwn described something very similar some months ago.

Offline

#3 2012-03-04 20:04:48

pyther
Member
Registered: 2008-01-21
Posts: 1,395
Website

Re: Really slow USB tranfer

There is a thread around here describing similar issues.

# Helps with system freezing/unresponsiveness when writing to usb media
echo madvise >  /sys/kernel/mm/transparent_hugepage/defrag

Some people claims that help, myself included. You can also try "never" instead of "madvise".

Linux 3.3 should introduce a fix for this problem (finally!).


Website - Blog - arch-home
Arch User since March 2005

Offline

#4 2012-03-04 20:11:53

thisoldman
Member
From: Pittsburgh
Registered: 2009-04-25
Posts: 1,172

Re: Really slow USB tranfer

This thread, https://bbs.archlinux.org/viewtopic.php … 6#p1033186, is a little tricky to find using normal search terms.

@igorazevedo, thanks for quoting your log output.  However, the approved way is to use [⁣code] and [/⁣code] tags surrounding terminal input and output.  You can edit your original post and simply replace the [⁣quote] and [/⁣quote] tags.

Offline

#5 2012-03-06 20:13:38

igorazevedo
Member
Registered: 2012-03-04
Posts: 2

Re: Really slow USB tranfer

pyther wrote:

There is a thread around here describing similar issues.

# Helps with system freezing/unresponsiveness when writing to usb media
echo madvise >  /sys/kernel/mm/transparent_hugepage/defrag

Some people claims that help, myself included. You can also try "never" instead of "madvise".

Linux 3.3 should introduce a fix for this problem (finally!).

Thanks for the help, now it doesn't hang anymore.Unfortunately it still remains very slow.

@thisoldman, thanks for the tip, I edited the original post.

Offline

#6 2012-03-07 10:14:06

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: Really slow USB tranfer

You haven't specified how the USB drives are mounted.

Run "mount" to see.

Use "flush" instead of the performance-killing "sync" mount option.

Offline

Board footer

Powered by FluxBB