Nice little performance improvement
jamie at shareable.org
Sat Oct 17 21:17:33 MDT 2009
Mike Connell wrote:
> >Interesting. If you're not using incremental recursion (the default in
> >rsync >= 3.0.0), I can see that the "du" would help by forcing the
> >destination I/O to overlap the file-list building in time. But with
> >incremental recursion, the "du" shouldn't be necessary because rsync
> >actually overlaps the checking of destination files with the file-list
> >building on the source.
> Ignoring incremental recursion for a moment. It seems to me that anything
> that can warm up the file cache before it is needed would be beneficial?
No, not if the file cache isn't large enough for the number of files.
E.g. if you have 20 million files and only 256MB RAM, it's likely a bad idea.
Personally I use a program that I wrote about 11 years ago, called
treescan, which pulls in the inodes to cache about twice as fast as
du by using inode number sorting.
More information about the rsync