[Bug 10552] New: Sender checksum calculation significantly slower with compression enabled

samba-bugs at samba.org samba-bugs at samba.org
Mon Apr 14 14:10:58 MDT 2014


https://bugzilla.samba.org/show_bug.cgi?id=10552

           Summary: Sender checksum calculation significantly slower with
                    compression enabled
           Product: rsync
           Version: 3.1.1
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P5
         Component: core
        AssignedTo: wayned at samba.org
        ReportedBy: dougmiles at cox.net
         QAContact: rsync-qa at samba.org


I've noticed that with the -z option enabled, comparing two files that are
identical (or nearly so) but have different modification times takes
significantly longer than without the -z option.  It looks like the entire file
is compressed as the checksum is calculated even when no data needs to be
transmitted to the receiver.

To replicate:

Create test folders/files (using incompressible data to maximize effect):
mkdir a b
dd if=/dev/urandom of=a/a.tst bs=1M count=250
cp a/a.tst b/

run rsync without compression:
touch a/a.tst
time rsync -av a/ b

run rsync with compression:
touch a/a.tst
time rsync -avz a/ b

The second time with the -z option will take significantly longer, even though
the source and destination files are identical apart from the modification
times.  I've also found that the latter uses much more CPU, but only on one of
the two processes- the sender process I believe.

Even when I added --skip-compress=tst, it made rsync much faster than -z alone,
but it still took about 30% longer than omitting -z entirely.

-- 
Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the rsync mailing list