[Dirvish] using --inplace ?
Dave Howorth
dhoworth at mrc-lmb.cam.ac.uk
Fri Sep 1 09:09:38 UTC 2006
Paul Slootman wrote:
> I was chekcing what rsync does in a typical dirvish run. Basically lots
> of stat()s of the file in the destination directory, stat()s of the file
> in the link-dest directory, then (when the file doesn't yet exist) an
> open() for writing in the destination directory with a temporary
> filename, and then a rename() at the end.
What does it do in the case where the file does exist but has changed?
> I considered that the use of a temp name and then a rename doesn't
> really make much sense in dirvish usage. Since rsync 2.6.3 (30 Sep 2004)
> it knows about --inplace.
But according to the man page, I think we can only use it from 2.6.4
onwards:
"Prior to rsync 2.6.4 --inplace was also incompatible with
--compare-dest and --link-dest."
> This will save 2 system calls per new or
> changed file. Doesn't sound like much, but it's a lot of metadata
> updates that will impact journalling filesystems.
I'm all for saving system calls (and context switches :) so this sounds
like a good idea.
> Can anyone think of a reaon why using it would be a bad idea, besides
> the fact that an older rsync version may be in place (pun intended),
> in which case it should be upgraded anyway?
>
> I've actually modified dirvish already on one of the systems I have
> dirvish running on to use --inplace, I'll check tomorrow how it went.
It always comes down to how to know something didn't break, doesn't it?
Cheers, Dave
More information about the Dirvish
mailing list