Rsync differences using NFS & SMB

Simon Wong (Staff) s.wong at dundee.ac.uk
Tue Jul 21 08:48:58 UTC 2015


Hi,

I’m having difficulties trying to understand the performance differences
between NFS and SMB. I  have used rsync (OS X) over SMB (mounted network
storage) and using rsync (OS X) over SSH (NFS mounted storage)

From my test, rsync over SMB builds a file list each time comparing
modified source/destination, where as rsync over ssh/nfs is incredibly
quicker, pretty much instant.

During the test;
- when running rsync to the mounted storage on Linux, it identified
new/deleted files immediately!
- When running rsync over SMB, it builds a complete file list and lists
each directory before any copy takes place.

To the users perception, building the file list (lets say the user has
hundreds/thousands of folders) takes some time to run through each
directory.  Once the rsync completes the initial copy, on the second
rsync, it completes within seconds.  As expected, right?

The problem occurs when I unmount and remount the SMB share.  If I run
rsync again it builds the whole file list and begins to run through 'every
folder”, even if there is nothing to copy!

This is not the same behaviour using rsync via ssh over nfs, it doesn’t
appear to show "building file list" and immediately informs the user if
files are copying or the completion time.  I have tried multiple
troubleshooting, even unmounting the the NFS share and clearing the cached
memory in Linux with no success.


The commands I have played around with are;-

Over smb
rsync -uvaz --delete /source /destination
rsync -aHEXAx -v --delete --progress --stats --timeout=999 /source
/destination  (tried without —progress and —stats, same behaviour)

Over ssh/nfs
rsync -nuvaz --delete /source/ root at nfsServer.domain.co.uk:


Thanks,

Si



The University of Dundee is a registered Scottish Charity, No: SC015096


More information about the rsync mailing list