Tramp too slow to be usefull

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Tramp too slow to be usefull

Thierry Leurent
Hello,

I'm trying to use tramp but it's very slow even I work with a local file owned
by root.  
After asking to the "friend" Google, I don't find any solution.

I use emacs 25 on Linux Testing.

You can see my tramp configuration file.
(use-package tramp
  :defer t
  :config
  (progn
    (with-eval-after-load 'tramp-cache
      (setq tramp-persistency-file-name "~/.emacs.d/backup_and_other_stuffs/
tramp$"))
    (setq tramp-default-user-alist '(("\\`su\\(do\\)?\\'" nil "root"))
          ;; use the settings in ~/.ssh/config instead of Tramp's
          tramp-verbose 9
          tramp-default-method "ssh"
          tramp-ssh-controlmaster-options
          (concat "-o ControlPath=/tmp/tramp.%%r@%%h:%%p "
                  "-o ControlMaster=auto "
                  "-o ControlPersist=no")
          tramp-use-ssh-controlmaster-options nil
          backup-enable-predicate
          (lambda (name)
            (and (normal-backup-enable-predicate name)
                 (not (let ((method (file-remote-p name 'method)))
                        (when (stringp method)
                          (member method '("su" "sudo"))))))))

    (use-package tramp-sh
      :config
      (progn
        (add-to-list 'tramp-remote-path "/usr/local/sbin")
        (add-to-list 'tramp-remote-path "/var/www/")
        (add-to-list 'tramp-remote-path "~/bin")))))


Thnaks for your help.

Regards,

-----
Thierry Leurent

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Tramp too slow to be usefull

Michael Albinus
Thierry Leurent <[hidden email]> writes:

> Hello,

Hi Thierry,

> I'm trying to use tramp but it's very slow even I work with a local
> file owned by root.

Quoting from the Tramp manual, "Frequently Asked Questions":

   • How could I speed up TRAMP?

     In the backstage, TRAMP needs a lot of operations on the remote
     host.  The time for transferring data from and to the remote host
     as well as the time needed to perform the operations there count.
     In order to speed up TRAMP, one could either try to avoid some of
     the operations, or one could try to improve their performance.

     Use an external method, like ‘scp’.

     Use caching.  This is already enabled by default.  Information
     about the remote host as well as the remote files are cached for
     reuse.  The information about remote hosts is kept in the file
     specified in ‘tramp-persistency-file-name’.  Keep this file.  If
     you are confident that files on remote hosts are not changed out of
     Emacs’ control, set ‘remote-file-name-inhibit-cache’ to ‘nil’.  Set
     also ‘tramp-completion-reread-directory-timeout’ to ‘nil’, *note
     File name completion::.

     Disable version control.  If you access remote files which are not
     under version control, a lot of check operations can be avoided by
     disabling VC.  This can be achieved by

          (setq vc-ignore-dir-regexp
                (format "\\(%s\\)\\|\\(%s\\)"
                        vc-ignore-dir-regexp
                        tramp-file-name-regexp))

     Disable excessive traces.  The default trace level of TRAMP,
     defined in the variable ‘tramp-verbose’, is 3.  You should increase
     this level only temporarily, hunting bugs.

> Thnaks for your help.
>
> Regards,
>
> -----
> Thierry Leurent

Best regards, Michael.

Loading...