[PATCH] substitutes: Reduce default negative TTL values.

  • Done
  • quality assurance status badge
Details
3 participants
  • Ludovic Courtès
  • Maxim Cournoyer
  • Simon Tournier
Owner
unassigned
Submitted by
Ludovic Courtès
Severity
normal

Debbugs page

L
L
Ludovic Courtès wrote on 3 Sep 02:43 -0700
(address . guix-patches@gnu.org)(name . Ludovic Courtès)(address . ludo@gnu.org)
3d6f66db85fe8d87f7f01e67873769616dc71d83.1725356627.git.ludo@gnu.org
Previous values were overly conservative and often an annoyance.

* guix/substitutes.scm (%narinfo-negative-ttl): Reduce to 2mn.
(%narinfo-transient-error-ttl): Reduce to 1mn.

Change-Id: I8cff927a15d8203fb370369a56f024b8a14f3cc3
---
guix/substitutes.scm | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

Toggle diff (29 lines)
diff --git a/guix/substitutes.scm b/guix/substitutes.scm
index e732096933..e31b394020 100644
--- a/guix/substitutes.scm
+++ b/guix/substitutes.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013-2021, 2023 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013-2021, 2023-2024 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2014 Nikita Karetnikov <nikita@karetnikov.org>
;;; Copyright © 2018 Kyle Meyer <kyle@kyleam.com>
;;; Copyright © 2020 Christopher Baines <mail@cbaines.net>
@@ -65,11 +65,11 @@ (define %narinfo-ttl
(define %narinfo-negative-ttl
;; Likewise, but for negative lookups---i.e., cached lookup failures (404).
- (* 10 60))
+ (* 2 60))
(define %narinfo-transient-error-ttl
;; Likewise, but for transient errors such as 504 ("Gateway timeout").
- (* 5 60))
+ (* 1 60))
(define %narinfo-cache-directory
;; A local cache of narinfos, to avoid going to the network. Most of the

base-commit: 1569b861f504178263b73b4b48563bf3937d01bf
--
2.45.2
S
S
Simon Tournier wrote 6 days ago
87y13zelu1.fsf@gmail.com
Hi Ludo,

On Tue, 03 Sep 2024 at 11:43, Ludovic Courtès <ludo@gnu.org> wrote:
Toggle quote (10 lines)
> Previous values were overly conservative and often an annoyance.
>
> * guix/substitutes.scm (%narinfo-negative-ttl): Reduce to 2mn.
> (%narinfo-transient-error-ttl): Reduce to 1mn.
>
> Change-Id: I8cff927a15d8203fb370369a56f024b8a14f3cc3
> ---
> guix/substitutes.scm | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)

Well, this LGTM.

Cheers,
simon
M
M
Maxim Cournoyer wrote 4 days ago
(name . Simon Tournier)(address . zimon.toutoune@gmail.com)
87frq5w0zg.fsf@gmail.com
Hello,

Simon Tournier <zimon.toutoune@gmail.com> writes:

Toggle quote (10 lines)
> Hi Ludo,
>
> On Tue, 03 Sep 2024 at 11:43, Ludovic Courtès <ludo@gnu.org> wrote:
>> Previous values were overly conservative and often an annoyance.
>>
>> * guix/substitutes.scm (%narinfo-negative-ttl): Reduce to 2mn.
>> (%narinfo-transient-error-ttl): Reduce to 1mn.
>>
>> Change-Id: I8cff927a15d8203fb370369a56f024b8a14f3cc3

Reviewed-by: Maxim Cournoyer <maxim.cournoyer@gmail>

I don't actually have a well formed opinion on the values, but I trust
that if Ludo found them annoying, the change must be good.

--
Thanks,
Maxim
L
L
Ludovic Courtès wrote 4 days ago
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)
87mskdjdeb.fsf@gnu.org
Hello,

Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis:

Toggle quote (3 lines)
> I don't actually have a well formed opinion on the values, but I trust
> that if Ludo found them annoying, the change must be good.

Yes, for context, these defaults are particularly annoying in the
context of Cuirass and the Build Coordinator where, if a substitute
isn’t available at a given point in time, you may want to retry. For
this scenario, you’d have to wait for at least 10mn by default because
‘guix substitute’ attempts to retry.

Besides, I think I added negative TTLs back in the day to help reduce
load on substitute servers and to speed up clients in cases where you
run the same or similar commands several time in a row. A short TTL can
be useful, a longer not so much.

At any rate, it doesn’t matter all that much since it’s just a default:
servers can advertise their own negative TTL, including zero, via the
‘Cache-Control’ HTTP header.

Ludo’.
M
M
Maxim Cournoyer wrote 4 days ago
(name . Ludovic Courtès)(address . ludo@gnu.org)
87bk0tw0bw.fsf@gmail.com
Hello,

Ludovic Courtès <ludo@gnu.org> writes:

Toggle quote (22 lines)
> Hello,
>
> Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis:
>
>> I don't actually have a well formed opinion on the values, but I trust
>> that if Ludo found them annoying, the change must be good.
>
> Yes, for context, these defaults are particularly annoying in the
> context of Cuirass and the Build Coordinator where, if a substitute
> isn’t available at a given point in time, you may want to retry. For
> this scenario, you’d have to wait for at least 10mn by default because
> ‘guix substitute’ attempts to retry.
>
> Besides, I think I added negative TTLs back in the day to help reduce
> load on substitute servers and to speed up clients in cases where you
> run the same or similar commands several time in a row. A short TTL can
> be useful, a longer not so much.
>
> At any rate, it doesn’t matter all that much since it’s just a default:
> servers can advertise their own negative TTL, including zero, via the
> ‘Cache-Control’ HTTP header.

Thanks for the explanation; it makes sense.

--
Thanks,
Maxim
L
L
Ludovic Courtès wrote 22 hours ago
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)
87zfo8a76m.fsf@gnu.org
Pushed as 83698b6fa037aa1f3adc38f474be41bac7622ed8!
Closed
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 73000@patchwise.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 73000
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch