From: Lars-Dominik Braun <ldb@leibniz-psychology.org>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 41702@debbugs.gnu.org
Subject: bug#41702: `guix environment` performance issues
Date: Thu, 2 Jul 2020 14:03:33 +0200 [thread overview]
Message-ID: <20200702120333.GB4532@zpidnp36> (raw)
In-Reply-To: <20200702070000.GA4532@zpidnp36>
[-- Attachment #1.1: Type: text/plain, Size: 137 bytes --]
Hi (again),
and the attached patch uses the new nodelay option, if we don’t want to wait
for another guile-ssh release.
Lars
[-- Attachment #1.2: 0001-guix-Add-nodelay-to-SSH-store-connection.patch --]
[-- Type: text/x-diff, Size: 6383 bytes --]
From 2892f79f819dd2dd9420f7e74bcb6e293d377452 Mon Sep 17 00:00:00 2001
From: Lars-Dominik Braun <ldb@leibniz-psychology.org>
Date: Thu, 2 Jul 2020 13:59:51 +0200
Subject: [PATCH] guix: Add nodelay to SSH store connection
* gnu/packages/ssh.scm (guile-ssh)[patches]: Add patch.
* gnu/packages/patches/guile-ssh-0.12.0-nodelay.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
* guix/ssh.scm (open-ssh-session): Use new nodelay option.
---
gnu/local.mk | 1 +
.../patches/guile-ssh-0.12.0-nodelay.patch | 81 +++++++++++++++++++
gnu/packages/ssh.scm | 1 +
guix/ssh.scm | 4 +-
4 files changed, 86 insertions(+), 1 deletion(-)
create mode 100644 gnu/packages/patches/guile-ssh-0.12.0-nodelay.patch
diff --git a/gnu/local.mk b/gnu/local.mk
index 8bb56010c2..26725cbca1 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1068,6 +1068,7 @@ dist_patch_DATA = \
%D%/packages/patches/guile-present-coding.patch \
%D%/packages/patches/guile-rsvg-pkgconfig.patch \
%D%/packages/patches/guile-emacs-fix-configure.patch \
+ %D%/packages/patches/guile-ssh-0.12.0-nodelay.patch \
%D%/packages/patches/gtk2-respect-GUIX_GTK2_PATH.patch \
%D%/packages/patches/gtk2-respect-GUIX_GTK2_IM_MODULE_FILE.patch \
%D%/packages/patches/gtk2-theme-paths.patch \
diff --git a/gnu/packages/patches/guile-ssh-0.12.0-nodelay.patch b/gnu/packages/patches/guile-ssh-0.12.0-nodelay.patch
new file mode 100644
index 0000000000..bc649b7469
--- /dev/null
+++ b/gnu/packages/patches/guile-ssh-0.12.0-nodelay.patch
@@ -0,0 +1,81 @@
+commit f697c603ef196eb88c1d7d629e456bf5054e35a4
+Author: Lars-Dominik Braun <ldb@leibniz-psychology.org>
+Date: Thu Jul 2 13:26:21 2020 +0200
+
+ modules/ssh/session.scm: Add nodelay to make-session
+
+ * modules/ssh/session.scm (make-session): Add key nodelay
+
+diff --git a/modules/ssh/session.scm b/modules/ssh/session.scm
+index d7c0831..042bd5f 100644
+--- a/modules/ssh/session.scm
++++ b/modules/ssh/session.scm
+@@ -74,7 +74,7 @@
+ knownhosts timeout timeout-usec ssh1 ssh2 log-verbosity
+ ciphers-c-s ciphers-s-c compression-c-s compression-s-c
+ proxycommand stricthostkeycheck compression
+- compression-level callbacks config)
++ compression-level nodelay callbacks config)
+ "Make a new SSH session with specified configuration.\n
+ Return a new SSH session."
+ (let ((session (%make-session)))
+@@ -98,6 +98,7 @@ Return a new SSH session."
+ (session-set-if-specified! stricthostkeycheck)
+ (session-set-if-specified! compression)
+ (session-set-if-specified! compression-level)
++ (session-set-if-specified! nodelay)
+ (session-set-if-specified! callbacks)
+
+ (when config
+
+commit b80121ae3e851a676f25fd2b7e33371b94a6e030
+Author: Lars-Dominik Braun <ldb@leibniz-psychology.org>
+Date: Thu Jul 2 08:52:13 2020 +0200
+
+ libguile-ssh/session-func.c: Add NODELAY option
+
+ * libguile-ssh/session-func.c (session_options, set_option): Add libssh’s
+ nodelay option.
+ * tests/session.scm ("session-set!, valid values", "session-set!, invalid
+ values"): Add unit-tests.
+
+diff --git a/libguile-ssh/session-func.c b/libguile-ssh/session-func.c
+index 48db779..9240734 100644
+--- a/libguile-ssh/session-func.c
++++ b/libguile-ssh/session-func.c
+@@ -71,6 +71,7 @@ static struct symbol_mapping session_options[] = {
+ { "stricthostkeycheck", SSH_OPTIONS_STRICTHOSTKEYCHECK },
+ { "compression", SSH_OPTIONS_COMPRESSION },
+ { "compression-level", SSH_OPTIONS_COMPRESSION_LEVEL },
++ { "nodelay", SSH_OPTIONS_NODELAY },
+ { "callbacks", GSSH_OPTIONS_CALLBACKS },
+ { NULL, -1 }
+ };
+@@ -366,6 +367,7 @@ set_option (SCM scm_session, struct session_data* sd, int type, SCM value)
+ case SSH_OPTIONS_SSH1:
+ case SSH_OPTIONS_SSH2:
+ case SSH_OPTIONS_STRICTHOSTKEYCHECK:
++ case SSH_OPTIONS_NODELAY:
+ return set_bool_opt (session, type, value);
+
+ case SSH_OPTIONS_FD:
+diff --git a/tests/session.scm b/tests/session.scm
+index 2eb1df7..83a864d 100644
+--- a/tests/session.scm
++++ b/tests/session.scm
+@@ -70,6 +70,7 @@
+ nolog)
+ (compression "yes" "no")
+ (compression-level 1 2 3 4 5 6 7 8 9)
++ (nodelay #f #t)
+ (callbacks ((user-data . "hello")
+ (global-request-callback . ,(const #f))))))
+ (res #t))
+@@ -95,6 +96,7 @@
+ (log-verbosity "string" -1 0 1 2 3 4 5)
+ (compression 12345)
+ (compression-level -1 0 10)
++ (nodelay 12345 "string")
+ (callbacks "not a list"
+ ((global-request-callback . #f)))))
+ (res #t))
diff --git a/gnu/packages/ssh.scm b/gnu/packages/ssh.scm
index ea42e72de2..0d9fa5fd54 100644
--- a/gnu/packages/ssh.scm
+++ b/gnu/packages/ssh.scm
@@ -259,6 +259,7 @@ Additionally, various channel-specific options can be negotiated.")
(sha256
(base32
"054hd9rzfhb48gc1hw3rphhp0cnnd4bs5qmidy5ygsyvy9ravlad"))
+ (patches (search-patches "guile-ssh-0.12.0-nodelay.patch"))
(modules '((guix build utils)))))
(build-system gnu-build-system)
(outputs '("out" "debug"))
diff --git a/guix/ssh.scm b/guix/ssh.scm
index 2d7ca7d01d..df7a9bed4a 100644
--- a/guix/ssh.scm
+++ b/guix/ssh.scm
@@ -129,7 +129,9 @@ Throw an error on failure."
;; We need lightweight compression when
;; exchanging full archives.
#:compression compression
- #:compression-level 3)))
+ #:compression-level 3
+
+ #:nodelay #t)))
;; Honor ~/.ssh/config.
(session-parse-config! session)
--
2.20.1
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
next prev parent reply other threads:[~2020-07-02 12:04 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-04 8:23 bug#41702: `guix environment` performance issues Lars-Dominik Braun
2020-06-06 16:08 ` Ludovic Courtès
2020-06-06 21:40 ` Ludovic Courtès
2020-06-08 9:04 ` Lars-Dominik Braun
2020-06-08 21:59 ` Ludovic Courtès
2020-06-09 9:15 ` Lars-Dominik Braun
2020-06-27 21:20 ` Ludovic Courtès
2020-06-30 9:59 ` Lars-Dominik Braun
2020-07-01 10:49 ` Ludovic Courtès
2020-07-01 11:24 ` Lars-Dominik Braun
2020-07-01 21:53 ` Ludovic Courtès
2020-07-02 7:00 ` Lars-Dominik Braun
2020-07-02 12:03 ` Lars-Dominik Braun [this message]
2020-07-06 8:49 ` Ludovic Courtès
2020-07-06 12:58 ` Lars-Dominik Braun
2020-07-20 9:50 ` Lars-Dominik Braun
2020-07-20 21:51 ` Ludovic Courtès
2020-10-22 21:03 ` Maxim Cournoyer
2020-10-23 7:26 ` Lars-Dominik Braun
2020-10-23 13:07 ` bug#44175: [optimization] Grafting is too slow Maxim Cournoyer
2020-10-23 21:17 ` Ludovic Courtès
2020-10-25 2:33 ` Maxim Cournoyer
2020-10-25 16:43 ` Ludovic Courtès
2020-10-26 7:56 ` Lars-Dominik Braun
2020-10-23 14:51 ` bug#41702: `guix environment` performance issues Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200702120333.GB4532@zpidnp36 \
--to=ldb@leibniz-psychology.org \
--cc=41702@debbugs.gnu.org \
--cc=ludo@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.