all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Efraim Flashner <efraim@flashner.co.il>
To: Felix Lechner <felix.lechner@lease-up.com>
Cc: guix-devel@gnu.org
Subject: Re: Are 'guix gc' stats exaggerated?
Date: Tue, 28 May 2024 12:01:10 +0300	[thread overview]
Message-ID: <ZlWdViZp5KSsyUdD@3900XT> (raw)
In-Reply-To: <87bk4stjpi.fsf@lease-up.com>

[-- Attachment #1: Type: text/plain, Size: 1901 bytes --]

On Sun, May 26, 2024 at 01:13:45PM -0700, Felix Lechner via Development of GNU Guix and the GNU System distribution. wrote:
> Hi,
> 
> Today I ran 'guix gc' on equipment with an ext4 root partition.  It had
> these space characteristics beforehand:
> 
>     Filesystem  Size       Used      Avail     Use% Mounted on
>     /dev/dm-3   309047680  157252980 138126064  54% /
> 
> or for human eyes:
> 
>     /dev/dm-3   295G        150G      132G      54% /
> 
> After the run, the drive showed:
> 
>     /dev/dm-3   309047680   88267956 207111088  30% /
> 
> or for human eyes:
> 
>     /dev/dm-3   295G         85G      198G      30% /
> 
> By my math, about 65.8 GiB were recovered.
> 
> When 'guix gc' was done, it announced:
> 
>     [184389 MiB] deleting '/gnu/store/...'
>     deleting `/gnu/store/trash'
>     deleting unused links...
>     note: currently hard linking saves 59224.03 MiB
>     guix gc: freed 110,649.49 MiBs
> 
> Seeing the 184389 MiB number, or 180 GiB, already made me suspicious.
> It exceeded my drive usage by 30 GiB.  Even the more conservative 110649
> MiB "freed," however, are off by a mile. That would have been 108 GiB,
> or 42 GiB more than the space actually recovered.
> 
> Am I looking at those numbers the wrong way?  Thanks!

As your store grows larger the inherent deduplication from the
guix-daemon approaches a 3:1 file deduplication ratio.  If two files are
the same then they are hardlinked to the same actual block on the drive
and you save some space.

I have found that if you switch to btrfs and add zstd (level 3)
compression then you get about another 2:1 on top of that, for around
5.5:1.

-- 
Efraim Flashner   <efraim@flashner.co.il>   רנשלפ םירפא
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  parent reply	other threads:[~2024-05-28  9:02 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-26 20:13 Are 'guix gc' stats exaggerated? Felix Lechner via Development of GNU Guix and the GNU System distribution.
2024-05-27  9:10 ` raingloom
2024-05-28  2:47   ` Felix Lechner via Development of GNU Guix and the GNU System distribution.
2024-05-28  9:01 ` Efraim Flashner [this message]
2024-05-31 22:03   ` Felix Lechner via Development of GNU Guix and the GNU System distribution.
2024-06-02  8:24     ` Daemon deduplication and btrfs compression [was Re: Are 'guix gc' stats exaggerated?] Efraim Flashner
2024-06-06 14:17     ` Are 'guix gc' stats exaggerated? Ludovic Courtès
2024-06-06 19:32       ` Felix Lechner via Development of GNU Guix and the GNU System distribution.
2024-06-09  9:19         ` Efraim Flashner
2024-06-09  9:30           ` Andreas Enge
2024-06-17 11:24             ` Ludovic Courtès
2024-05-31 16:33 ` Simon Tournier

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZlWdViZp5KSsyUdD@3900XT \
    --to=efraim@flashner.co.il \
    --cc=felix.lechner@lease-up.com \
    --cc=guix-devel@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 external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.