From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id EDQkC+6U2WKyRAEAbAwnHQ (envelope-from ) for ; Thu, 21 Jul 2022 20:03:26 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id AHIoC+6U2WIUtwAA9RJhRA (envelope-from ) for ; Thu, 21 Jul 2022 20:03:26 +0200 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 B013F1173D for ; Thu, 21 Jul 2022 20:03:25 +0200 (CEST) Received: from localhost ([::1]:32982 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oEaWC-0005yY-SK for larch@yhetil.org; Thu, 21 Jul 2022 14:03:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40894) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oEaVq-0005yN-D3 for guix-patches@gnu.org; Thu, 21 Jul 2022 14:03:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:49291) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oEaVq-0005T5-4o for guix-patches@gnu.org; Thu, 21 Jul 2022 14:03:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oEaVp-0004d3-UY for guix-patches@gnu.org; Thu, 21 Jul 2022 14:03:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#51427] [PATCH] nix: libstore: Do not remove unused links when deleting specific items. Resent-From: Liliana Marie Prikler Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 21 Jul 2022 18:03:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51427 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= , Tobias Geerinckx-Rice Cc: 51427@debbugs.gnu.org, maxim.cournoyer@gmail.com, zimon.toutoune@gmail.com Received: via spool by 51427-submit@debbugs.gnu.org id=B51427.165842657317779 (code B ref 51427); Thu, 21 Jul 2022 18:03:01 +0000 Received: (at 51427) by debbugs.gnu.org; 21 Jul 2022 18:02:53 +0000 Received: from localhost ([127.0.0.1]:39040 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oEaVg-0004cg-Kv for submit@debbugs.gnu.org; Thu, 21 Jul 2022 14:02:52 -0400 Received: from mail-ej1-f67.google.com ([209.85.218.67]:45803) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oEaVd-0004cT-I4 for 51427@debbugs.gnu.org; Thu, 21 Jul 2022 14:02:51 -0400 Received: by mail-ej1-f67.google.com with SMTP id fy29so4409051ejc.12 for <51427@debbugs.gnu.org>; Thu, 21 Jul 2022 11:02:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:subject:from:to:cc:date:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=6f2xLilpCIQKj6BENsbs7R8ZpoaGrlcSX2lav9J5Cas=; b=aSCGK1FvNV/zc/7MmLGFJwq+ewGZw9I+AxkJNQPv+s9X4xc874e1lBWODz1LzZk//M m6szATD/NW+SKYB1fxXMkKtPNmoeSNY6dGC0TKEuTSMeXXCsbZLXkwlN0wu4AUftpsGx KgSaYFPUsKf8lLkWnoLIRH+2wnkKDDnk8sFEkUH6wjdw2vNDEmdo4ygNjQhFFjHkwJKY lKCvvOnQuu4ArHm/9ZAQ9i/nvIAXEZl78mkcZu8e6jHJWQjrBbGmjnTph8D7RcYvim4A GcBrKxY/6S4iPPVp6J1saH+EVhq3Vz9EQy2n5C4hwSVDCEdyGCIO08RJx+y+YOfYfgiK 6+7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=6f2xLilpCIQKj6BENsbs7R8ZpoaGrlcSX2lav9J5Cas=; b=kOEcTwqLm5iI9jR0cenFspKU+k0OM7QLQGNYw1Q8a9SXTWC5Q/Dr9OZaGte9MYJpsd uhLixhdVN8ksHQzlRoxCsOwAifV4A1La40R7hThHo+eM2/KhD3t9bc5EsOtwcos0L34s cel1JDfM/kWVdyHK7QwyxUZKz1j6gp+ew8QF4FkfGtiScqjKGu2OkQpE1DNOUR1pMMlL 18QCdMmLKditXCj//HfSdeg2xuIB75TAQmkf2uHCm2zp7peDk5V7mRsE/OlBasVjMn0m N+1NpXzx2fpU9CfXcElynH0ktMykjFUMLeL1fZ9PJ7gITLlnTfg1x5uP7w1w5vVuB2f1 ZKVQ== X-Gm-Message-State: AJIora8I8WtGHwr/9E3CiyTh9L9ipafRwdEA2flHIDIC3BB/xLc6ulVm ZhASl91qauPW0ritMgM38bI= X-Google-Smtp-Source: AGRyM1vYMODW3+DFiYr/NdNJQqnyRwFLYBW0+GCnrvvV0uE7NctSHv91XDbOSGgeut/wyqAUo/mRmQ== X-Received: by 2002:a17:907:2dab:b0:72f:f7:bdd6 with SMTP id gt43-20020a1709072dab00b0072f00f7bdd6mr30834465ejc.330.1658426562574; Thu, 21 Jul 2022 11:02:42 -0700 (PDT) Received: from nijino.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id c6-20020a056402100600b00435651c4a01sm1365336edu.56.2022.07.21.11.02.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Jul 2022 11:02:42 -0700 (PDT) Message-ID: <12c768df412e23b4d69e87631cd805f741c38ce3.camel@gmail.com> From: Liliana Marie Prikler Date: Thu, 21 Jul 2022 20:02:41 +0200 In-Reply-To: <877d46n7n5.fsf_-_@gnu.org> References: <20211027034918.4591-1-maxim.cournoyer@gmail.com> <87o8795j61.fsf@gnu.org> <5c2dd60acfaa7d74b7554babb3e223bc855bac8a.camel@gmail.com> <87h7cxp9tl.fsf@gnu.org> <87sfwg7w9z.fsf@gmail.com> <87ee7tmdbd.fsf@gnu.org> <86k0hhnqss.fsf@gmail.com> <871r3f2j7y.fsf@gnu.org> <867dd7roi2.fsf@gmail.com> <87o7xmy14l.fsf_-_@gnu.org> <2441c768fea8faee800947a17aef896c35173845.camel@gmail.com> <87sfmxv6ue.fsf@gnu.org> <8538dc9925eb499ea2b728e349d98296eedeb14d.camel@gmail.com> <877d48lx41@nckx> <877d46n7n5.fsf_-_@gnu.org> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1658426605; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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=6f2xLilpCIQKj6BENsbs7R8ZpoaGrlcSX2lav9J5Cas=; b=F9pghGpLhLkeHzGD/p9YW0eb6AG/cogxoulHix9PbDDEvxUKAi3FlUO1bypLyDYmgbeCwP gjWWG/JhvDhK1gVvvkqs6tThzbwVaQVJ6ODYYDUbESWsJa63mZR4irc5usIE74W0xn08Zq HMYDYoJjaUFhel0Cd2bmO8z3qdPqiUew6pzdDgi/fY08QZjbTPGVqoWh5td7AHWKTQkdyH MFlQWPl00QWnFODqbHzLJjVyFetGyzPo1rZgq7FENh0Xqqz8sccH8t7XSUCGr6vg0LV+kH EVPBlFkDK5maa7TpQqtAN/IbRHDZZdGqdN1z36hd/66X5QX00cJDYz7vSWMxqQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1658426605; a=rsa-sha256; cv=none; b=jd7ypg2Og0qmJ+ggFK7ybgmHOhmMeIII6foWCbD35FJyV3dnttfSQCLXPvC5gYLQRoem3a p8EE7F5TUI0vaR5rj9vikoxM5N85C2TOd9OPOOdQqUhFoRnAJMKGdly5hykUhjJuIDjlpk qYiLfkvYin/LU22KhIYfkT3U1bg9drTG60z0w1iKLNaoL2+D0GuoVuTAEKHNHd1Wam7SVG B8n6TSppVrIizsutpsKuwnk8thJw9UjMW/7WXzi2uTTru/Z8IcqM/UqPViHlbC3/S+1vC3 VIvPoJ7d7mBfZTudNluF3t26HTGMeWspaiR6P+y6C5F9rIk/xa7O9KpmzGpojw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=aSCGK1Fv; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 7.56 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=aSCGK1Fv; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: B013F1173D X-Spam-Score: 7.56 X-Migadu-Scanner: scn1.migadu.com X-TUID: JaFbF4BVnFRg Am Donnerstag, dem 21.07.2022 um 11:21 +0200 schrieb Ludovic Courtès: > Hi, > > Tobias Geerinckx-Rice skribis: > > > Liliana Marie Prikler 写道: > > > scheme@(guile-user)> ,t (length (scandir "/gnu/store/.links")) > > > $1 = 213027 > > > ;; 1417.872747s real time, 28.514293s run time.  1.284866s spent > > > in > > > GC. > > > > […] > > > > > So yeah, assuming that scandir scales linearly > > > > …your rotational drive is beyond ridiculously slower than mine (an > > ST1000DM010-2EP102): > > > > athena.tobias.gr:~ λ echo 3 | sudo tee /proc/sys/vm/drop_caches 3 > > athena.tobias.gr:~ λ guix repl > > […] > > scheme@(guix-user)> ,use (ice-9 ftw) > > scheme@(guix-user)> ,t (length (scandir "/gnu/store/.links")) > > $1 = 164437 > > ;; 7.081361s real time, 2.569773s run time.  0.199963s spent in    > > GC. > > It’s crazy that there are two orders of magnitude of difference > between these two hard disks. > > Liliana, is your hard disk old or low-end? I'm not too sure about age, but it's probably low-end in terms of speed. There's room for 2TB data after all. > I agree that we should strive to have good performance on that kind > of hardware too, but I don’t know how to get there. I don't think deleting links will ever be fast on that disk. But what I've been saying the whole time is that I don't always need the links deleted. I think adding "expert" switches to skip these phases might actually be enough – after all, if I ever do want to run a full GC, the information ought to be the same, no?