[ Home | Blog home | RSS 2.0 | ATOM 1.0 ]
I've recently implemented server-side copy support in libsmbclient. The code is currently in Samba's master branch and should be in Samba 4.3. Unless you're using 10GbE, this makes a significant improvement in copying files from one location to another on a share. This is especially so because without server-side copy support, GVFS uses a simple read/write loop with a block size of 64 KiB to copy the data which, due to latencies means one typically gets about half of the available bandwidth of a single direction.
The Samba server includes some extra-special sauce: the ability to use BTRFS reflinking/copy-on-write support to make copies almost instantaneous.
On my dev branch, I've added the ability for GVFS to transparently make use of server-side copy support if it is available.
So here is the obligatory video, first showing the experience one gets on current Linux distros where all the data goes over the network, then doing a server-side copy, and finally doing a server-side copy on a BTRFS-backed share. The video is also on YouTube.
One point to note is that the server-side copy (the second part of the video) is pretty slow because I was using a USB2 external HDD. The difference between the first and second sections would be larger if using a better disk.
The libsmbclient code is already in Samba, hopefully the rest of the pieces will fall into place so that we get this out of the box from distros in a few months.
This post was inspired by the Samba Server-side Copy wiki page. Thanks to the Samba team for implementing support on the server side.
Any opinions expressed here are my own and do not in any way reflect the opinions of my employer, or anyone else.
Made with Pyblosxom