Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have been using sshfs to work remotely, but it is really slow and annoying, particularly when I use eclipse on it.

Is there any faster way to mount the remote file system locally? My no.1 priority is speed.

Remote machine is Fedora 15, local machine is Ubuntu 10.10. I can also use Windows XP locally if necessary.

share|improve this question

migrated from Oct 8 '11 at 3:17

This question came from our site for professional and enthusiast programmers.

up vote 5 down vote accepted

sshfs is using the SSH file transfer protocol, which means encryption.

If you just mount via NFS, it's of course faster, because not encrypted.

are you trying to mount volumes on the same network? then use NFS.

share|improve this answer
It's not slow because of the encryption, it's slow because it's FUSE and it keeps checking the file system state. – w00t May 19 '13 at 13:40
@w00t I don't think that it's FUSE slowing it down, and not the encryption. Changing the encryption to arcfour sped it up for me, whereas using scp was just as slow as sshfs. – Sparhawk Sep 28 '13 at 4:57
@Sparhawk there's a difference between throughput and latency. FUSE gives you pretty high latency because it has to check the filesystem state a lot using some pretty inefficient means. arcfour gives you good throughput because the encryption is simpler. In this case latency is most important because that's what causes the editor to be slow at listing and loading files. – w00t Sep 29 '13 at 11:16
@w00t. Ah okay. Good points. – Sparhawk Sep 29 '13 at 12:42

Besides already proposed solutions of using Samba/NFS, which are perfectly valid, you could also achieve some speed boost sticking with sshfs by using quicker encryption (authentication would be as safe as usual, but transfered data itself would be easier to decrypt) by supplying -o Ciphers=arcfour option to sshfs. It is especially useful if your machine has weak CPU.

share|improve this answer
-oCipher=arcfour made no difference in my tests with a 141 MB file created from random data. – Sparhawk Sep 28 '13 at 4:39
That's because there were multiple typos in the command. I've edited it. I noticed a 15% speedup from my raspberry pi server. (+1) – Sparhawk Sep 28 '13 at 4:56

If you need to improve the speed for sshfs connections, try these options:


command would be:

sshfs remote:/path/to/folder local -oauto_cache,reconnect,defer_permissions
share|improve this answer
Thanks, worked for me! Had to remove defer_permissions though (unknown option). – Mathieu Rodic Mar 10 '15 at 11:35
Won't nolocalcaches decrease performance by forcing lookups every operation? Does this contradict auto_cache? – earthmeLon Jun 15 '15 at 18:13
The way I read the docs, nolocalcaches only disables the kernel side of things, sshfs still has its own cache. I could imagine that the kernel level checks are tuned for "real" file systems and as such more extensive. On the sshfs side "cache_timeout" looks promising, too. Here's a list: ... lots of good stuff. :-) – Someone Oct 29 '15 at 17:21
nolocalcaches and defer_permissions don't seem valid (anymore?) on Debian Jessie. – Someone Oct 29 '15 at 17:31
I find that "kernel_cache" is faster than "auto_cache", but afaik it assumes exclusive access, so only use it if nothing else is changing that data. – Someone May 30 at 14:52

NFS should be faster. How remote is the filesystem? If it's over the WAN, you might be better off just syncing the files back and forth, as opposed to direct remote access.

share|improve this answer

SSHFS is really slow because it transfers the file contents even if it does not have to (when doing cp). I reported this upstream and to Debian, but no response :/

share|improve this answer

Either NFS or Samba if you have large files. Using NFS with something like 720p Movies and crap is really a PITA. Samba will do a better job, tho i dislike Samba for a number of other reasons and i wouldn't usually recommend it.

For small files, NFS should be fine.

share|improve this answer

Login as root.

Access your top level directory, by using "cd /".

Then ensure that you have a mount folder created or create one using "mkdir folder_name".

After that, simply use "mount x.x.x.x:/remote_mount_directory /local_mount_directory.

if everything worked on your end, before this you should have a successful mount. You might want to check and make sure the destination directory is shared by using the "exportfs" command to gurantee they are able to be found.

Hope this helps. This is not from a lvie environment, it has been tested on a LAN using VMware and Fedora 16.

share|improve this answer
This does not answer the question… – Léo Lam May 1 '15 at 15:15

I can recommend these options:

sshfs -o cache_timeout=115200 -o attr_timeout=115200 ...

I believe this will avoid some of the round trip requests to fetch content or permissions for files.

Those options are not recommended if the remote files might be updated without the local machine knowing, e.g. by a different user, or a remote ssh shell. In this case, lower timeouts would be preferable.

sshfs simulates deletes and changes locally, so new changes made on the local machine should appear almost immediately, despite the large timeouts, as cached data is automatically dropped.

Here are some more options, but I haven't actually measured any success with them so far:

sshfs_opts="-o auto_cache -o cache_timeout=115200 -o attr_timeout=115200   \
-o entry_timeout=1200 -o max_readahead=90000 -o large_read -o big_writes   \
-o no_remote_lock"

The biggest problem in my workflow is when I try to read many deeply recursive folders, because sshfs performs a round trip request for each folder separately. This may also be the bottleneck with Eclipse.

Pipelining (sending multiple requests rather than one at a time) is not an option to help with this, since most apps will naturally block until one file stat is complete before moving on to the next. They weren't designed for high-latency filesystems.

But something sshfs could do would be to look ahead at the remote file system, collect folder stats before I request them, and send them to me when the connection is not immediately occupied. This would use more bandwidth (from lookahead data that is never used) but could improve speed.

share|improve this answer

You must log in to answer this question.

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