GNU bug report logs - #35701
guix size should account for hard links in its disk space calculation

Previous Next

Package: guix;

Reported by: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Date: Sun, 12 May 2019 19:19:01 UTC

Severity: normal

To reply to this bug, email your comments to 35701 AT debbugs.gnu.org.

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#35701; Package guix. (Sun, 12 May 2019 19:19:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Maxim Cournoyer <maxim.cournoyer <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Sun, 12 May 2019 19:19:02 GMT) Full text and rfc822 format available.

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

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: bug-guix <bug-guix <at> gnu.org>
Subject: guix size should account for hard links in its disk space calculation
Date: Sun, 12 May 2019 15:18:36 -0400
[Message part 1 (text/plain, inline)]
Consider the following operating system declaration:

[robot-framework-system.scm (application/octet-stream, inline)]
[Message part 3 (text/plain, inline)]
$ guix size `guix system build robot-framework-system.scm`

gives:

store item                                                       total    self
/gnu/store/f9fy1b2yf1qxy523732r7z34ymwqz64b-linux-libre-5.1        241.5   241.5  21.8%
/gnu/store/1lcniyxkxkh8g73zvh2gpbccvl6ggna7-locale-2.28             91.8    91.8   8.3%
/gnu/store/zm3188ipzi262s0m8bxm24br77yh9pd8-python-3.7.0           183.0    74.6   6.7%
/gnu/store/h8l1pby3cm6b4fxsfwwr65b4d1hyh6cs-python-3.7.0           183.0    74.6   6.7%
/gnu/store/wqr8rwnwpmag01i6kb0laf62vsqnhrxy-python-3.7.0           183.0    74.6   6.7%
/gnu/store/b7fqhszxl02g6pfm3vw6b3cjz472qrly-python-3.7.0           182.8    74.6   6.7%
[...]

total: 1106.3 MiB

But,

$ guix size `guix system --no-grafts build robot-framework-system.scm`

store item                                                       total    self
/gnu/store/f9fy1b2yf1qxy523732r7z34ymwqz64b-linux-libre-5.1        241.5   241.5  28.4%
/gnu/store/1lcniyxkxkh8g73zvh2gpbccvl6ggna7-locale-2.28             91.8    91.8  10.8%
/gnu/store/b7fqhszxl02g6pfm3vw6b3cjz472qrly-python-3.7.0           182.8    74.6   8.8%
/gnu/store/ybglr7nfs8v9kpnm8vf4drg3gafnvd15-guile-static-stripped-2.2.4    45.9    45.9   5.4%
total: 851.2 MiB

Conclusion: the size of grafts is added multiple times even though they
should be very light on disk usage given that they are mostly hard links
to the original, ungrafted output.

Information forwarded to bug-guix <at> gnu.org:
bug#35701; Package guix. (Tue, 14 May 2019 08:19:02 GMT) Full text and rfc822 format available.

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

From: Ludovic Courtès <ludo <at> gnu.org>
To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Cc: 35701 <at> debbugs.gnu.org
Subject: Re: bug#35701: guix size should account for hard links in its disk
 space calculation
Date: Tue, 14 May 2019 10:17:59 +0200
Salut Maxim,

Maxim Cournoyer <maxim.cournoyer <at> gmail.com> skribis:

> Conclusion: the size of grafts is added multiple times even though they
> should be very light on disk usage given that they are mostly hard links
> to the original, ungrafted output.

I think there should be an option to take hard links into account, but
it should probably not be done by default.  There are cases (e.g., when
using ‘guix pack’ or when evaluating the amount of data that will
actually be transferred over the wire) where you want to know the
“apparent size”, ignoring hard links.

Note that it’s a bit more work to take hard links into account since
currently ‘guix size’ just queries each store item’s size to the
daemon.

Thanks,
Ludo’.




This bug report was last modified 6 years and 29 days ago.

Previous Next


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