From: "Ludovic Courtès" <ludo@gnu.org>
To: Christopher Baines <mail@cbaines.net>
Cc: guix-devel@gnu.org
Subject: Re: March update on bordeaux.guix.gnu.org
Date: Fri, 29 Mar 2024 11:21:37 +0100 [thread overview]
Message-ID: <87sf09gwy6.fsf@gnu.org> (raw)
In-Reply-To: <877chnfw81.fsf@cbaines.net> (Christopher Baines's message of "Wed, 27 Mar 2024 13:49:07 +0000")
Hi!
Christopher Baines <mail@cbaines.net> skribis:
> I've finally got around to starting to address the problems with
> disappearing nars discussed in [3]. The nar-herder now schedules nars
> which it's generated for removal and the time for removal is based on
> the TTL in use.
>
> 3: https://issues.guix.gnu.org/63634
Neat! Yeah it’s important to honor the TTL that’s advertised in
narinfos.
> Related to this, I've added options to the nar-herder to help change the
> TTL being used, and reduced the TTL for bordeaux.guix.gnu.org to 10
> minutes (from 180 days) [4]. This will at least mean that in the future,
> the nar-herder on bordeaux will be able to delete zstd compressed nars
> that it's generated more quickly.
It’s not 10mn right now:
--8<---------------cut here---------------start------------->8---
$ wget --debug -qO/dev/null https://bordeaux.guix.gnu.org/yr39rh6wihd1wv6gzf7w4w687dwzf3vb.narinfo 2>&1 |grep Cache
Cache-Control: max-age=15502374
--8<---------------cut here---------------end--------------->8---
Or maybe that’s just for newly created nars?
But then again, that’s the advertised TTL; the real TTL is still
infinite, right?
> I'm really unsure about the need/usefulness of narinfo caching in
> general, the cost of storing all these narinfos locally is quite high I
> think and I don't really know why it's done.
It’s a cache. It’s useful to have this cache because in “typical” Guix
usage you’re likely to ask repeatedly for the same substitutes.
Regarding the cost, 3f5e14182931f123c10513a3e1e2abaebfb52279 made things
more reasonable by putting a higher bound on narinfo retention. On my
laptop, I have:
--8<---------------cut here---------------start------------->8---
$ ls -lrt /var/guix/substitute/cache/4refhwxbjmeua2kwg2nmzhv4dg4d3dorpjefq7kiciw2pfhaf26a/ |wc -l
11549
$ du -h /var/guix/substitute/cache/4refhwxbjmeua2kwg2nmzhv4dg4d3dorpjefq7kiciw2pfhaf26a/
50M /var/guix/substitute/cache/4refhwxbjmeua2kwg2nmzhv4dg4d3dorpjefq7kiciw2pfhaf26a/
--8<---------------cut here---------------end--------------->8---
Maybe that’s still excessive and we could further reduce the maximum
caching time.
> The mishandling of these zstd nars available from bordeaux was the last
> thing on my mind blocking proposing to switch the default substitute
> server ordering, so I've now gone ahead and done that in [5].
>
> 5: https://issues.guix.gnu.org/70028
>
> Obviously the differences to having ci.guix.gnu.org first in the list of
> substitute URLs is subtle, but I'm hoping this will help with substitute
> speed issues (as discussed in [6]) plus increase the impact of mirroring
> work for the bordeaux substitutes in the future.
Good!
> 6: https://lists.gnu.org/archive/html/guix-devel/2023-05/msg00290.html
BTW, should we document this mirror somewhere (and also ensure that Guix
Foundation pays the bills), or do you view it more as an experiment for
now?
> Apart from that, the main thing on my mind for the next year regarding
> bordeaux substitutes specifically is storage space. We're at 90%
> capacity on hatysa (one of the two machines storing all the nars) so
> this will need looking at shortly. I'd also like to finally get removing
> nars that don't relate to the guix master branch happening, as that
> should free up a little bit of space at least.
Nice (the difficulty, I guess, is that some substitutes that we not
initially for ‘master’ eventually get used on ‘master’).
On this issue, I think we should learn from fellow NixOS hackers. They
kept substitutes for ~20 years I think and are now in a difficult
position because they cannot afford, financially, to keep that. So one
of the solutions envisioned was to figure out which of these millions of
substitutes were “important” (for instance, source code), which turns
out to be very hard if you don’t have that info already at hand.
https://discourse.nixos.org/t/nixos-s3-long-term-resolution-phase-1/36493
Do you think the Data Service or another source of info would let us
make such decisions?
If we take it to the extreme, we could have a sophisticated retention
policy like: drop all fixed-output derivations known to be available
from disarchive.guix + SWH, drop substitutes for packages that have less
than 100 dependents, etc.
Thanks for the update!
Ludo’.
next prev parent reply other threads:[~2024-03-29 10:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-27 13:49 March update on bordeaux.guix.gnu.org Christopher Baines
2024-03-29 10:21 ` Ludovic Courtès [this message]
2024-03-29 10:53 ` Christopher Baines
2024-04-09 15:37 ` Ludovic Courtès
-- strict thread matches above, loose matches on Subject: below --
2023-03-16 19:29 Christopher Baines
2023-03-21 2:49 ` Maxim Cournoyer
2023-03-22 14:27 ` Ludovic Courtès
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=87sf09gwy6.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=guix-devel@gnu.org \
--cc=mail@cbaines.net \
/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.