guix-commits
[Top][All Lists]
Advanced

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

02/02: publish: Increase TCP buffer size when sending non-cached nars.


From: guix-commits
Subject: 02/02: publish: Increase TCP buffer size when sending non-cached nars.
Date: Tue, 10 Nov 2020 18:07:00 -0500 (EST)

civodul pushed a commit to branch version-1.2.0
in repository guix.

commit 1cbda46d4aae5ba9bd89a1837f0d81a29653ed7b
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Tue Nov 10 22:56:38 2020 +0100

    publish: Increase TCP buffer size when sending non-cached nars.
    
    This increases throughput tenfold (!) on localhost when downloading
    large nars without '--cache'.  This is a followup to
    5e3d169945935b53325e6b738a307ba286751259.
    
    Reported by Maxim Cournoyer.
    
    * guix/scripts/publish.scm (http-write): In the
    'application/x-nix-archive' case, add call to 'setsockopt'.
---
 guix/scripts/publish.scm | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/guix/scripts/publish.scm b/guix/scripts/publish.scm
index e3c8711..a976a9a 100644
--- a/guix/scripts/publish.scm
+++ b/guix/scripts/publish.scm
@@ -891,6 +891,8 @@ blocking."
                                             client))
                (port        (begin
                               (force-output client)
+                              (setsockopt client SOL_SOCKET
+                                          SO_SNDBUF (* 128 1024))
                               (nar-response-port response compression))))
           ;; XXX: Given our ugly workaround for <http://bugs.gnu.org/21093> in
           ;; 'render-nar', BODY here is just the file name of the store item.



reply via email to

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