On Thu, 2023-09-21 at 20:08 -0400, Kevin Korb via rsync wrote:

> I have heard in the past that rsyncing an empty dir over a tree to 
> delete the tree is faster than an rm -rf but I can't say I have ever 
> benchmarked it to get any actual numbers.

This **may** indeed be a myth (for a long time now) re-cited again and again and
- could no longer be valid today
- could apply only when deleting explicitly named files but not deleting the 
complete folder
  (as we need to do in "Back in Time")

At least I could not find a holistic benchmark with many files and different 
scenarios
(file systems, rsync'ing locally vs. over network, snapshot sizes, number of 
files, file sizes, rsync and rm versions...)

Q: Does `rsync` provide a test case that I could use as basis to prepare such a 
holistic benchmark?

> But now that I am hearing 
> that rsync actually adds a bunch of pointless chmods to the process.  Is 
> it still faster given this problem?  If so maybe we should be trying to 
> investigate why rm is so slow.

Just by strace'ing I saw `rm` mainly calls unlink, `rsync` does not.




-- 
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

Reply via email to