Linux – Faster file writing on sshfs mounted directory

linuxmountsshfs

Here is the following scenario: I have server1 and server2 and using sshfs I mount a directory from server2 on server1, let's say /mnt.
Now, if I try to unpack a 50K files archive on server1:/mnt it takes 13 mins to complete while doing the same on server1:/local_dir will only take some 5 seconds.

I was wondering if there is any way/configuration that could speed up the things.

Best Answer

It's slower since it has to unpack them to a remote server. The speed difference is due to network delay, sshfs overhead, etc. For every file, you have to send the data to server2, wait for response, and then do it again for the next.

If you want to speed it up a bit*, upload the package to server1:/mnt and unpack it on server2.

*it will still be slower then on server1:/local_dir ofcourse

Related Topic