Rsync copies more than the changes

Kevin Korb kmk at sanitarium.net
Sun Oct 6 14:50:47 MDT 2013


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

You are using rsync on local files.  Rsync forces --whole-file whenver
it isn't networking.

On 10/06/13 16:03, Ole Tange wrote:
> I use rsync on an SSD which is slow at writing, but very fast at 
> reading, so it is important to me to avoid writing data.
> 
> I had hoped rsync would only write changes in files when using 
> --inplace, but it seems not:
> 
> # Make a 1 GB file $ perl -e 'print "x"x1000000000' > 1g # rsync it
> (as expected this costs 1 GB writes) $ ./rsync-3.1.0/rsync
> --progress --inplace -cva 1g 1g.copy # Change the first 200 bytes
> inplace $ perl -e 'open(A,"+<",shift) || die; seek(A,1,1); print A
> "a\n"x100;' 1g.copy # rsync again $ ./rsync-3.1.0/rsync --progress
> --inplace -cva 1g 1g.copy
> 
> I would have expected the final rsync to take 2 GB reads and 1 KB 
> write, but it seems to take 2 GB read and 1 GB write (measured by 
> /sys/block/sda/stat).
> 
> Had it taken 2 GB reads and 1 KB writes it would have been much
> faster on my machine, as the 2 GB would be in the read cache.
> 
> How can I tell rsync to write less given the situation above?
> 
> 
> /Ole
> 

- -- 
~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~
	Kevin Korb			Phone:    (407) 252-6853
	Systems Administrator		Internet:
	FutureQuest, Inc.		Kevin at FutureQuest.net  (work)
	Orlando, Florida		kmk at sanitarium.net (personal)
	Web page:			http://www.sanitarium.net/
	PGP public key available on web site.
~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlJRzScACgkQVKC1jlbQAQd3wgCg7THuFwm2jT3ROzSI5Z7X7MOu
lM0AniuwsfwS7cVkgwfkVIu/H9qtZGic
=4HX1
-----END PGP SIGNATURE-----


More information about the rsync mailing list