If I'm performing an rsync copy operation on a file that is on an SMB (Samba) share, is the file actually being pulled down from the network onto my client, pieces at a time, and then copied back onto the share?

I'm seeing file copy commands with rsync topping out at around 10 MB/s, which seems quite slow considering the enterprise storage this mount is on.

Specifically I'm invoking rsync via Python.

  • can you pls be more specific, it is not quite understanding what actually you're doing.
    – klerk
    Mar 17, 2014 at 20:31

2 Answers 2


Yes the files need to be transferred to the local machine where they can be interrogated by the rsync that's running locally on your system and then the files are streamed back out to the targeted location.

Often times when you need the optimal performance when performing this type of task it makes more sense to login to the system, if possible, that's hosting either the source or destination data and run the rsync directly from there. This will cut down the network traffic by 50% for obvious reasons.


Some remote filesystems may support remote execution of certain file operations (of course, within the boundaries of the same filesystems), but I think that in the most commonly used remote filesystems it just copies. See related question about NFS: https://superuser.com/questions/337778/copy-remote-files-on-nfs-without-round-trip

NFS is more compatible with unix filesystem model than samba, and more robust, so I imagine that samba doesn't do that. And in any case, I think that cp/rsync is the one that should be aware of this and execute an atomic remote copy. Without a hint, the filesystem by itself can't even know that you are copying, it just sees that you opened a new file and wrote some stuff in it (which is maybe read from another file, but who knows what you are changing).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .