Question about rsync and BIG mirror
jamie at shareable.org
Mon Mar 6 20:39:20 GMT 2006
Shachar Shemesh wrote:
> >While you're there, one little trick I've found that speeds up
> >scanning large directory hierarchies is to stat() or open() entries in
> >inode-number order. For some filesystems it makes no difference, but
> >for others it reduces the average disk seek time as on many common
> >filesystems, inode number is related to position on the disk. In
> >unusual cases I've seen a factor of 10 improvement, but usually it's
> >just 1-2.
> The way I see it, if you got that far, then you don't have any problem
> with the size of the file list.
I don't mean to stat() after reading the whole hierarchy!
That doesn't make sense anyway, because you have to stat() to decide
if something's a directory in order to recurse into it.
I mean one directory at a time, after calling readdir(), just sort the
list of directory entries by d_ino values before using them. That's
negligable in time and memory.
More information about the rsync