GNU bug report logs - #23979
[ER] guix gc should tell how much space it recovered

Previous Next

Package: guix;

Reported by: Vincent Legoll <vincent.legoll <at> gmail.com>

Date: Thu, 14 Jul 2016 10:55:02 UTC

Severity: normal

Done: Vincent Legoll <vincent.legoll <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 23979 in the body.
You can then email your comments to 23979 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#23979; Package guix. (Thu, 14 Jul 2016 10:55:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Vincent Legoll <vincent.legoll <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Thu, 14 Jul 2016 10:55:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Vincent Legoll <vincent.legoll <at> gmail.com>
To: bug-guix <at> gnu.org
Subject: [ER] guix gc should tell how much space it recovered
Date: Thu, 14 Jul 2016 12:54:18 +0200
It already shows:
note: currently hard linking saves 485.41 MiB

Recovered disk space would nicely complement that.

I could be mentored to do it myself, but I'm very new to guile & guix
;-)

I'd at least require high level directions as to where I should look (in
the code) to graft that functionality.

-- 
Vincent Legoll




Information forwarded to bug-guix <at> gnu.org:
bug#23979; Package guix. (Thu, 14 Jul 2016 11:31:02 GMT) Full text and rfc822 format available.

Message #8 received at 23979 <at> debbugs.gnu.org (full text, mbox):

From: Vincent Legoll <vincent.legoll <at> gmail.com>
To: 23979 <at> debbugs.gnu.org
Subject: Re: bug#23979: [ER] guix gc should tell how much space it recovered
Date: Thu, 14 Jul 2016 13:30:24 +0200
Looks like I helped myself out of step 1:
this is in guix/scripts/gc.scm if I'm not mistaken

-- 
Vincent Legoll




Information forwarded to bug-guix <at> gnu.org:
bug#23979; Package guix. (Fri, 15 Jul 2016 14:34:01 GMT) Full text and rfc822 format available.

Message #11 received at 23979 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Vincent Legoll <vincent.legoll <at> gmail.com>
Cc: 23979 <at> debbugs.gnu.org
Subject: Re: bug#23979: [ER] guix gc should tell how much space it recovered
Date: Fri, 15 Jul 2016 16:33:46 +0200
Vincent Legoll <vincent.legoll <at> gmail.com> skribis:

> It already shows:
> note: currently hard linking saves 485.41 MiB
>
> Recovered disk space would nicely complement that.

Indeed.

> Looks like I helped myself out of step 1:
> this is in guix/scripts/gc.scm if I'm not mistaken

Yep, you’re on the right track!

This code calls the ‘collect-garbage’ procedure, defined in (guix
store).  You’ll see that this procedure returns two values, which are
currently ignored: the name of the items that were removed from the
store, and the number of bytes freed.

Your mission, if you accept it, is to change gc.scm to retrieve this
second value and to display it in a human-friendly way.  :-)

HTH!

Ludo’.




Information forwarded to bug-guix <at> gnu.org:
bug#23979; Package guix. (Fri, 15 Jul 2016 15:13:01 GMT) Full text and rfc822 format available.

Message #14 received at 23979 <at> debbugs.gnu.org (full text, mbox):

From: Andreas Enge <andreas <at> enge.fr>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: Vincent Legoll <vincent.legoll <at> gmail.com>, 23979 <at> debbugs.gnu.org
Subject: Re: bug#23979: [ER] guix gc should tell how much space it recovered
Date: Fri, 15 Jul 2016 17:12:06 +0200
On Fri, Jul 15, 2016 at 04:33:46PM +0200, Ludovic Courtès wrote:
> This code calls the ‘collect-garbage’ procedure, defined in (guix
> store).  You’ll see that this procedure returns two values, which are
> currently ignored: the name of the items that were removed from the
> store, and the number of bytes freed.

Brutto or netto? Otherwise said, does it take into account the hardlinks
used for deduplication, or does it pretend that every deleted file saves
as much memory as its size indicates?

Andreas





Information forwarded to bug-guix <at> gnu.org:
bug#23979; Package guix. (Fri, 15 Jul 2016 17:07:03 GMT) Full text and rfc822 format available.

Message #17 received at 23979 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Andreas Enge <andreas <at> enge.fr>
Cc: Vincent Legoll <vincent.legoll <at> gmail.com>, 23979 <at> debbugs.gnu.org
Subject: Re: bug#23979: [ER] guix gc should tell how much space it recovered
Date: Fri, 15 Jul 2016 19:06:27 +0200
Andreas Enge <andreas <at> enge.fr> skribis:

> On Fri, Jul 15, 2016 at 04:33:46PM +0200, Ludovic Courtès wrote:
>> This code calls the ‘collect-garbage’ procedure, defined in (guix
>> store).  You’ll see that this procedure returns two values, which are
>> currently ignored: the name of the items that were removed from the
>> store, and the number of bytes freed.
>
> Brutto or netto? Otherwise said, does it take into account the hardlinks
> used for deduplication, or does it pretend that every deleted file saves
> as much memory as its size indicates?

The latter, I think.  The actual computation is done by the daemon, in
libstore/gc.cc.

Ludo’.




Information forwarded to bug-guix <at> gnu.org:
bug#23979; Package guix. (Sat, 16 Jul 2016 08:21:01 GMT) Full text and rfc822 format available.

Message #20 received at 23979 <at> debbugs.gnu.org (full text, mbox):

From: Vincent Legoll <vincent.legoll <at> gmail.com>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 23979 <at> debbugs.gnu.org, Andreas Enge <andreas <at> enge.fr>
Subject: Re: bug#23979: [ER] guix gc should tell how much space it recovered
Date: Sat, 16 Jul 2016 10:20:12 +0200
Here is an attempt:

https://lists.gnu.org/archive/html/guix-devel/2016-07/msg00574.html

I tried to use call-with-values, but couldn't make it to work so
reverted back to let-values...

To test, I added (guix-gc "-C") at the end of the script and ran "guix
pull && guile gc.scm", looked OK...

-- 
Vincent Legoll




Reply sent to Vincent Legoll <vincent.legoll <at> gmail.com>:
You have taken responsibility. (Sat, 16 Jul 2016 12:56:02 GMT) Full text and rfc822 format available.

Notification sent to Vincent Legoll <vincent.legoll <at> gmail.com>:
bug acknowledged by developer. (Sat, 16 Jul 2016 12:56:02 GMT) Full text and rfc822 format available.

Message #25 received at 23979-done <at> debbugs.gnu.org (full text, mbox):

From: Vincent Legoll <vincent.legoll <at> gmail.com>
To: 23979-done <at> debbugs.gnu.org
Subject: Fix merged
Date: Sat, 16 Jul 2016 14:55:36 +0200
in git commit :
1187a27112be10f2ff74144f50c88714ccf30301

following submission in :
https://lists.gnu.org/archive/html/guix-devel/2016-07/msg00574.html

Thanks for the help

-- 
Vincent Legoll




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 14 Aug 2016 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 7 years and 250 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.