does --whole-file always work?
Dave Dykstra
dwdrsync at drdykstra.us
Fri May 15 19:43:15 GMT 2009
On Thu, May 14, 2009 at 09:59:16AM -0400, Matt McCutchen wrote:
> On Thu, 2009-05-14 at 15:59 +0300, Amir Rapson wrote:
> > Running rsync with --whole-file yields poorer performance results than
> > a simple "cp".
> > Looking at the code - it looks like "copy_file" isn't really called
> > when I add the --whole-file flag. The regular "receive_data" is doing
> > the copy.
>
> That's right. In the current design, file transfers are always done
> over the connection between the sender and receiver and copy_file is
> used only for copies within the destination (which happen with a few
> options such as --copy-dest). It would be possible to make a special
> case for local runs and have the receiver open the source file directly
> (or something like that), but this has not been done yet.
Also note that --whole-file is the default if both source and destination
are local. Compare it to --no-whole-file and you'll see worse performance.
- Dave
More information about the rsync
mailing list