[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Are 'guix gc' stats exaggerated?
From: |
Efraim Flashner |
Subject: |
Re: Are 'guix gc' stats exaggerated? |
Date: |
Tue, 28 May 2024 12:01:10 +0300 |
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
signature.asc
Description: PGP signature