From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 23 09:26:53 2021 Received: (at 49174) by debbugs.gnu.org; 23 Jun 2021 13:26:53 +0000 Received: from localhost ([127.0.0.1]:40603 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lw2u5-0007vG-7a for submit@debbugs.gnu.org; Wed, 23 Jun 2021 09:26:53 -0400 Received: from eggs.gnu.org ([209.51.188.92]:35924) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lw2u3-0007v3-H1 for 49174@debbugs.gnu.org; Wed, 23 Jun 2021 09:26:51 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:37170) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lw2ty-0002oP-6m; Wed, 23 Jun 2021 09:26:46 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=33526 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lw2tx-0004kj-Uq; Wed, 23 Jun 2021 09:26:46 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Maxim Cournoyer Subject: Re: bug#49174: Poor 'guix substitute' performance when receiving Zstd-compressed substitutes References: <87fsx93f99.fsf@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 5 Messidor an 229 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Wed, 23 Jun 2021 15:26:43 +0200 In-Reply-To: <87fsx93f99.fsf@gmail.com> (Maxim Cournoyer's message of "Tue, 22 Jun 2021 14:50:42 -0400") Message-ID: <87eecsyang.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 49174 Cc: 49174@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi, Maxim Cournoyer skribis: > It's something I've been observing for a while, but substitutes are very > IO intensive (as can be seen in iotop, the substitute process is waiting > on IO > 99% of the time) and is much slower than expected (3 minutes to > transfer 100 MiB uncompressed over a 50 mbps downstream link): > > TID PRIO USER DISK READ DISK WRITE SWAPIN IO> COMMAND > 13934 be/4 root 1033.09 K/s 1485.06 K/s 0.00 % 93.36 % guile \ /gnu/= store/vphx2839xv0qj9xwcwrb95592lzrrnx7-guix-1.3.0-3.50dfbbf/bin/guix substi= tute --substitute > > > The publisher (remote machine) is has its guix-daemon configured via: > > (service guix-publish-service-type > (guix-publish-configuration > (advertise? #t) > (compression '(("zstd" 3))) > (host "0.0.0.0"))) ;listen on all interfaces Note that in this case nars are built and compressed on the fly on the server side, which puts an upper bound on the bandwidth you can achieve. I showed earlier how I profiled these things: https://guix.gnu.org/en/blog/2021/getting-bytes-to-disk-more-quickly/ If the client is I/O-bound, that=E2=80=99s good: it means we can=E2=80=99t = do any better (unless we skip unpacking as demonstrated by distri). If you can provide detailed profiles of either the server side or the client side (but in that case, make sure the server is caching things), that=E2=80=99d be great! Otherwise I=E2=80=99m afraid this is not actionable. :-) Thanks, Ludo=E2=80=99.