You are not logged in.

#1 2014-10-19 13:51:09

blackwanderer
Member
From: Novosibirsk, Russia
Registered: 2014-10-19
Posts: 7

Bad USB3 performance

Hi,
I have problem with my external usb3 disk. When I try copy to disk or copy from disk large data amount (several video files, for example) first GB or about is copied normally at full USB3 speed (~100MB/s) but after that process freezes for approximately 30 seconds, continue copying next 100 MB at full USB3 speed, again freezes, again copy next 100 MB and so on until the end. Filesystem is ext4. On Windows disk worked without any problems. I don't know what to do and where to see to solve hardware problems. Searching in the Internet didn't help.

Offline

#2 2014-10-19 14:00:34

dice
Member
From: Germany
Registered: 2014-02-10
Posts: 413

Re: Bad USB3 performance

Where are you copying the files to?
The writing speed could be the bottleneck here. When starting to copy your buffer gets filled. And when it is full you have to wait for the buffer to be written to disk before new data can be read.

EDIT: Do you also have a USB2.0 port? If so, how is performance using this?

Last edited by dice (2014-10-19 14:02:32)


I put at button on it. Yes. I wish to press it, but I'm not sure what will happen if I do.  (Gune | Titan A.E.)

Offline

#3 2014-10-19 14:11:06

blackwanderer
Member
From: Novosibirsk, Russia
Registered: 2014-10-19
Posts: 7

Re: Bad USB3 performance

dice wrote:

Where are you copying the files to?

I try to copy files between external USB3 disk and internal SATA disk (in both directions)

dice wrote:

Do you also have a USB2.0 port? If so, how is performance using this?

through USB2.0 port speed is approximately 30MB/s without any freezes

Offline

#4 2014-10-19 14:19:13

TheSaint
Member
From: my computer
Registered: 2007-08-19
Posts: 1,536

Re: Bad USB3 performance

I've a portable HD which denotes when is connected to a USB3.0 port.
Are you sure that you're connected on the right port?

Last edited by TheSaint (2014-10-19 14:19:36)


do it good first, it will be faster than do it twice the saint wink

Offline

#5 2014-10-19 14:34:34

blackwanderer
Member
From: Novosibirsk, Russia
Registered: 2014-10-19
Posts: 7

Re: Bad USB3 performance

TheSaint wrote:

Are you sure that you're connected on the right port?

Yes, of course. And I have even tried another USB3 port (I have 4). On USB2 port disk works brilliant but with only USB2 speed, on USB3 port I have described problem.

Offline

#6 2014-10-19 18:48:50

kokoko3k
Member
Registered: 2008-11-14
Posts: 2,464

Re: Bad USB3 performance

1024MB/30sec = 34MB/sec
So it seems you get the same speed on usb2 and usb3.
Are you sure that on windows it is really faster?
It may tell you that the copy has finished, but it isn't really true.

copy a big file under windows, get a stopwatch and stop it when you are able to safely remove the disk (or when the led, if any, has stopped blinking).
That way you can measure exactly the speed under windows.

Of course the strange thing is that you get intermittent freeze on usb3, but that may be unrelated to the loss of speed.
I'd try this as well:

        #https://www.kernel.org/doc/Documentation/sysctl/vm.txt
        echo 0 > /proc/sys/vm/dirty_ratio
        echo 0 > /proc/sys/vm/dirty_background_ratio

        #http://permalink.gmane.org/gmane.linux.file-systems/79390
        echo $((96*1024*1024)) > /proc/sys/vm/dirty_bytes               #96 MB
        echo $((32*1024*1024)) > /proc/sys/vm/dirty_background_bytes    #32 MB

This udev rule could improve the speed of some usb devices:
/etc/udev/rules.d/usbspeed.rules

SUBSYSTEM=="block", ATTRS{max_sectors}=="240", RUN+="/bin/sh -c '/bin/echo 1024 > /sys/block/%k/device/max_sectors'"

Last edited by kokoko3k (2014-10-19 18:54:05)


Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !

Offline

#7 2014-10-19 19:32:42

HiImTye
Member
From: Halifax, NS, Canada
Registered: 2012-05-09
Posts: 1,072

Re: Bad USB3 performance

are you sure that it's being recognized as USB3? the initial issue sounds simply like the data is being moved into the USB cache (the high transfer speed), and then being written (the freeze). have you checked to make sure that it's reporting the device being connected to a USB3 interface?

Offline

#8 2014-10-21 15:06:27

blackwanderer
Member
From: Novosibirsk, Russia
Registered: 2014-10-19
Posts: 7

Re: Bad USB3 performance

It seems to be uas problem. I disabled uas for the disk as described here and now everything is fine.

Offline

Board footer

Powered by FluxBB