rsync behavior on copy-on-write filesystems

Chris Dunlop chris at onthe.net.au
Tue May 21 21:46:44 MDT 2013


On 2013-05-21, Allen Supynuk <allen.supynuk at gmail.com> wrote:
> I have been doing some experiments with rsync on btrfs, a
> copy-on-write file system that is approaching or having just achieved
> production-ready status depending on your requirements.

<snip>

> ## 6) Use rsync --inplace to make a copy of the first file.
> ##    Note:
> ##    - We use --inplace to copy over the existing file
> ##    - We do not use -W aka --whole-file so the delta-xfer algorithm
> should be in play
> ##    - The hope is that rsync will only rewrite the first block of the file
>
> $ time /usr/share/sbtools-sbjobarchive/external-apps/rsync/rsync-3.0.9/install/centos5-64/bin/rsync
> --stats -az --timeout=600 --inplace src/ current/
>
> Number of files: 2
> Number of files transferred: 1
> Total file size: 10737418240 bytes
> Total transferred file size: 10737418240 bytes
> Literal data: 10737418240 bytes
> Matched data: 0 bytes
> File list size: 52
> File list generation time: 0.001 seconds
> File list transfer time: 0.000 seconds
> Total bytes sent: 10742659175
> Total bytes received: 34
>
> sent 10742659175 bytes  received 34 bytes  11012464.59 bytes/sec
> total size is 10737418240  speedup is 1.00
> 851.783u 79.265s 16:14.78 95.5% 0+0k 19752416+20971520io 17pf+0w
>
> ## 7) Alas the new file takes up a full extra 10 GB.

You're testing --whole-file: that's the default with source and
destination as local paths. You want --no-whole-file in there.

Cheers,

Chris



More information about the rsync mailing list