tramp-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to troubleshoot a slow connection?


From: Rodrigo Amestica
Subject: Re: how to troubleshoot a slow connection?
Date: Wed, 25 Sep 2013 19:27:15 -0400
User-agent: SEMI/1.14.7 (Harue) FLIM/1.14.9 (Goj┼Ź) APEL/10.8 Emacs/24.3 (x86_64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO)

Hello Michael,

I have enabled verbose 6 and repeated the exercise. This time it took something
like 25 seconds to complete the connection. I repeated once more (started emacs
again) just to be sure that .emacs.d/tramp was present.

The time it takes to print my remote bash login salutation is comparable to what
it takes me to ssh from a normal xterm (~4 seconds). That makes sense.

Then there is this line:

19:13:00.899977 tramp-send-command (6) # echo \"$PATH\" 2>/dev/null; echo 
tramp_exit_status $?

followed by a printout of my local PATH. After that it goes doing a 'test -d' on
every entry of that PATH (22 entries in my case) plus other 12 path directories
that are not really in my local PATH. The total time expenditure of that
exercise was ~8 seconds.

Why is it checking on the remote host my local PATH? Can I disable that?

8 seconds is just a fraction of the total 25 seconds, but it seems to be a good
starting point.

Thanks,
 Rodrigo

At Fri, 20 Sep 2013 09:01:12 +0200,
Michael Albinus wrote:
> 
> Rodrigo Amestica <address@hidden> writes:
> 
> > Hello,
> 
> Hi Rodrigo,
> 
> > for some time now the connection to my remote development environment
> > has degraded to a very slow status. I use ssh. I'm not fully sure, but
> > it seems to me that the slowness started happening after moving from
> > emacs 24.2 to 24.3 and that happened back in April of this year.
> >
> > Is it there anything else I could do to troubleshoot my so slow connection?
> 
> Before opening a new connection, you should set tramp-verbose to 6. If
> you are curious you could use even a larger value up to 10, but the
> additional traces are almost interesting for the maintainers only.
> 
> There will be a Tramp debug buffer. Cycle through this buffer, searching
> for "(6)". Then you will see all commands Tramp has sent (except
> passwords), and all responses from the remote host, including a
> timestamp. Here you will see where Tramp spends its time.
> 
> You might compare this also with the same scenario in Emacs 24.2.
> 
> There is also a difference, whether Tramp connects a remote host for the
> very first time, or whether it did in the past already. Tramp caches
> information about remote hosts, and reuses them in order to minimize
> remote commands. See the file "~/.emacs.d/tramp" for the cached
> information. If you remove this file prior starting Emacs, Tramp has no
> historical information.
> 
> For a proper interpretation of the command sequence in the traces, you
> could come back here. And yes, there is still room for optimization; I'm
> open for proposals.
> 
> > Thanks,
> >  Rodrigo
> 
> Best regards, Michael.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]