Can rsync assume that the destination directory is empty ?

Simon Hobson linux at thehobsons.co.uk
Thu Jun 9 13:11:08 UTC 2016


On 9 Jun 2016, at 11:35, Arnaud Aujon Chevallier <arnaud at intelibre.fr> wrote:

> I ran some more test and it show that the lstat calls are only responsible for 3.7 % of the total time.
> 
> So we could avoid about a third of them (the errors numbers), which will be about 1%, not very interesting :)
> % time     seconds  usecs/call     calls    errors syscall
> ------ ----------- ----------- --------- --------- ----------------
>   3.74    1.792339           1   2088744    693051 lstat

Is that wallclock time or cpu time ?
AIUI rsync is optimised to work over slow or high latency links and does parallel operations.
Thus, while it may be doing checks it doesn't need to, these don't necessarily contribute to total time taken which will be dominated by data transfer times. Obviously this will depend on various factors - particularly the link speed and the performance of the two systems. If the stat operations happen in parallel with the data transfer, it may be that they don't affect overall time taken at all.


More information about the rsync mailing list