You are not logged in.

#1 2012-04-09 12:42:26

olivierk
Member
Registered: 2011-09-27
Posts: 19

Unmounting vfat USB devices very slow after copying files on them

Hi,

I'm observing a phenomenon I never experienced under linux before.
When unmounting an USB device, if I have copied an important amount of data on it, it takes a lot of time. Something like 5mn for 1GB of data transfered. KDE shows "removing..." on the device notifier.
This happens with vfat devices, and only if I copied data on it (and not from it).

Why is that? Is that new? Am I the only one?

Thanks for the help smile

Olivier

Offline

#2 2012-04-09 12:51:44

examon
Member
Registered: 2011-05-07
Posts: 208

Re: Unmounting vfat USB devices very slow after copying files on them

Hey, I'm experiencing exactly the same thing. I'm umounting devices via console and sometimes it's really slow. I have one NTFS USB device and as you said it's slow after something was copied on it.

Offline

#3 2012-04-09 13:18:57

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,810

Re: Unmounting vfat USB devices very slow after copying files on them

That's because some or most of the actual writing doesn't take place until after you issue the unmount command (because the data is cached).  Plus there's a well known issue with USB write speeds, which exacerbates the issue.  I generally issue a sync command after copying data to force the write, though this doesn't make it any faster.  There's also some mount options that can force the data to be written immediately, but last I read there was some (mild) controversy over their use.

Edit: for fat, the option is flush.

Last edited by alphaniner (2012-04-09 13:41:30)


But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

#4 2012-04-09 13:38:45

Gusar
Member
Registered: 2009-08-25
Posts: 3,607

Re: Unmounting vfat USB devices very slow after copying files on them

That's why the "flush" option for vfat has been created. It's kinda like sync, but faster, it makes data be written out as soon as possible instead of piling up in a cache. So whatever mounts your usb-sticks, configure it to use the "flush" mount option.

Offline

#5 2012-04-09 14:04:48

olivierk
Member
Registered: 2011-09-27
Posts: 19

Re: Unmounting vfat USB devices very slow after copying files on them

Thanks a lot, that's helpful.

How can you configure KDE to automatically mount using the "flush" option?
Looking in the device notifier, or in the settings, I find nothing like that..

Edit: there is an open bug report for KDE here.
The only workaround I've found yet is ugly…

Last edited by olivierk (2012-04-09 15:13:56)

Offline

#6 2012-04-09 20:39:59

Convergence
Member
Registered: 2005-07-02
Posts: 377

Re: Unmounting vfat USB devices very slow after copying files on them

has anyone tried this:

http://www.tuxradar.com/answers/210


It's a very deadly weapon to know what you're doing
---  William Murderface

Offline

#7 2012-04-09 20:45:50

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Unmounting vfat USB devices very slow after copying files on them

Convergence wrote:

It mentions HAL and 2.6.12 kernel.


Edit: Or did you mean 'async' mount option? It's fine, it's about personal preference I think.

man mount wrote:

       defaults
              Use default options: rw, suid, dev, exec, auto, nouser, and async.

Last edited by karol (2012-04-09 20:49:44)

Offline

Board footer

Powered by FluxBB