From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id oGpBBEG4k2F3ZAAAgWs5BA (envelope-from ) for ; Tue, 16 Nov 2021 14:55:13 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id cIiUO0C4k2GkHQAAB5/wlQ (envelope-from ) for ; Tue, 16 Nov 2021 13:55:12 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 8F92B26DC0 for ; Tue, 16 Nov 2021 14:55:12 +0100 (CET) Received: from localhost ([::1]:54830 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mmyvW-0001En-Ju for larch@yhetil.org; Tue, 16 Nov 2021 08:55:10 -0500 Received: from eggs.gnu.org ([209.51.188.92]:42472) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mmyvO-0001EL-0Q for bug-guix@gnu.org; Tue, 16 Nov 2021 08:55:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:46010) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mmyvN-00072P-OF for bug-guix@gnu.org; Tue, 16 Nov 2021 08:55:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mmyvN-0007FZ-Jo for bug-guix@gnu.org; Tue, 16 Nov 2021 08:55:01 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#24937: "deleting unused links" GC phase is too slow Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Tue, 16 Nov 2021 13:55:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24937 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 24937@debbugs.gnu.org Received: via spool by 24937-submit@debbugs.gnu.org id=B24937.163707086427767 (code B ref 24937); Tue, 16 Nov 2021 13:55:01 +0000 Received: (at 24937) by debbugs.gnu.org; 16 Nov 2021 13:54:24 +0000 Received: from localhost ([127.0.0.1]:57556 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmyul-0007Dh-M1 for submit@debbugs.gnu.org; Tue, 16 Nov 2021 08:54:24 -0500 Received: from eggs.gnu.org ([209.51.188.92]:41576) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmyuj-0007DG-Ot for 24937@debbugs.gnu.org; Tue, 16 Nov 2021 08:54:22 -0500 Received: from [2001:470:142:3::e] (port=47430 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mmyue-0006yg-Fx for 24937@debbugs.gnu.org; Tue, 16 Nov 2021 08:54:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=rVquBRw2cCTTy+pnADwfs0DRheds1f144iMWY+3qSSU=; b=LLcTqmL+L4y5O1C5SxJA u5Z99NCo4i1Ux3jdCUOIpsXDSqyOsBQfX2s5qORk8R+K+XH+bgV9k+Ob7NXxQiy0I8a99YTAbFLdC vrhv12iTbH2fS9Xvs8n6sqTBr/LYZTYFbFi4Zxw2Pb63Mq61uGxFwRRdyBKD/7N6tZ2TSLteBcRRW +4ETgFtKmwgK65g3NnnrFmeG/8zitZAyrkNYhBrA8/x0gLqSWJoj5R0fXVLDVEU53eBKu7daMtW1d 5iwS4LsYE7y4W8wzxJrWgl5U7N7SpylwrcA7tqOn4IWhTmHGEgvMpTxFbGLu0AD3F9wIgsf8pXwKJ 6WspnciYHBnXwg==; Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=46194 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mmyue-0002fd-8K for 24937@debbugs.gnu.org; Tue, 16 Nov 2021 08:54:16 -0500 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87v90wat9n.fsf@gnu.org> <20211113213745.2601-1-ludo@gnu.org> <20211113213745.2601-2-ludo@gnu.org> Date: Tue, 16 Nov 2021 14:54:13 +0100 In-Reply-To: <20211113213745.2601-2-ludo@gnu.org> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Sat, 13 Nov 2021 22:37:45 +0100") Message-ID: <87h7cc2ol6.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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1637070912; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=rVquBRw2cCTTy+pnADwfs0DRheds1f144iMWY+3qSSU=; b=mTv+ZCcKa1gab613CPlofzCGF5ne+TZjA53VGQo3h/vYFG1+ne84Uq0KIQbixg/mYFtt3l Ps8i5guL0nQ6S8yLLwzgpCgeQdg7+y6pK/j/nSpzSo2AAxOPYnjeXlwyqWzzpfAcYaUvG2 PcshWgxgzXwadT9Un30qAR9xJZ/HfHVFsVdL8PY0NXCHmfF1OE+xaikX80JSXEpolX84bs BHPMWojtIOqIRsYew528qgEMNGQP+i1v7GTBVgeHeuc2W0rcJaNoievLNHHdJBex9MgfkU Z97r+04dYIT6fj06wVN8FS7CC/fIig8OqXbyWrUE4vZG2oo4I2HSTOj+GBgG7Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1637070912; a=rsa-sha256; cv=none; b=Melvml7sao6JiiaC1bu6UboYIjv3mwfBLmugIsU5iMuzIPMD/m4vhaNEWwyVZRvG1NakWH G9HUltNigHSBMRFcrxYUKNIj78I/XtnxksGot/yIr5f8Julpw904LzMvpyY6CAao8i1k/e fH9ARIVwKJxGqj/VmPEVfWR/sV3MK934SfbKuWjPnzuhtxmNcdJhZukSoCWFS1KrgTZDC5 yYGPdVyLq9ackTF4WaWp776vKAeVNsOVIIo8JTtjtaNaHtOOn05puDphN4by9T2GmkYjES rEnlXE+Wr0vBRCHbFj0vnsI6nBjz/ea/BlMIxec6YE56+gVIy1xft9eAVpfm0A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=LLcTqmL+; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -2.05 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=LLcTqmL+; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 8F92B26DC0 X-Spam-Score: -2.05 X-Migadu-Scanner: scn0.migadu.com X-TUID: mnRnlFadIw/9 Hi, Ludovic Court=C3=A8s skribis: > Files smaller than 4 KiB typically represent ~60% of the entries in > /gnu/store/.links but only contribute to ~2.5% of the space savings > afforded by deduplication. > > Not considering these files for deduplication speeds up file insertion > in the store and, more importantly, leaves 'removeUnusedLinks' with > fewer entries to traverse, thereby speeding it up proportionally. > > Partly fixes . Pushed a variant of this as commit 472a0e82a52a3d5d841e1dfad6b13e26082a5750, with a threshold of 8=C2=A0KiB. Concretely, the number of .links entries shrinks by ~70%, from 2M to 700K on my laptop, and (presumably) from 64M to 19M on berlin. I=E2=80=99ll deploy it within a few days on berlin. I hope the speedup will reduce pressure there, though obviously it=E2=80=99ll still be an expensive operation (but fundamentally I think it=E2=80=99ll always be linear in the = size of the store.) I=E2=80=99m preparing an update of the =E2=80=98guix=E2=80=99 package to ma= ke this readily available. When you deploy the new daemon, .links will be trimmed of entries for files smaller than 8=C2=A0KiB the first time you run =E2=80=98g= uix gc=E2=80=99. Ludo=E2=80=99.