From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: 35701@debbugs.gnu.org
Subject: bug#35701: guix size should account for hard links in its disk space calculation
Date: Sun, 12 May 2019 15:18:36 -0400 [thread overview]
Message-ID: <878svbv5v7.fsf@gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 54 bytes --]
Consider the following operating system declaration:
[-- Attachment #2: robot-framework-system.scm --]
[-- Type: application/octet-stream, Size: 2226 bytes --]
;; This is an operating system configuration template for a bare-bone,
;; containerization-friendly setup, with no X11 display server and
;; no Guix daemon / client.
(use-modules (gnu)
(gnu packages bash)
(gnu packages python)
(gnu packages python-xyz)
(gnu packages xml)
(guix packages))
(operating-system
(host-name "robot-framework")
(timezone "America/Montreal")
;; Boot in "legacy" BIOS mode, assuming /dev/sdX is the
;; target hard disk, and "my-root" is the label of the target
;; root file system.
(bootloader (bootloader-configuration
(bootloader grub-bootloader)
(target "/dev/sda")))
(file-systems (cons (file-system
(device (file-system-label "my-root"))
(mount-point "/")
(type "ext4"))
%base-file-systems))
(users (cons (user-account
(name "builder")
(group "users")
(supplementary-groups '("wheel"))
(home-directory "/home/builder"))
%base-user-accounts))
;; Globally-installed packages.
(packages (cons* python-wrapper
(list python "tk")
python-robotframework
python-robotframework-sshlibrary
python-robotframework-lint
python-xmltodict
%base-packages))
(services (list
;; Enable #!/bin/sh and #!/bin/bash shebangs.
(service special-files-service-type
`(("/bin/bash" ,(file-append (canonical-package bash)
"/bin/bash"))))
(service special-files-service-type
`(("/bin/sh" ,(file-append (canonical-package bash)
"/bin/sh"))))
;; The following is a very small subset extracted of
;; %base-services.
(service login-service-type)
(service udev-service-type (udev-configuration))
(syslog-service)))
;; When using sudo, by default some environment variables such as
;; PYTHONPATH are dropped. Make it so that any environment
;; variables are honored. This is important so that the Guix system
;; profile can work correctly for any user.
(sudoers-file (plain-file "sudoers" "\
root ALL=(ALL) ALL
%wheel ALL=(ALL) ALL
Defaults !env_reset,!env_delete\n")))
[-- Attachment #3: Type: text/plain, Size: 1416 bytes --]
$ 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.
next reply other threads:[~2019-05-12 19:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-12 19:18 Maxim Cournoyer [this message]
2019-05-14 8:17 ` bug#35701: guix size should account for hard links in its disk space calculation Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=878svbv5v7.fsf@gmail.com \
--to=maxim.cournoyer@gmail.com \
--cc=35701@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).