You are not logged in.

#1 2018-04-14 20:32:35

hamedlinuxuser
Member
Registered: 2018-04-14
Posts: 6

slow copying to usb flash drive

Hello, when I copy files the progressbar goes fast to the end and hangs there, it shows unrealistic numbers150M/s then stops and after about 5 minutes the copying of 700M file will finish.
I use dolphin file manager, and I had this problem with gnome file manager too, also I have this problem with dd and cp command.
I follow this https://bbs.archlinux.org/viewtopic.php?id=224865 topic and it's solutions didn't help too.
Does any one have any idea?

edit: I never had this problem in Windows.

Last edited by hamedlinuxuser (2018-04-14 20:34:46)

Offline

#2 2018-04-14 20:36:51

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,734
Website

Re: slow copying to usb flash drive

I've seen the behavior you're describing as well but can offer no solution.  I tend to just use rsync for these transfers and it does not exhibit this behavior.

Offline

#3 2018-04-14 21:19:49

hamedlinuxuser
Member
Registered: 2018-04-14
Posts: 6

Re: slow copying to usb flash drive

graysky wrote:

I've seen the behavior you're describing as well but can offer no solution.  I tend to just use rsync for these transfers and it does not exhibit this behavior.

I have this problem with rsync too, with -P option it shows 83M/s which is unrealistic and in 9 seconds reach 100% then I must wait.

[hamed@laptop ~]$ rsync -P 1.mkv /run/media/hamed/FLASH/
1.mkv
    830,253,099 100%   83.76MB/s    0:00:09 (xfr#1, to-chk=0/1)

Last edited by hamedlinuxuser (2018-04-14 21:33:41)

Offline

#4 2018-04-14 21:47:42

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,849

Re: slow copying to usb flash drive

pass "iflag=direct oflag=direct" to dd

Offline

#5 2018-04-14 22:04:44

hamedlinuxuser
Member
Registered: 2018-04-14
Posts: 6

Re: slow copying to usb flash drive

seth wrote:

pass "iflag=direct oflag=direct" to dd

I think dd has problem with iflag=direct
the output with oflag=direct :

[hamed@laptop ~]$ sudo dd if=/dev/zero of=/dev/sdb bs=1K count=1M status=progress iflag=direct oflag=direct
dd: failed to open '/dev/zero': Invalid argument
[hamed@laptop ~]$ sudo dd if=/dev/zero of=/dev/sdb bs=1K count=1M status=progress oflag=direct
6711296 bytes (6.7 MB, 6.4 MiB) copied, 13 s, 516 kB/s^C
6591+0 records in
6591+0 records out
6749184 bytes (6.7 MB, 6.4 MiB) copied, 13.0911 s, 516 kB/s

edit: iflag problem was because of /dev/zero
new output:

[hamed@laptop ~]$ sudo dd if=~/1.mkv of=/dev/sdb status=progress iflag=direct oflag=direct
[sudo] password for hamed: 
4212224 bytes (4.2 MB, 4.0 MiB) copied, 20 s, 211 kB/s^C
8459+0 records in
8459+0 records out
4331008 bytes (4.3 MB, 4.1 MiB) copied, 20.4788 s, 211 kB/s

Last edited by hamedlinuxuser (2018-04-14 22:12:31)

Offline

#6 2018-04-15 06:24:11

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,849

Re: slow copying to usb flash drive

a) is the progress now continuous?
b) maybe use a slightly bigger bs (1M or so) ;-)
c) Is this USBv1?

Offline

#7 2018-04-15 07:08:55

hamedlinuxuser
Member
Registered: 2018-04-14
Posts: 6

Re: slow copying to usb flash drive

seth wrote:

a) is the progress now continuous?
b) maybe use a slightly bigger bs (1M or so) ;-)
c) Is this USBv1?

a) yes, but very slow

b) speed started at 18MB/s and after 168s it's 6.7MB/s

sudo dd if=/dev/zero of=/dev/sdb bs=1M count=1M status=progress oflag=direct
[sudo] password for hamed: 
1126170624 bytes (1.1 GB, 1.0 GiB) copied, 168 s, 6.7 MB/s^C
1078+0 records in
1078+0 records out
1130364928 bytes (1.1 GB, 1.1 GiB) copied, 168.3 s, 6.7 MB/s

c) no it's USBv2 and has about 15M/s write speed in windows

Offline

#8 2018-04-15 07:53:32

newbie1962
Member
From: italy
Registered: 2012-07-24
Posts: 137

Re: slow copying to usb flash drive

You can post your smart on this hard drive

https://wiki.archlinux.org/index.php/S.M.A.R.T.


hp-envy dv7

Offline

#9 2018-04-15 08:07:31

hamedlinuxuser
Member
Registered: 2018-04-14
Posts: 6

Re: slow copying to usb flash drive

newbie1962 wrote:

You can post your smart on this hard drive

https://wiki.archlinux.org/index.php/S.M.A.R.T.

smart doesn't support this flash drive I think.

[hamed@laptop ~]$ smartctl -c /dev/sdb
smartctl 6.6 2017-11-05 r4594 [x86_64-linux-4.15.15-1-ARCH] (local build)
Copyright (C) 2002-17, Bruce Allen, Christian Franke, www.smartmontools.org

/dev/sdb: Unknown USB bridge [0x1005:0xb113 (0x100)]
Please specify device type with the -d option.

Use smartctl -h to get a usage summary

Offline

#10 2018-04-15 11:51:54

hamedlinuxuser
Member
Registered: 2018-04-14
Posts: 6

Re: slow copying to usb flash drive

So, I searched other distros topics about this problem and it's a common problem with no solution.
also I find this topic https://ubuntuforums.org/showthread.php?t=1867460 suggests a solution, anyone know what is the equivalent of this process in arch and bootctl.

Offline

Board footer

Powered by FluxBB