From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Marusich Subject: Re: guix gc: smarter collection & guix.el manual deletion Date: Sat, 28 Jul 2018 03:17:48 -0700 Message-ID: <87va8zr7eb.fsf@gmail.com> References: <876012bfnf.fsf@gmail.com> <87h8klrono.fsf@gmail.com> <874lgkea7x.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44338) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fjMIP-0002OI-GO for guix-devel@gnu.org; Sat, 28 Jul 2018 06:17:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fjMIO-0000TU-2T for guix-devel@gnu.org; Sat, 28 Jul 2018 06:17:57 -0400 Received: from mail-pl0-x235.google.com ([2607:f8b0:400e:c01::235]:39941) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fjMIN-0000Sj-Pb for guix-devel@gnu.org; Sat, 28 Jul 2018 06:17:56 -0400 Received: by mail-pl0-x235.google.com with SMTP id s17-v6so3375129plp.7 for ; Sat, 28 Jul 2018 03:17:55 -0700 (PDT) In-Reply-To: <874lgkea7x.fsf@gmail.com> (Pierre Neidhardt's message of "Fri, 27 Jul 2018 21:42:58 +0200") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Pierre Neidhardt Cc: Guix-devel --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Pierre Neidhardt writes: > Thanks for mentioning this. I'm very confused by the documentation howev= er: > > =E2=80=98--gc-keep-outputs[=3Dyes|no]=E2=80=99 > Tell whether the garbage collector (GC) must keep outputs of live > derivations. > > When set to =E2=80=9Cyes=E2=80=9D, the GC will keep the outputs of a= ny live > derivation available in the store=E2=80=94the =E2=80=98.drv=E2=80=99= files. The default is > =E2=80=9Cno=E2=80=9D, meaning that derivation outputs are kept only = if they are GC > roots. *Note Invoking guix gc::, for more on GC roots. > > Specifically this: "derivation outputs are kept only if they are GC roots= '". > Would that mean that other live outputs are deleted?!? I must get this w= rong! :p > > That said, I think my `guix-store.el' suggestion still has the following = benefit:=20 > whenever there is a huge build-input in the store for an item that is only > seldom rebuilt, it allows the users to chose for themselves if it's OK to= delete > it. By the way, I think you're right about the manual. I think it should say: "The default is 'no', meaning that derivation outputs are kept only if they are _reachable from_ a GC root." I've fixed this and added a little more information to the manual in commit 346a632144b89f45b3966732edacc2bfa07126a7. > Fantastic review! > Thank you so much for this: very clear, very thorough, it scattered all > remaining confusions! I thumb up for a blog post! :D I'm glad it helped! But I must confess, I'm cheating: This is all described in Eelco Dolstra's thesis [1]. It's a good read if you want to learn more about how the daemon and the store are designed. > I find emacs-guix tremendously useful, I highly recommend you give it a t= ry (the > learning curve is very flat). Any reason why you'd rather not use it? I just haven't gotten around to it yet. I'll try it sooner or later! >> > While I'm at it, I'd like to note that something might be wrong with t= he >> > `-F` option: I never get the promised amount of free space back, only >> > about 2/3 of it. >> >> I think that's normal. My understanding is that if you say "guix gc -F >> 3GiB", you aren't asking Guix to free 3 GiB; you're asking Guix to try >> to free enough space so that when it's done, the store will have 3 GiB >> of free space. For example, if the store begins with 2 GiB of free >> space and there is 5 GiB of garbage, Guix will only collect 1 GiB in >> order to bring the free space up to 3 GiB. > > No, I'm talking total disk usage here. If I ask 5G back, then `df /` tel= ls me > that root has about 3-4G free, it never has the promised amount. Can som= eone > confirm this? Might be a bug. Perhaps you simply don't have enough garbage available for the collector to collect? If you ask for 5 GiB, your system has 3 GiB free, and there is only 1 GiB of garbage, the best the collector can do is collect all the garbage (1 GiB) and leave you with just 4 GiB of free space. Footnotes:=20 [1] Page 128: https://nixos.org/~eelco/pubs/phd-thesis.pdf =2D-=20 Chris --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEy/WXVcvn5+/vGD+x3UCaFdgiRp0FAltcQswACgkQ3UCaFdgi Rp2SBQ/8Ccbw2i/3J89ciT/v1uAqmLEVCjmblao5oCak/NmQFc8FB5A1hVHjid9g NQHk7oO8gf9RsrLXiSEaVyEuvqMYQ20iW6/3u/mXey4mfR42K5zEADcJlGbsTXMT 1XIuS5u2oUffk+JzNzBF6831XeXPNVQyPYA52G3spPdIDVgRfiXxm4t85a11jWPj I2R/upk9UfvenSWmqISRevPCcI8IRTXdF+3KS8wDCbOIXlW7JamJYoY+Tji5gAA2 hxcmbsbiwc1oP6lUlNBtCHX+p43ofvDVZKMSMymTjFrh6alJ8ab7I2d/AZYt/AS8 qiqKXi7Kp9/ZY3hYuqSTCndah/IyNNI3PknYv5eIUTVLr5Aj3sbZOOR3HvN8/Y7l 5YZztujeVuJx2AWHDjYvYe8HzrvClZ1IaSGJDYWzGzPoZRFSlRKtDKbDrSvU9uB3 dBQeKEn1OGieD7qfvwslTpKREjEpgEcABJCtv6rOu0kDZnxRf5lB81P/9m16S0xa o4FaxdpMh6zhYB3U0T7393SjaABWWV/Kl0I/UwVY0aDyHGSIfyjysmUacufvKtiY rC/vtEhIVbytje5Ja3LdBc7aCq2GbuZjhztoeioLQPSA5fTFp4o/7wNqOyLO60Wz LP0n4K3IsaXhd4UGKJRDl8Qgo4sZBut3CzeOQA+lOv8e9JykkJY= =vcEK -----END PGP SIGNATURE----- --=-=-=--