guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: March update on bordeaux.guix.gnu.org


From: Ludovic Courtès
Subject: Re: March update on bordeaux.guix.gnu.org
Date: Fri, 29 Mar 2024 11:21:37 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

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’.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]