[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Fwd: nForce3 /usbstorage : deadly slow[FIXED, but sync is problem]



Thanks!
Calling "sync" automated every 2 seconds (using watch) only slightly decreased performance, while speeding up the umount process extremely, and giving the feeling that the worst case scenario of an usb storage device being unplugged in the middle of a file transition loses a lot of its effect. (Note: I use my USB devices most of the time with only one to maybe 5 files simultaniously accessed, so there is not that much lost in that case, running fsck usually does the job quite well, but without any syncing the unwritten buffers would propably have been too large)
Greetings
Marcus Müller


On 5/18/06, Paul Brook <paul@codesourcery.com> wrote:
> The problem is, that without sync, unplugging an un- umounted device is
> datacide. umounting the device after transferring 700 MB takes about 24sec,
> what seems to be looooooooong.

You can manually run "sync" to flush stuff out to disk.
The long delay you're seeing on unmount is because "copying" the 700Mb
probably kept most of it in cache, and it hadn't finished writing it back by
the time you tried to unmount the disk.

> Any idea why sync is _that_ slow with vfat
> (fat32)? Does it always have to rewrite the whole both FATs including
> analyzing the actual contents of the disk whenever a file is written?

The sync option ensures the data is always consistent on the drive, so I'm not
surprised you're seeing a large slowdown. Each write probably requires
several round-trips to update the FAT.

Paul


Reply to: