Bug 13609 - rsync can be crazy slow on os x 10.13.6 when copying via usb drives
Summary: rsync can be crazy slow on os x 10.13.6 when copying via usb drives
Status: NEW
Alias: None
Product: rsync
Classification: Unclassified
Component: core (show other bugs)
Version: 3.1.3
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Wayne Davison
QA Contact: Rsync QA Contact
Depends on:
Reported: 2018-09-11 07:06 UTC by mvolaski
Modified: 2019-03-30 22:50 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description mvolaski 2018-09-11 07:06:30 UTC
I am copying files from one USB SATA drive to another connected to a Mac Pro via USB 3. Rsync should be able to copy approaching 100 MB/second, but it never copies anywhere near this speed and for a few files, it's so slow as to almost be stalled, averaging near 131KB/second. The OS is Mac OS 10.13.6 and the rsync is provided via homebrew.

The command being used is as follows
/usr/local/bin/rsync --acls --archive --delete --exclude-from=/usr/local/etc/backupignore --sparse --verbose --progress --xattrs /Volumes/externalhd/ /Volumes/backuphd/external/
Comment 1 mvolaski 2018-09-13 17:06:39 UTC
The sparse option is triggering this slowness. Without it, rsync runs super fast.
Comment 2 mvolaski 2018-09-14 04:20:34 UTC
I should also mention the file being copied so slowly is a Virtualbox virtual disk file.
Comment 3 roland 2019-03-30 16:45:45 UTC
what is the source and what is the remote filesystem ?

what does iostat tell on the source and the destination?

what's the size of the sparse files and how much of data is "inside" ?
Comment 4 Dave Gordon 2019-03-30 22:50:17 UTC
How about using truss/strace/whatever the OSX equivalent is to get a count of all system calls made, when run with and without the --sparse option. Total time on each type of call would be useful too.

If you find that --sparse results in ten times as many write(2)s, that might be a useful clue!

BTW remember there is a bug that is triggered by using --sparse and --preallocate (and possibly --inplace) together. See https://bugzilla.samba.org/show_bug.cgi?id=13320#c1 for details.