all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: "Clément Lassieur" <clement@lassieur.org>
Cc: 33370@debbugs.gnu.org
Subject: bug#33370: guix publish: at least one user will have to build a given substitute
Date: Wed, 14 Nov 2018 15:49:14 +0100	[thread overview]
Message-ID: <877ehfg1ed.fsf@gnu.org> (raw)
In-Reply-To: <87muqcezci.fsf@lassieur.org> ("Clément Lassieur"'s message of "Wed, 14 Nov 2018 11:18:53 +0100")

Hi,

Clément Lassieur <clement@lassieur.org> skribis:

> Ludovic Courtès <ludo@gnu.org> writes:
>
>> Hello,
>>
>> Clément Lassieur <clement@lassieur.org> skribis:
>>
>>> I've noticed that narinfo baking is triggered by user requests when the
>>> '--cache' option of 'guix publish' is used.  It means that the first
>>> user who will want it will get the 404 response and will have to build
>>> it manually.  (See guix/scripts/publish.scm, make-request-handler.)
>>
>> Note that the first request (404) returns with an expiry of 5mn instead
>> of the default (much longer) expiry for “normal” 404s.
>>
>> We discussed this behavior at length back then and that seemed to me
>> like a reasonable behavior for a service with many users: the first one
>> gets 404 (or has to wait for 5 more minutes), but when there are enough
>> users, it doesn’t matter much.
>
> But at least one user will complain, and if it's a small laptop building
> Icecat...

The way we’re doing things, there’s necessarily a delay (the build time
plus some additional latency) between the moment and commit is pushed
and the moment the corresponding package is built.  Baking only adds a
very small latency.

>> This would be useful in reducing latency; the downside is that we’d bake
>> lots of things, even possibly things that nobody ever needs.
>>
>> Thoughts?
>
> What about getting the first user to block until the baking is done?

That’s generally not possible because HTTP is supposedly synchronous.
Also, ‘guix publish’ has a bunch of worker threads that pick baking
tasks from a queue.  When the queue is empty and you asking for a
substitute of sed, it will take seconds to bake it; but when the queue
is already large and you’re asking for LibreOffice, it could take a few
minutes.

For the intended use case, which is a build farm with many users,
optimizing for the first user makes little sense IMO.

Thanks,
Ludo’.

  reply	other threads:[~2018-11-14 14:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-13 23:48 bug#33370: guix publish: at least one user will have to build a given substitute Clément Lassieur
2018-11-14 10:09 ` Ludovic Courtès
2018-11-14 10:18   ` Clément Lassieur
2018-11-14 14:49     ` Ludovic Courtès [this message]
2018-11-14 15:34       ` bug#33370: Cuirass: Trigger 'guix publish' baking Clément Lassieur
2020-11-30 22:15 ` Tobias Geerinckx-Rice via Bug reports for GNU Guix

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=877ehfg1ed.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=33370@debbugs.gnu.org \
    --cc=clement@lassieur.org \
    /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.