Using git over sshfs is too slow

banyan picture banyan · Aug 30, 2011 · Viewed 13.4k times · Source

I'm using git over sshfs (under Mac OS X 10,5, 10.7) but it's too slow.

Everytime I logged in remote server direcly, to use git command.

I tried this post, http://kerneltrap.org/mailarchive/git/2008/10/23/3768494 however it doesn't work.

Does anyone know any good ideas?

Answer

Agoston Horvath picture Agoston Horvath · Sep 1, 2011

You could pick some other filesystem. SSHFS is mainly a convenience tool. MacOS support NFS mounts, for example, and that is fast.

Another way to go ahead would be to use rsync or unison ('two-way rsync' tool). These do really quick sync between the remote and local filesystem. Coupled with some quick shell aliases for compiling/running remotely, it is a nice workaround.

Another way would be to run your development environment remotely over VNC/X11. This makes the IDE somewhat more sluggish, but the code doesn't need to be synced.

A mix of the above is to make a Virtual machine clone of the remove server, run it on your local box, and share folders via the VM or some local NFS between the two.

You could also tweak sshfs. There are some tuning mount options, and you can also turn off encryption. It gives roughly 2x speedup overall, so don't expect wonders.

Being in the same shoes as the poster, I've looked for solutions for years, but failing to do so, I've unhappily settled with fine-tuned sshfs, coupled with occasional rsyncs, and patience.