<div dir="ltr">Kevin:<div><br></div><div><div>On Tue, Mar 11, 2014 at 6:18 PM, Kevin Korb <<a href="mailto:kmk@sanitarium.net">kmk@sanitarium.net</a>> wrote:</div><div>>- --checksum should not be used during normal rsync operations.  It is</div>
<div>>for special cases only.</div><div><br></div><div>I noted in a reply that we're in that "special case" arena.  The use</div><div>case is one where operations are being replicated between systems and</div>
<div>the data files created are meant to be identical.  However, bad things</div><div>happen and then repairs are needed.  Since it is the operations that</div><div>are being replicated and not the data the time stamps do not match</div>
<div>but the byte-counts should.  Unfortunately, the byte-counts don't</div><div>tell the real story and therefore the checksums must be computed.</div><div><br></div><div>There are a lot of products that are doing this type of replication</div>
<div>these days: Subversion's svnsync and (the company I work for)</div><div>WANdisco's SVN MultiSite products to mention just two.  There are a</div><div>lot more.</div><div><br></div><div>>Rsync can still have a lot of overhead getting the timestamps via</div>
<div>>stat() but that can't really be helped.</div><div><br></div><div>The overhead of getting the timestamps is tiny compared with the I/O</div><div>computing the checksums.</div><div><br></div><div>>I don't really understand how file mtimes would be cached.  How would</div>
<div>>rsync know what mtimes don't match the cache without checking</div><div>>stat()ing the files and then the job is already done so the cache</div><div>>wouldn't accomplish anything.</div><div><br></div>
<div>The concept is that, without file system corruption or intentional</div><div>covert corruption, the tuple {filePath, 64-bit mtime, checksum} is</div><div>an invariant.  Cache invalidation is simple: if the mtime is not</div>
<div>exactly the same then re-compute the checksum.  Using such a cache</div><div>means that the comparison operation is of the same order of</div><div>magnitude as a "find" through the subtree of the file system versus </div>
<div>reading every file in that subtree AND doing the necessary CPU</div><div>intensive checksum computation.  It would be a huge win.</div><div><br></div><div>Thank you.</div><div><br></div><div>Doug</div><div><br></div>
<div>>On 03/11/2014 06:11 PM, Doug Robinson wrote:</div><div>>> Folks:</div><div>>></div><div>>> When using rsync to copy huge amounts of data I've found that a</div><div>>> significant amount of time is spent computing the checksums.</div>
<div>>> Sometimes hours, ... sometimes days - it depends on the total</div><div>>> amount of data checked!  And after that sometimes it's only a few</div><div>>> files that need to be updated.</div><div>
>></div><div>>> I've pulled the latest git (rsync-3.1.1pre1) and didn't see</div><div>>> anything to address this (or I missed it?).</div><div>>></div><div>>> I was wondering what folks thought of a proposal to enhance rsync</div>
<div>>> to be able to create and maintain a cache of {filePath, 64-bit</div><div>>> mtime, checksum} beforehand on both source and target systems and</div><div>>> then use that cache later on when asked to sync the two systems</div>
<div>>> together?  Then cache entry validation would be a quick stat64() to</div><div>>> make sure that the 64-bit mtime didn't change before sending the</div><div>>> checksum over the wire for comparison.</div>
<div>>></div><div>>> Clearly the cache would need to be completely invalidated (or</div><div>>> re-created) if the file system became corrupt.  That could be</div><div>>> handled via an "rm -rf" of the cache.</div>
<div>>></div><div>>> Thoughts?</div><div>>></div><div>>> Thank you.</div><div>>></div><div>>> Doug -- WANdisco // /Non-Stop Data/</div><div>>></div><div>>> t. 925-396-1125 e. <a href="mailto:doug.robinson@wandisco.com">doug.robinson@wandisco.com</a></div>
<div>>> <mailto:<a href="mailto:doug.robinson@wandisco.com">doug.robinson@wandisco.com</a>></div><div>>- --</div><div>>~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~</div>
<div>>        Kevin Korb                      Phone:    (407) 252-6853</div><div>>        Systems Administrator           Internet:</div><div>>        FutureQuest, Inc.               Kevin@FutureQuest.net  (work)</div>
<div>>        Orlando, Florida                <a href="mailto:kmk@sanitarium.net">kmk@sanitarium.net</a> (personal)</div><div>>        Web page:                       <a href="http://www.sanitarium.net/">http://www.sanitarium.net/</a></div>
<div>>        PGP public key available on web site.</div><div>>~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~</div><div><br></div><div class="gmail_extra">
<div>-- <br></div><div dir="ltr"><div>Doug Robinson</div><div><div style="color:rgb(80,0,80)"><div dir="ltr" style="color:rgb(34,34,34)"><font color="#666666"><br>WANdisco</font> <font color="#ff9900">//</font> <i><font color="#666666">Non-Stop Data</font></i></div>
</div><div><div dir="ltr"></div></div></div><div><div><a value="+447966783417" style="color:rgb(17,85,204)"><br></a></div><div><font color="#cccccc">t.</font><font color="#999999"> </font><a value="+447966783417" style="color:rgb(17,85,204)">925-396-1125</a></div>
<div><font color="#cccccc">e. </font><a href="mailto:doug.robinson@wandisco.com" style="font-size:small;color:rgb(17,85,204)" target="_blank">doug.robinson@wandisco.com</a><br></div></div></div>
</div></div></div>

<br>
<div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13.513513565063477px;background-color:rgb(255,255,255)"><p style="font-size:13.333333015441895px">Join us in New York and San Francisco for <a href="http://www.wandisco.com/subversion-git-live-2014" style="color:rgb(17,85,204)" target="_blank">Subversion & Git Live 2014</a></p><p style="font-size:13.333333015441895px">Listed on the London Stock Exchange: <a href="http://www.bloomberg.com/quote/WAND:LN" style="color:rgb(17,85,204)" target="_blank">WAND</a></p><p style="font-size:13.333333015441895px"></p><p style="font-size:13.333333015441895px"><font color="#999999" size="1">THIS MESSAGE AND ANY ATTACHMENTS ARE CONFIDENTIAL, PROPRIETARY, AND MAY BE PRIVILEGED.  If this message was misdirected, WANdisco, Inc. and its subsidiaries, ("WANdisco") does not waive any confidentiality or privilege.  If you are not the intended recipient, please notify us immediately and destroy the message without disclosing its contents to anyone.  Any distribution, use or copying of this e-mail or the information it contains by other than an intended recipient is unauthorized.  The views and opinions expressed in this e-mail message are the author's own and may not reflect the views and opinions of WANdisco, unless the author is authorized by WANdisco to express such views or opinions on its behalf.  All email sent to or from this address is subject to electronic storage and review by WANdisco.  Although WANdisco operates anti-virus programs, it does not accept responsibility for any damage whatsoever caused by viruses being passed.</font></p></div>