does --whole-file always work?

Dave Dykstra dwdrsync at drdykstra.us
Sat May 16 11:27:49 GMT 2009


--whole-file definitely does something: it turns off the rsync rolling
checksum algorithm, which avoids reading the destination file before
writing it.  It just doesn't avoid passing the data between two
processes and the other things that rsync normally does. 

- Dave

On Sat, May 16, 2009 at 07:49:05AM +0300, Amir Rapson wrote:
> Thanks Matt and Dave,
> But now I'm a bit confused, it doesn't work because it has not been done  
> yet, but it's the default?
> Are there any plans of improving the performance with local files?
> Do you mind if I give it a go?
>
> Thanks,
> Amir
>
> --------------------------------------------------
> From: "Dave Dykstra" <dwdrsync at drdykstra.us>
> Sent: Friday, May 15, 2009 10:43 PM
> To: "Amir Rapson" <amir.rapson at gmail.com>
> Cc: <rsync at lists.samba.org>
> Subject: Re: does --whole-file always work?
>
>> 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 
>
> -- 
> Please use reply-all for most replies to avoid omitting the mailing list.
> To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
> Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


More information about the rsync mailing list