From 1cbda46d4aae5ba9bd89a1837f0d81a29653ed7b Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Tue, 10 Nov 2020 22:56:38 +0100 Subject: 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 e3c8711f5b..a976a9ac60 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 in ;; 'render-nar', BODY here is just the file name of the store item. -- cgit 1.4.1