tramp-devel
[Top][All Lists]
Advanced

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

Re: performance on opening file


From: Michael Albinus
Subject: Re: performance on opening file
Date: Sun, 10 Mar 2019 22:57:00 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Alex Koval <address@hidden> writes:

> Hello Michael & all:

Hi Alex,

> But I think there is still a plenty we can do to improve
> its generic performance.

I agree, of course.

> Exactly, I would like to understand what is going after this tramp
> message:
>
> Tramp: Inserting
> ‘/ssh:address@hidden|sudo:address@hidden:/ansible/provision/playbooks/dev-dumps.yml’...
>
> It sometimes gets blocked in this state for 30 seconds or even minute
> or two. Whats going on there? Other things work more/less reasonable
> fast. I tried to enable 'full trace' but it gets nothing useful as
> all I see is thousands of calls like:
>
> 09:18:49.758202 tramp-get-connection-property (7) # copy-program undef
> 09:18:49.758530 tramp-get-connection-property (7) # login-program undef
> 09:18:49.758582 tramp-get-connection-property (7) # copy-program undef
> 09:18:49.758859 tramp-get-connection-property (7) # login-program undef
> 09:18:49.758911 tramp-get-connection-property (7) # copy-program undef
> 09:18:49.759180 tramp-get-connection-property (7) # login-program undef

This sounds strange, it shouldn't happen this way.

> Idea 1: can we duplicate 'markers' from "Mesages" buffer to tramp
> debug buffer? Because currently those 2  screens are independent, 
> and so it is difficult to relate one event with another.

All messages in the *Messages* bufer are also in Tramp's debug
buffer. The *Messages* buffer contains only messages up to trace-level
3, so you find them in the debug buffer. The mentioned message
"Inserting '...'" is level 3, so you'l find it when searching for "(3)"
(w/o the apostrophes).

(outline-hide-sublevel is said to restrict an outline buffer to a given
level, but this doesn't seem to work. Will check)

> Tramp is so slow here that my fellow DevOps which don't use Emacs are
> actually faster with this sequence: Copy file to buffer, go to remote
> host in console, cat > filename, paste from buffer - this way they can
> do it in less then 30 seconds, while emacs could be still hanging in
> opening/reading or saving the remote file.
>
> - Specifically it hangs on first file open. Next files go faster.
> - The connection to remote host is already open, e.g. I am in 'dired'
>   in the directory.
>
> Any advice here?
>
> P.S. I've counted again today - first file open was 45 seconds, all
> consequent opens of files near - ~6 seconds. File sizes are similar.

Well, the first file access function must perform hand-shaking to the
remote machine, this takes time. But your timings look like something is
going wrong, and Tramp runs into timeouts, before it is functioning.

Thta you have connected already via dired might not help too much. For
security reasons, "sudo" sessions expire after a while (300 seconds per
default). See (info "(tramp) Predefined connection information") for a
discussion.

Pls set tramp-debug to 10 prior accessing the remote machine, and send
the *whole* trace. Maybe we'll see something. Don't worry if this buffer
is very long, I'm used to analyze such traces.

> WBR, Alex

Best regards, Michael.



reply via email to

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