unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#73000] [PATCH] substitutes: Reduce default negative TTL values.
@ 2024-09-03  9:43 Ludovic Courtès
  2024-09-10 12:26 ` Simon Tournier
  0 siblings, 1 reply; 6+ messages in thread
From: Ludovic Courtès @ 2024-09-03  9:43 UTC (permalink / raw)
  To: 73000
  Cc: Ludovic Courtès, Christopher Baines, Josselin Poiret,
	Ludovic Courtès, Mathieu Othacehe, Simon Tournier,
	Tobias Geerinckx-Rice

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(-)

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





^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [bug#73000] [PATCH] substitutes: Reduce default negative TTL values.
  2024-09-03  9:43 [bug#73000] [PATCH] substitutes: Reduce default negative TTL values Ludovic Courtès
@ 2024-09-10 12:26 ` Simon Tournier
  2024-09-12 11:44   ` Maxim Cournoyer
  0 siblings, 1 reply; 6+ messages in thread
From: Simon Tournier @ 2024-09-10 12:26 UTC (permalink / raw)
  To: Ludovic Courtès, 73000
  Cc: Christopher Baines, Ludovic Courtès, Tobias Geerinckx-Rice,
	Josselin Poiret, Mathieu Othacehe

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
> ---
>  guix/substitutes.scm | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

Well, this LGTM.

Cheers,
simon




^ permalink raw reply	[flat|nested] 6+ messages in thread

* [bug#73000] [PATCH] substitutes: Reduce default negative TTL values.
  2024-09-10 12:26 ` Simon Tournier
@ 2024-09-12 11:44   ` Maxim Cournoyer
  2024-09-12 11:54     ` Ludovic Courtès
  0 siblings, 1 reply; 6+ messages in thread
From: Maxim Cournoyer @ 2024-09-12 11:44 UTC (permalink / raw)
  To: Simon Tournier
  Cc: Josselin Poiret, Mathieu Othacehe, Ludovic Courtès,
	Tobias Geerinckx-Rice, 73000, Christopher Baines

Hello,

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

> 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




^ permalink raw reply	[flat|nested] 6+ messages in thread

* [bug#73000] [PATCH] substitutes: Reduce default negative TTL values.
  2024-09-12 11:44   ` Maxim Cournoyer
@ 2024-09-12 11:54     ` Ludovic Courtès
  2024-09-12 11:58       ` Maxim Cournoyer
  0 siblings, 1 reply; 6+ messages in thread
From: Ludovic Courtès @ 2024-09-12 11:54 UTC (permalink / raw)
  To: Maxim Cournoyer
  Cc: Josselin Poiret, Simon Tournier, Mathieu Othacehe,
	Tobias Geerinckx-Rice, 73000, Christopher Baines

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.

Ludo’.




^ permalink raw reply	[flat|nested] 6+ messages in thread

* [bug#73000] [PATCH] substitutes: Reduce default negative TTL values.
  2024-09-12 11:54     ` Ludovic Courtès
@ 2024-09-12 11:58       ` Maxim Cournoyer
  2024-09-15 22:22         ` bug#73000: " Ludovic Courtès
  0 siblings, 1 reply; 6+ messages in thread
From: Maxim Cournoyer @ 2024-09-12 11:58 UTC (permalink / raw)
  To: Ludovic Courtès
  Cc: Josselin Poiret, Simon Tournier, Mathieu Othacehe,
	Tobias Geerinckx-Rice, 73000, Christopher Baines

Hello,

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

> 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




^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#73000: [PATCH] substitutes: Reduce default negative TTL values.
  2024-09-12 11:58       ` Maxim Cournoyer
@ 2024-09-15 22:22         ` Ludovic Courtès
  0 siblings, 0 replies; 6+ messages in thread
From: Ludovic Courtès @ 2024-09-15 22:22 UTC (permalink / raw)
  To: Maxim Cournoyer
  Cc: Josselin Poiret, Simon Tournier, Mathieu Othacehe,
	Tobias Geerinckx-Rice, Christopher Baines, 73000-done

Pushed as 83698b6fa037aa1f3adc38f474be41bac7622ed8!




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-09-15 22:23 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-03  9:43 [bug#73000] [PATCH] substitutes: Reduce default negative TTL values Ludovic Courtès
2024-09-10 12:26 ` Simon Tournier
2024-09-12 11:44   ` Maxim Cournoyer
2024-09-12 11:54     ` Ludovic Courtès
2024-09-12 11:58       ` Maxim Cournoyer
2024-09-15 22:22         ` bug#73000: " Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).