You are not logged in.

#1 2018-01-28 17:16:29

pezcurrel
Member
Registered: 2012-06-21
Posts: 26

Slow usb copy when automounting, mounting manually without `flush` ok

Hi,
running up-to-date Arch with xfce and gvfs.
Copying a large file (say 1 gb) on my usb stick that got automounted, the copy process got stuck at about 3/4; I waited a long time but it did not proceed.
`/etc/mtab` stated

/dev/sde1 /run/media/gnucco/CHIAVINA16G vfat rw,nosuid,nodev,relatime,uid=1000,gid=1000,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,showexec,utf8,flush,errors=remount-ro 0 0

I tried copying the same file from windows 10 and it went ok, with a speed around 4 mb/s (not much but it's an old usb 2 stick).
Long story short, back under Arch I found out that umounting the automounted stick and then remounting it manually with almost the same options used by gvfs, but without the `flush` option, the file got copied without problems at the same speed I saw under windows. I tested this with other big files, manually mounting the stick with and without the `flush` option, and got consistent results.
Searching for a way to set gvfs automount to not use the `flush` option I came to this, so it seems the option is hard-coded into gvfs.
I don't know what to do next.

Offline

#2 2018-01-28 18:15:19

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,530
Website

Re: Slow usb copy when automounting, mounting manually without `flush` ok

pezcurrel wrote:

... it seems the option is hard-coded into gvfs.
I don't know what to do next.

You've answered your own question here.  Either patch your gvfs to revert that change, or don't use gvfs.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2018-01-29 08:19:04

pezcurrel
Member
Registered: 2012-06-21
Posts: 26

Re: Slow usb copy when automounting, mounting manually without `flush` ok

I tried removing gvfs and using udiskie instead, to no avail. udiskie has a way to configure it (by creating and editing ~/.config/udiskie/config.yml, see `man udiskie`) for a particular drive (by uuid or else) or a filesystem type in order to get them mounted with specific mount options; *but* it turns out the `flush` option is hardcoded into udisks2 too, which both gvfs and udiskie rely on, so it gets added to the mount options no matter how you configure udiskie (since there's no such thing as a `noflush` or `flush=no` mount option).
Anyway it seems to me that the first and bigger problem is that the `flush`option should work; and indeed I discovered (same usb stick, same big files) it works fine on my other two Arch boxes (two old macbooks 5,2); it just doesn't work on my desktop pc, who knows why (I also tried fiddling with usb related bios settings, again to no avail). So I think I'll file a bug against the kernel.

Last edited by pezcurrel (2018-01-29 08:34:08)

Offline

#4 2018-01-29 11:32:03

pezcurrel
Member
Registered: 2012-06-21
Posts: 26

Re: Slow usb copy when automounting, mounting manually without `flush` ok

Offline

Board footer

Powered by FluxBB