<br><br><div class="gmail_quote">On Sun, Feb 1, 2009 at 2:16 PM, Angelo Bertolli <span dir="ltr"><<a href="mailto:angelo.bertolli@gmail.com">angelo.bertolli@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="gmail_quote"><div class="Ih2E3d">On Sun, Feb 1, 2009 at 1:41 PM, David L. Anselmi <span dir="ltr"><<a href="mailto:anselmi@anselmi.us" target="_blank">anselmi@anselmi.us</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>Angelo Bertolli wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
The problem with rsyncing an ever-growing mbox is that it always needs to be<br>
copied since it will always be different.<br>
</blockquote>
<br></div>
It always needs to be copied but only blocks that don't match are copied (in this case only the new data at the end of the file). Which is exactly what we want.<br>
</blockquote></div><div><br>So rdiff then?<br><br>Normally rsync doesn't compare the two files: it just compares the timestamps and sizes, then copies the whole file if they don't match. You can force a comparison check, but that usually takes even longer.<br>
<br>Maybe rdiff will copy just the changed blocks, but it will still have to perform the diff. Yeah, I know there's supposed to be some "magic" to efficiently do diffs over the net (maybe using checksums?)<br>
<br></div></div>
</blockquote></div><br>I decided to checkup on myself a little bit. Online docs say that rsync sends only the differences and "information about structure" but my experience seems to indicate otherwise. So I ran a little test too on a file where I just changed the timestamp without changing the file contents:<br>
<br>Bertolli@galileo ~<br>$ cp -a testfile-100M destfile<br><br>Bertolli@galileo ~<br>$ rsync -av testfile-100M destfile <br>sending incremental file list<br><br>sent 56 bytes received 12 bytes 8.00 bytes/sec<br>total size is 104857600 speedup is 1542023.53<br>
<br>Bertolli@galileo ~<br>$ touch testfile-100M <br><br>Bertolli@galileo ~<br>$ rsync -av testfile-100M destfile <br>sending incremental file list<br>testfile-100M<br><br>sent 104870495 bytes received 31 bytes 113804.15 bytes/sec<br>
total size is 104857600 speedup is 1.00<br><br>I didn't time it, but the initial cp easily took 1/3rd the time the final rsync did--I would estimate more like 1/4th or 1/5th the time. I've always read "speedup is 1.00" as "this is equivalent to having copied the whole file." Meaning I gained no speedup over just transmitting the file regularly, as calculated by the algorithm.<br>
<br><br>Angelo<br><br>