From 6a18c9a4533075d1ee9795777a998fde3e64030f Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Mon, 20 Jul 2020 11:28:51 +0200 Subject: [PATCH 2/2] guix: Speed up RPC via SSH connections. See issue #41702 * guix/ssh.scm (open-ssh-session): Enable #:nodelay. * m4/guix.m4 (GUIX_CHECK_GUILE_SSH): Add feature check for this new parameter. --- guix/ssh.scm | 5 ++++- m4/guix.m4 | 6 ++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/guix/ssh.scm b/guix/ssh.scm index 2d7ca7d01d..3bffb0b525 100644 --- a/guix/ssh.scm +++ b/guix/ssh.scm @@ -129,7 +129,10 @@ Throw an error on failure." ;; We need lightweight compression when ;; exchanging full archives. #:compression compression - #:compression-level 3))) + #:compression-level 3 + + ;; Speed up RPC. + #:nodelay #t))) ;; Honor ~/.ssh/config. (session-parse-config! session) diff --git a/m4/guix.m4 b/m4/guix.m4 index 7c27ae74df..cce03045db 100644 --- a/m4/guix.m4 +++ b/m4/guix.m4 @@ -142,14 +142,16 @@ dnl GUIX_CHECK_GUILE_SSH dnl dnl Check whether a recent-enough Guile-SSH is available. AC_DEFUN([GUIX_CHECK_GUILE_SSH], [ - dnl Check whether 'userauth-gssapi!' (introduced in 0.12.0) is present. + dnl Check whether '#:nodelay' paramater to 'make-session' (introduced in + dnl 0.13.0) is present. AC_CACHE_CHECK([whether Guile-SSH is available and recent enough], [guix_cv_have_recent_guile_ssh], [GUILE_CHECK([retval], [(and (@ (ssh channel) channel-send-eof) (@ (ssh popen) open-remote-pipe) (@ (ssh dist node) node-eval) - (@ (ssh auth) userauth-gssapi!))]) + (@ (ssh auth) userauth-gssapi!) + ((@ (ssh session) make-session) #:nodelay #t))]) if test "$retval" = 0; then guix_cv_have_recent_guile_ssh="yes" else -- 2.20.1