Pierre Neidhardt <ambre...@gmail.com> writes: > Thanks for mentioning this. I'm very confused by the documentation however: > > ‘--gc-keep-outputs[=yes|no]’ > Tell whether the garbage collector (GC) must keep outputs of live > derivations. > > When set to “yes”, the GC will keep the outputs of any live > derivation available in the store—the ‘.drv’ files. The default is > “no”, 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 > wrong! :p > > That said, I think my `guix-store.el' suggestion still has the following > benefit: > 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 try > (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 the >> > `-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 /` tells me > that root has about 3-4G free, it never has the promised amount. Can someone > 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: [1] Page 128: https://nixos.org/~eelco/pubs/phd-thesis.pdf -- Chris
signature.asc
Description: PGP signature