[LAD] [OT] bash vs disk activity

Forest Bond forest at alittletooquiet.net
Tue Oct 9 13:16:46 UTC 2007


Hi,

On Tue, Oct 09, 2007 at 01:11:38PM +0200, Lars Luthman wrote:
> On Tue, 2007-10-09 at 14:02 +0300, Sampo Savolainen wrote:
> > Quoting Patrick Shirkey <pshirkey at boosthardware.com>:
> > 
> > > For example if I transfer 200mb to a usb disk the copy command takes
> > > about 30 seconds before it returns and the data takes about 5 minutes
> > > before it is actually finished being transferred and the device is
> > > unmountable. 
> > 
> > quick-hack(tm)
> > 
> > (cp -a /xxx /usb_device && sync) &
> >  
> > But remember sync flushes _everything_.
> 
> Slightly-slower-hack: add the 'sync' option to whatever script or config
> file is used to mount the device (/etc/fstab, udev rules, KDE service
> menu etc). That way all writes will be synchronised automatically.

It sounds like this doesn't matter much for you, but keep in mind that -o sync
doesn't cause reads to be unbuffered, so don't go trying to benchmark your flash
devices that way!

-Forest
-- 
Forest Bond
http://www.alittletooquiet.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.linuxaudio.org/pipermail/linux-audio-dev/attachments/20071009/34e1628a/attachment.pgp>


More information about the Linux-audio-dev mailing list