You are not logged in.

#1 2015-02-02 15:44:41

kubco2
Member
Registered: 2013-10-14
Posts: 24

USB flash drive, progressbar doesnt wait to finish file copying

Hello,

when I copying files to usb drive, they are there very fast(+-70MB/s), but I must wait about 2-3mins to sync finish ...

When it is problem to show real speed (it worked some years ago),

how can I achieve windows like copying? In windows it goes fast(+-70MB/s) and in the end progress bar waits until file is really copied.
So in Windows I have working hotpluggable flash drive without need to do "safe remove"
In linux I must monitor usb LED or sync command.

I tried doublecmd and nautilus.
I tried ntfs and exfat, but none works as I expect.
I want to try flush mount option, but I cant get it to work, or maybe it is not visible in /etc/mtab, but it has no effect.

I tried set vm.dirty_ratio to 0, which seems as sync mount option - very slow
I tried set it to 1, it was OK, full USB speed, after first +-30-40MB it shows real speed, no ram eating, but it affects all disk drives, and maybe on ssd it will be not very clever choice.

Thanks for help.
Jakub

Last edited by kubco2 (2015-02-02 16:00:15)

Offline

#2 2015-02-03 13:06:21

kubco2
Member
Registered: 2013-10-14
Posts: 24

Re: USB flash drive, progressbar doesnt wait to finish file copying

Today I discovered that after formatting usb to exfat, transfer speed in windows is shown correctly(5-8MB/s) from begin to end.

Why this state cannot be done in Linux?

Last edited by kubco2 (2015-02-03 13:08:09)

Offline

#3 2015-02-04 01:04:23

shijtin
Member
Registered: 2007-02-12
Posts: 22

Re: USB flash drive, progressbar doesnt wait to finish file copying

I think it has to do with IO caching.
I had the same problem (and a sluggish system while copying big files to usb2) and this fixed both for me :

https://bbs.archlinux.org/viewtopic.php … 8#p1466598

Last edited by shijtin (2015-02-04 01:05:01)

Offline

#4 2015-02-05 16:13:59

kubco2
Member
Registered: 2013-10-14
Posts: 24

Re: USB flash drive, progressbar doesnt wait to finish file copying

Thanks for reply.

As I wrote, vm.dirty_ratio/dirty_bytes is not way for me, because it affects all drives .

Last edited by kubco2 (2015-02-05 16:14:19)

Offline

#5 2015-02-09 20:26:00

kubco2
Member
Registered: 2013-10-14
Posts: 24

Re: USB flash drive, progressbar doesnt wait to finish file copying

bump

Offline

#6 2015-02-09 20:32:19

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,260

Re: USB flash drive, progressbar doesnt wait to finish file copying


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#7 2015-02-10 04:39:37

Balto
Member
Registered: 2014-11-22
Posts: 7

Re: USB flash drive, progressbar doesnt wait to finish file copying

You can turn off write caching on a specific device:

# hdparm -W 0 /dev/sdb

This can be automated:
http://stackoverflow.com/questions/2075 … -pen-drive

Offline

#8 2015-02-24 13:24:42

kubco2
Member
Registered: 2013-10-14
Posts: 24

Re: USB flash drive, progressbar doesnt wait to finish file copying

Balto:
this results to
write-caching = not supported

Offline

#9 2015-02-24 14:56:18

Steef435
Member
Registered: 2013-08-29
Posts: 577
Website

Re: USB flash drive, progressbar doesnt wait to finish file copying

Thunar seems to keep the file operation dialog open (at 100%) until sync is finished. Is this what you're trying to achieve?

Offline

#10 2015-02-27 09:38:19

kubco2
Member
Registered: 2013-10-14
Posts: 24

Re: USB flash drive, progressbar doesnt wait to finish file copying

Steef435:
yes this is what I want to achieve.

I installed thunar insert exfat flash drive but it didnt wait to "sync".
After cpy finished I run sync from cmd and it tooks 1minute to end. :-(

If it is working for you, Im probably missing something. :-(

$cat /etc/mtab
/dev/sdb1 /run/media/user/Stick fuseblk rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other,blksize=4096 0 0

Last edited by kubco2 (2015-02-27 09:38:53)

Offline

#11 2015-02-27 12:50:22

Steef435
Member
Registered: 2013-08-29
Posts: 577
Website

Re: USB flash drive, progressbar doesnt wait to finish file copying

With a fat32 partition:

/dev/sdc1 /run/media/steef/Some\040Name vfat rw,nosuid,nodev,relatime,uid=1000,gid=100,fmask=0022,dmask=0077,codepage=437,iocharset=iso8859-1,shortname=mixed,showexec,utf8,flush,errors=remount-ro 0 0

Note that "flush" is visible in my mtab, I let Thunar do the mounting.

I also have the optdepends gvfs and thunar-volman installed, but I think only gvfs is relevant in this case.

How big is the file you're copying in your tests? I'll see if I can find a spare drive to do some tests with exfat and ntfs.

Offline

#12 2015-03-01 09:47:20

kubco2
Member
Registered: 2013-10-14
Posts: 24

Re: USB flash drive, progressbar doesnt wait to finish file copying

File is about 1.5GB,

I formatted stick to fat32 and flush option appears and it worked as you wrote.

AAAh I thought that flush can be in exfat too :-(. Unfortunately fat32 is unusable due to unsuppored large files.
I tried with exfat

sudo mount /dev/sdb1 /mnt -o rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other,blksize=4096,flush

But in /etc/mtab flush option missing.

Last edited by kubco2 (2015-03-01 18:55:58)

Offline

Board footer

Powered by FluxBB