USB storage (flash sticks) sloooow

Hi, USB sticks or MP3 players are mounted synchronous by default. This is "safe", but slow as hell. I've two different sticks, both incredibly slow with the synchronous option. If you do a remount async /media/usbdisk, performance is acceptable (I mean the sequence "cp some megabytes; sync", not the cp alone, which is to finish much faster, anyway). It's also healthier for the Flash memory. The reason should obvious: A sync write on a FAT file system means that for each block copied, there's a file allocation pointer to be updated. For the flash controller, a single FAT pointer update means "erase a page, copy old content to the new page" and probably update some other structures. The doctor tells you: Don't do that. Flash pages stand a limited number of erases (10k/100k) per block, so the memory degrades quite fast doing it that way. You should do all updates of a single flash page in one go if possible. Note that you can't know the size of the flash page, since that's hidden by the memory controller. It can be considerably larger than the FAT block granularity, either (so the way cp determines the block size might be "wrong", too). Now the fix is "simple": mount it async by default, and add some "remove external drive" button that does an umount on the node. There actually is something like that in KDE, but it doesn't work (you can't umount as normal user, since the hotplug device is not in /etc/fstab). What I'd like to know: a) how do I make it mount async by default? I'm lost in the hotplug scripts. b) how do I fix KDE's removable disk button to be able to umount the hotplugged disk? -- Bernd Paysan "If you want it done right, you have to do it yourself" http://www.jwdt.com/~paysan/

On Wed, 2005-12-07 at 16:51 +0100, Bernd Paysan wrote:
Now the fix is "simple": mount it async by default, and add some "remove external drive" button that does an umount on the node. There actually is something like that in KDE, but it doesn't work (you can't umount as normal user, since the hotplug device is not in /etc/fstab).
What I'd like to know:
a) how do I make it mount async by default? I'm lost in the hotplug scripts.
b) how do I fix KDE's removable disk button to be able to umount the hotplugged disk?
Using eject from a shell does work for a normal user and achieves the desired result, in my experience with 64-bit 9.3. I think the KDE menus also support eject somehow but I don't use KDE so I don't know the details. Cheers, Dave

Bernd Paysan wrote: [...]
What I'd like to know:
a) how do I make it mount async by default? I'm lost in the hotplug scripts.
If you are talking about SuSE Linux 10.0? Read the Release Notes, please. They can be found here: file:///usr/share/doc/release-notes/RELEASE-NOTES.en.html In the later part is something written about "Mounting Hotplugged Devices". :-) Regards, Klaus. -- Klaus Singvogel SUSE LINUX Products GmbH Maxfeldstr. 5 E-Mail: Klaus.Singvogel@SuSE.de 90409 Nuernberg Phone: +49 (0) 911 740530 Germany GnuPG-Key-ID: 1024R/5068792D 1994-06-27

One quick answer https://bugzilla.novell.com/show_bug.cgi?id=105871 __________________________________________________ Χρησιμοποιείτε Yahoo!; Βαρεθήκατε τα ενοχλητικά μηνύματα (spam); Το Yahoo! Mail διαθέτει την καλύτερη δυνατή προστασία κατά των ενοχλητικών μηνυμάτων http://mail.yahoo.gr
participants (4)
-
Bernd Paysan
-
Dave Howorth
-
Karaoulis Marios
-
Klaus Singvogel