me
/
guix
Archived
1
0
Fork 0

ssh: Speed up RPCs by using #:nodelay.

Partly fixes <https://bugs.gnu.org/41702>.

* guix/ssh.scm (open-ssh-session): Enable #:nodelay.
* m4/guix.m4 (GUIX_CHECK_GUILE_SSH): Add feature check for this new parameter.
* doc/guix.texi (Requirements): Adjust.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
master
Lars-Dominik Braun 2020-07-20 11:28:51 +02:00 committed by Ludovic Courtès
parent 6c451e16b7
commit e8088f0b06
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
3 changed files with 11 additions and 5 deletions

View File

@ -791,11 +791,11 @@ The following dependencies are optional:
@itemize @itemize
@item @item
@c Note: We need at least 0.12.0 for 'userauth-gssapi!'. @c Note: We need at least 0.13.0 for #:nodelay.
Support for build offloading (@pxref{Daemon Offload Setup}) and Support for build offloading (@pxref{Daemon Offload Setup}) and
@command{guix copy} (@pxref{Invoking guix copy}) depends on @command{guix copy} (@pxref{Invoking guix copy}) depends on
@uref{https://github.com/artyom-poptsov/guile-ssh, Guile-SSH}, @uref{https://github.com/artyom-poptsov/guile-ssh, Guile-SSH},
version 0.12.0 or later. version 0.13.0 or later.
@item @item
When @url{https://www.nongnu.org/lzip/lzlib.html, lzlib} is available, lzlib When @url{https://www.nongnu.org/lzip/lzlib.html, lzlib} is available, lzlib

View File

@ -129,7 +129,11 @@ Throw an error on failure."
;; We need lightweight compression when ;; We need lightweight compression when
;; exchanging full archives. ;; exchanging full archives.
#:compression compression #:compression compression
#:compression-level 3))) #:compression-level 3
;; Speed up RPCs by creating sockets with
;; TCP_NODELAY.
#:nodelay #t)))
;; Honor ~/.ssh/config. ;; Honor ~/.ssh/config.
(session-parse-config! session) (session-parse-config! session)

View File

@ -142,14 +142,16 @@ dnl GUIX_CHECK_GUILE_SSH
dnl dnl
dnl Check whether a recent-enough Guile-SSH is available. dnl Check whether a recent-enough Guile-SSH is available.
AC_DEFUN([GUIX_CHECK_GUILE_SSH], [ 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], AC_CACHE_CHECK([whether Guile-SSH is available and recent enough],
[guix_cv_have_recent_guile_ssh], [guix_cv_have_recent_guile_ssh],
[GUILE_CHECK([retval], [GUILE_CHECK([retval],
[(and (@ (ssh channel) channel-send-eof) [(and (@ (ssh channel) channel-send-eof)
(@ (ssh popen) open-remote-pipe) (@ (ssh popen) open-remote-pipe)
(@ (ssh dist node) node-eval) (@ (ssh dist node) node-eval)
(@ (ssh auth) userauth-gssapi!))]) (@ (ssh auth) userauth-gssapi!)
((@ (ssh session) make-session) #:nodelay #t))])
if test "$retval" = 0; then if test "$retval" = 0; then
guix_cv_have_recent_guile_ssh="yes" guix_cv_have_recent_guile_ssh="yes"
else else