From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id qBElA94LuGGlMgAAgWs5BA (envelope-from ) for ; Tue, 14 Dec 2021 04:13:34 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id UNdrOt0LuGF/MwAAB5/wlQ (envelope-from ) for ; Tue, 14 Dec 2021 03:13:33 +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 A19FDFB60 for ; Tue, 14 Dec 2021 04:13:33 +0100 (CET) Received: from localhost ([::1]:44220 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mwyFp-0007Lz-T4 for larch@yhetil.org; Mon, 13 Dec 2021 22:13:25 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44766) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mwnze-0004Nc-Sv for bug-guix@gnu.org; Mon, 13 Dec 2021 11:16:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:45079) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mwnze-0007tr-89 for bug-guix@gnu.org; Mon, 13 Dec 2021 11:16:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mwnze-0006PC-1V for bug-guix@gnu.org; Mon, 13 Dec 2021 11:16:02 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#51787: GC takes more than 9 hours on berlin Resent-From: Christian =?UTF-8?Q?Th=C3=A4ter?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Mon, 13 Dec 2021 16:16:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51787 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 51787@debbugs.gnu.org X-Debbugs-Original-To: bug-guix@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.163941214824597 (code B ref -1); Mon, 13 Dec 2021 16:16:01 +0000 Received: (at submit) by debbugs.gnu.org; 13 Dec 2021 16:15:48 +0000 Received: from localhost ([127.0.0.1]:56625 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mwnzP-0006Of-Oy for submit@debbugs.gnu.org; Mon, 13 Dec 2021 11:15:47 -0500 Received: from lists.gnu.org ([209.51.188.17]:38810) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mwnxR-0006Kr-35 for submit@debbugs.gnu.org; Mon, 13 Dec 2021 11:13:48 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44248) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mwnxQ-0003ZB-Uv for bug-guix@gnu.org; Mon, 13 Dec 2021 11:13:44 -0500 Received: from mail.pipapo.org ([78.47.240.153]:59240) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mwnxO-0007cn-IL for bug-guix@gnu.org; Mon, 13 Dec 2021 11:13:44 -0500 Received: from hermes.pipapo.org (imap.pipapo.org [10.10.40.10]) by mail.pipapo.org (Postfix) with ESMTPS id 2D7945E45F for ; Mon, 13 Dec 2021 16:13:37 +0000 (UTC) Received: from wolke.pipapo.org (wolke.pipapo.org [10.100.20.10]) by hermes.pipapo.org (Postfix) with ESMTPSA id 0FD199E02EAA for ; Mon, 13 Dec 2021 16:13:42 +0000 (UTC) Date: Mon, 13 Dec 2021 17:13:33 +0100 From: Christian =?UTF-8?Q?Th=C3=A4ter?= Message-ID: <20211213171333.04105a3b@wolke.pipapo.org> In-Reply-To: <87o85lhhrd.fsf@gnu.org> References: <87o86pegr3.fsf@gnu.org> <87zgpuhig7.fsf@gnu.org> <87wnkv15k3.fsf@cbaines.net> <87zgpp971n.fsf@gnu.org> <87pmqet419.fsf@gnu.org> <87czm57zao.fsf@gnu.org> <87czm4bvzt.fsf@gnu.org> <877dcccrlq.fsf@gnu.org> <87a6h86s7o.fsf@gnu.org> <87bl1nxyt5.fsf@gnu.org> <87o85lhhrd.fsf@gnu.org> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Received-SPF: none client-ip=78.47.240.153; envelope-from=ct.guix@pipapo.org; helo=mail.pipapo.org X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Mon, 13 Dec 2021 11:15:47 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Mailman-Approved-At: Mon, 13 Dec 2021 22:13:16 -0500 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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1639451613; 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; bh=5WVe7dAILsPfKc2rcQUyFsOzWMJRr7jWubgHOIvLy9k=; b=m+iv1Yo7ay8iOmiGY/r6HOwSugBSdXv+XGQ93MaYEGiAUB5s6ux583tYX7MNBoeO1VUs/Q 445EdBOMLau0/kZYsPDw7vEww/DKuKQhlA7sYoQCjVhLXXfC7gntBCt/xruCS6pYUEmE9N 2rAPdDWZWdjl7VUtDJe7vxva5/AtbLSH+3/LBUegocMRez6tBywm8GauPlhEhX6kXUAhmD Xe/44PXGT1Fr3DR/8mtTEq5tYyYRPwLHxJ7elkNRmFkKtswH60XSQkg0hYj7a8ce2DTX9+ hBU3vvEBLDnGR1GYhaixnaQoiVjtKWpRlCzxRdXfBo4MgxR3xcmBtz07PVKcvg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1639451613; a=rsa-sha256; cv=none; b=USaOLShMIZ4bdjxw3DAcMB5d52p2I3fYTlgavz2fzQUebw2pnnBWhnzBhtYkGmmfxD7FhH rZLtVVaXavgI255kI6oVTqop30XzZyhgtG2G9En3bvbdTkJxsuaD9cgdSeclEdKPGarwVd pj3FESi6rS5h2hhS4hYsf60uivatxYCEdM2XIVkjRUzh0iLDLUNQZcwR5gk9z4MelPa1wC xfNZhLZwc8DzWHySp1D8tPaFO6YeXcxIrdypD3ia9nljkgwepiEmR4LRA3SqA5OrjSdwTk JqubLZr2nqCDvhjX1dQRZajzG0HONZEihN7jg3CunEBYx5HbGATHHMITsW+Ewg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; 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: -3.17 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; 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: A19FDFB60 X-Spam-Score: -3.17 X-Migadu-Scanner: scn1.migadu.com X-TUID: w1TOdfeAfKil On 2021-12-12 18:09, Mathieu Othacehe wrote: >Hey, > >> OK, thanks. Looks it just finished removing the trash directory >> content. I started a GC process from my session to monitor it >> closely. > >Daily GC recap: > >* The GC process I started yesterday, did collect 5.5TiB in > approximately 24 hours, that are now in the /gnu/store/trash > directory. > >* The /gnu/store/trash directory contains 288910 entries. If those >items > are removed at the same rate than on the previous days, it will take > days/months to delete them all. > >* I noticed that the upstream Nix GC process can now operate without > locking. I think it shouldn't be too hard to port it to our fork or > maybe rewrite the process in Guile while we are at it. > > That will not fix the slow hard-drives issues though. While discussing this issue on IRC I came up with some idea: 'rmrfd' a system daemon that deletes huge trees in the background where '-rf' stands for --really --fast :) Actually this is an use case that happens for on my backup system too. With that idea I just started coding and ran some experiments. For me this looks quite feasible now and I will continue next days on this small project. Any feedback or help would be welcomed! The initial ideas and experiments are at https://github.com/cehteh/rmrfd Note that the important part is that it will put some efforts into freeing as much space as possible at begin of the freeing process, Unlike just 'rm -rf' where space may only freed really late when the last link count of the data goes to zero. Cheers Christian