Re: Sync file on write?
- From: Paul Hartman <paul hartman+gentoo gmail com>
- To: mc gnome org
- Subject: Re: Sync file on write?
- Date: Sun, 27 Dec 2009 16:35:21 -0600
On Sun, Dec 27, 2009 at 4:30 PM, Theodore Kilgore
<kilgota banach math auburn edu> wrote:
On Sun, 27 Dec 2009, Paul Hartman wrote:
Hi,
I have a USB device and write speed is terrible when I copy more than
1 file to it (it is mounted in async mode). If I copy just one file
and sync, speed is 17MB/sec, if I copy more than 1 file the speed
drops well below 2MB/sec. This does not happen on MS Windows so I
think it's some side-effect of linux i/o flushing creating multiple
write-streams or something like this.
Anyway, I'm trying to work-around this and wonder if there is a way I
can tell MC to sync/fsync (whatever means ensure file is written to
disk physically) after each file? If it would apply only to writes
into this device that would be even better :)
thanks
paul
Paul,
I have no idea of the cause of this. I am not a specialist in Midnight
Commander to any extent whatsoever. I do know a bit more about USB, but I
have never delved very much into questions of speed.
Keeping the above disclaimers in mind, it does appear to me that there is a
simple test which might help to localize the problem.
Can you set up a situation in which the slowdown occurs in Midnight
Commander, but it is possible to move the same files from the same source
location to the same destination using command-line tools only? And run a
time comparison under both circumstances?
Theodore Kilgore
Hi,
Sorry if I wasn't clear, the problem isn't caused by MC and I don't
think MC has anything to do with it, but it is simply my tool of
choice for everyday working. It happens if I use "cp" from
command-line or copy files from within MC or using GUI tools. In other
words,
this is slow:
cp file1 file2 file3 /mnt/usb; sync
this is fast:
cp file1 /mnt/usb; sync
cp file2 /mnt/usb; sync
cp file3 /mnt/usb; sync
So that's why I was curious if there's any kind of "after file"
command or option to make it sync to disk after every file.
Thanks,
Paul
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]