I have access to a remote file-storage server at my work (through a VPN if that matters). I connected to the server, and ran a shell script on my mac at home to copy large files from one location on the server to another location on the server. It was going extremely slow so I tried using Microsoft remote desktop to login to a Windows machine that is on site at my work (and therefore on the same local network) and used a batch file to do the copying. This seemed to go much faster.

This got me curious about what exactly is going on with each of these processes. I suspect that in the first case, the files are being transferred over the internet from the server to my local computer and then back to the file server. Whereas in the latter case, the files are merely being transferred within the company's local network hence resulting in faster copying speeds. Is this assumption correct? Any information to satisfy my curiosity about how either of these processes work is appreciated!

migrated from cs.stackexchange.com Aug 28 '18 at 8:21

This question came from our site for students, researchers and practitioners of computer science.


You got it right! (If I got right what you have done.)

When you work with a local file manager, it performs all operations locally. Even if you copy files between two locations on a same server, it performs operations by reading data into local buffer and writing them back. So, all data goes through the network twice.

When you log into remote machine, all operations are performed on the remote machine, except that it sends you copy of console output.

In theory, file manager behavior can be fixed by clever plugins (or clever built-in functionality) that intercepts server-to-server copying and performs it by logging into server and performing operation locally. I've not seen such plugins, but may be just because I never mind. Specialized file managers dealing with FTP servers support similar feature built right into the FTP file protocol - one server can copy data to another one directly, without moving them through the client computer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.