Re: GC hints
Hi, Mark H Weaver skribis: > Chris Marusich writes: > >> Mark H Weaver writes: >> >>> Hi Ludovic, >>> >>> Ludovic Courtès writes: >>> Actually, I was also wondering whether we should provide a configurable mechanism that would, by default, automatically delete old GC roots and maybe even run the GC automatically when needed—similar to what Git does. Thoughts? >>> >>> I think it's reasonable to automatically run GC by default, but I would >>> strongly advise against deleting GC roots automatically by default >>> without the user's knowledge and consent. >> >> Just to be clear, I agree with you, Mark. Guix shouldn't delete GC >> roots automatically by default. I think we were just saying that it >> might be nice if a user could configure Guix to automatically delete GC >> roots according to some policy (e.g., retain the last 2, and delete any >> others older than 1 month). Guix would only delete the GC roots >> according to the policy that the user has set, and if no policy has been >> set, the default would be not to delete any of the GC roots. > > As long as it's not the default behavior, I think this would be a nice > feature to have. Yes, that would sound like a reasonable default to me. Thinking more about it, we could imagine the equivalent of Git packs: for old generations, we’d remove the GC root itself, but we’d store metadata that would allow us to rebuild the thing. That’s not always possible in general, but in some cases it is: for ‘guix pull’ profiles, we’d just need to store the channel commits and URLs, and that’s all it’d take to rebuild them. We could arrange for ‘guix pull -l’ to traverse these seamlessly. For ~/.guix-profile we could perhaps keep a GC root to the profile’s derivation but not the profile itself. That way you could still rebuild things afterwards. Anyway, that’s very much science fiction at this point. Ludo’.
Re: GC hints
I've sent it already (December 19). I'll apply it in the coming days if no one objects to it. -- Pierre Neidhardt https://ambrevar.xyz/ signature.asc Description: PGP signature
Re: GC hints
On 2018-12-23 16:58, Mark H Weaver wrote: Chris Marusich writes: Mark H Weaver writes: Hi Ludovic, Ludovic Courtès writes: Actually, I was also wondering whether we should provide a configurable mechanism that would, by default, automatically delete old GC roots and maybe even run the GC automatically when needed—similar to what Git does. Thoughts? I think it's reasonable to automatically run GC by default, but I would strongly advise against deleting GC roots automatically by default without the user's knowledge and consent. Just to be clear, I agree with you, Mark. Guix shouldn't delete GC roots automatically by default. I think we were just saying that it might be nice if a user could configure Guix to automatically delete GC roots according to some policy (e.g., retain the last 2, and delete any others older than 1 month). Guix would only delete the GC roots according to the policy that the user has set, and if no policy has been set, the default would be not to delete any of the GC roots. As long as it's not the default behavior, I think this would be a nice feature to have. Thanks! Mark Pierre, could you send an updated patch? -- Cheers Swedebugia
Re: GC hints
Chris Marusich writes: > Mark H Weaver writes: > >> Hi Ludovic, >> >> Ludovic Courtès writes: >> >>> Actually, I was also wondering whether we should provide a configurable >>> mechanism that would, by default, automatically delete old GC roots and >>> maybe even run the GC automatically when needed—similar to what Git >>> does. >>> >>> Thoughts? >> >> I think it's reasonable to automatically run GC by default, but I would >> strongly advise against deleting GC roots automatically by default >> without the user's knowledge and consent. > > Just to be clear, I agree with you, Mark. Guix shouldn't delete GC > roots automatically by default. I think we were just saying that it > might be nice if a user could configure Guix to automatically delete GC > roots according to some policy (e.g., retain the last 2, and delete any > others older than 1 month). Guix would only delete the GC roots > according to the policy that the user has set, and if no policy has been > set, the default would be not to delete any of the GC roots. As long as it's not the default behavior, I think this would be a nice feature to have. Thanks! Mark
Re: GC hints
Chris Marusich skrev: (21 december 2018 09:30:30 CET) >Mark H Weaver writes: > >> Hi Ludovic, >> >> Ludovic Courtès writes: >> >>> Actually, I was also wondering whether we should provide a >configurable >>> mechanism that would, by default, automatically delete old GC roots >and >>> maybe even run the GC automatically when needed—similar to what Git >>> does. >>> >>> Thoughts? >> >> I think it's reasonable to automatically run GC by default, but I >would >> strongly advise against deleting GC roots automatically by default >> without the user's knowledge and consent. > >Just to be clear, I agree with you, Mark. Guix shouldn't delete GC >roots automatically by default. I think we were just saying that it >might be nice if a user could configure Guix to automatically delete GC >roots according to some policy (e.g., retain the last 2, and delete any >others older than 1 month). Guix would only delete the GC roots >according to the policy that the user has set, and if no policy has >been >set, the default would be not to delete any of the GC roots. > >-- >Chris I agree with you all 😃 This should not be the default, but be included in all the config templates with a clarifying comment. -- Sent from my p≡p for Android. pEpkey.asc Description: application/pgp-keys
Re: GC hints
Mark H Weaver writes: > Hi Ludovic, > > Ludovic Courtès writes: > >> Actually, I was also wondering whether we should provide a configurable >> mechanism that would, by default, automatically delete old GC roots and >> maybe even run the GC automatically when needed—similar to what Git >> does. >> >> Thoughts? > > I think it's reasonable to automatically run GC by default, but I would > strongly advise against deleting GC roots automatically by default > without the user's knowledge and consent. Just to be clear, I agree with you, Mark. Guix shouldn't delete GC roots automatically by default. I think we were just saying that it might be nice if a user could configure Guix to automatically delete GC roots according to some policy (e.g., retain the last 2, and delete any others older than 1 month). Guix would only delete the GC roots according to the policy that the user has set, and if no policy has been set, the default would be not to delete any of the GC roots. -- Chris signature.asc Description: PGP signature
Re: GC hints
Mark H Weaver (2018-12-20 07:12 -0500) wrote: > Hi Ludovic, > > Ludovic Courtès writes: > >> Actually, I was also wondering whether we should provide a configurable >> mechanism that would, by default, automatically delete old GC roots and >> maybe even run the GC automatically when needed—similar to what Git >> does. >> >> Thoughts? > > I think it's reasonable to automatically run GC by default, but I would > strongly advise against deleting GC roots automatically by default > without the user's knowledge and consent. > > It's certainly true that git performs GC automatically, but does it > automatically delete GC roots by default? I've never seen it do this, > and I would be surprised and angry if it did. > > I consider Guix GC roots to be potentially valuable user data, > regardless of age. For example, an old GC root might be valuable > because it was used to perform an experiment that should be repeatable, > or because it is known to work reliably for a given job, and newer > versions have not yet been tested. > > I, for one, expect my old profiles, system generations, and other GC > roots to be kept unless I explicitly delete them, and I suspect I'm not > alone. If I hadn't been paying close attention to Guix development, and > later discovered that Guix had deleted my GC roots without my consent, I > would be surprised and angry. You are not alone! I completely agree with your points. -- Alex
Re: GC hints
Hi Ludovic, Ludovic Courtès writes: > Actually, I was also wondering whether we should provide a configurable > mechanism that would, by default, automatically delete old GC roots and > maybe even run the GC automatically when needed—similar to what Git > does. > > Thoughts? I think it's reasonable to automatically run GC by default, but I would strongly advise against deleting GC roots automatically by default without the user's knowledge and consent. It's certainly true that git performs GC automatically, but does it automatically delete GC roots by default? I've never seen it do this, and I would be surprised and angry if it did. I consider Guix GC roots to be potentially valuable user data, regardless of age. For example, an old GC root might be valuable because it was used to perform an experiment that should be repeatable, or because it is known to work reliably for a given job, and newer versions have not yet been tested. I, for one, expect my old profiles, system generations, and other GC roots to be kept unless I explicitly delete them, and I suspect I'm not alone. If I hadn't been paying close attention to Guix development, and later discovered that Guix had deleted my GC roots without my consent, I would be surprised and angry. For these reasons, I think we should not automatically delete GC roots without the user's knowledge and consent. User consent could be inferred by a configuration change, or perhaps obtained interactively by printing a warning and asking the user to give their explicit consent. What do you think? Thanks, Mark
Re: GC hints
Ludovic Courtès writes: > I agree that this would be more accurate, but isn’t there also a risk > with making hints too long? I’m split between the idea of providing > concise hints that can be pasted and get things done, and the idea or > not trying to be a substitute for the manual. I agree the manual should be authoritative, but I also think that if Guix can provide contextual information, it's great when it does so. The "did you forget to add (use-module..." hints you added a while back are a great example of this. The shorter the better, of course. I think we're still waiting for Pierre to send his latest patch. If the text really is too long, perhaps we can provide concrete examples, a sentence explaining what they do, and a link to the manual, where we put the slightly more verbose explanation. I think the text so far is OK, but I also have not seen the final version yet. Pierre, what do you think? > Actually, I was also wondering whether we should provide a >configurable > mechanism that would, by default, automatically delete old GC roots and > maybe even run the GC automatically when needed—similar to what Git > does. I think it's a great idea to allow a user or system administrator to configure a policy for automatic GC root clean-up. I'm not sure about ad-hoc roots, but for profiles, it would be great to be able to say something like "Keep the last 2 generations, and delete any others that are older than 2 weeks". Perhaps we could enforce the policy any time that a user runs code that modifies the profiles, such as "guix package" commands. Of course, that's a little more than what is being proposed in this email thread, so it would probably be best to work on that separately. -- Chris signature.asc Description: PGP signature
Re: GC hints
Ludovic Courtès writes: > Actually, I was also wondering whether we should provide a configurable > mechanism that would, by default, automatically delete old GC roots and > maybe even run the GC automatically when needed—similar to what Git > does. While this would be convenient and probably an improvement I’d like to mention that in the HPC use case this might be problematic as profiles might be located on file shares that are not accessible by the node running the daemon. It would be good if the GC would err on the side of caution in those cases. (It currently removes links to unreachable profiles.) -- Ricardo