does --whole-file always work?

Amir Rapson amir.rapson at gmail.com
Sat May 16 04:49:05 GMT 2009


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 



More information about the rsync mailing list