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

How can I make Emacs TRAMP mode faster?

I have ControlMaster auto in my SSH config, and it is working:

$ time ssh -v debel echo foo
OpenSSH_5.6p1, OpenSSL 0.9.8r 8 Feb 2011
debug1: Reading configuration data /Users/jmdeldin/.ssh/config
debug1: Applying options for *
debug1: Applying options for debel
debug1: Reading configuration data /etc/ssh_config
debug1: Applying options for *
debug1: auto-mux: Trying existing master
debug1: mux_client_request_session: master session id: 9
debug1: mux_client_request_session: master session id: 9

real    0m0.014s
user    0m0.008s
sys     0m0.003s

But TRAMP is painfully slow (~3 s file saves), as can be seen in this screencast. M-x shell works fine, but saving is the real slow down. This isn't the best TRAMP can do, right?


  • GNU Emacs 24.1.1 (2012-06-01 build)
  • I am running a vanilla Emacs instance (I eval'd a color theme in the video, but that's it).
  • The VM is running on my machine.
  • I am connecting with TRAMP via /rsync:user@host:file, but I have tried ssh, scp, and even rsh, and all of them are laggy.
share|improve this question
Are you on a Mac? IIUC there are some problems with subprocess on Emacs for OS X. This makes flyspell very painful for example. – Ivan Andrus Jun 6 '12 at 20:22
@IvanAndrus Yep, and flyspell is indeed painful. Do you know if there are any ways to speed this up? Emacs 22.1.1 (default OS X) is actually pretty fast at TRAMP, but 23.4 and 24.1 are really slow. – jmdeldin Jun 7 '12 at 17:55
up vote 1 down vote accepted

The subprocess handling is rumored to be problematic especially on OS X. Unfortunately, it seems to not be known what exactly the problem is. There are several open bugs relating to it. One suggests changing a timeout helps, and another that setting process-connection-type to nil helps. Please read them for details about where and how these are supposed to be applied in order to help.

You can also try the "Mac Port" which IIRC is supposed to have better process handling, and in general be very nice.

share|improve this answer
Thank you! That port is much, much faster for TRAMP and flyspell. I compiled it with Homebrew, and it works out of the box. – jmdeldin Jun 15 '12 at 0:40

You must log in to answer this question.

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