Subject: bug#43773: guix offload scheduler/load balancer throttles itself

From: Maxim Cournoyer <[email-masked]>
Date: Mon, 05 Oct 2020 23:44:24 -0400

Hi,

zimoun <[email-masked]> writes:

> Hi Maxim,
>
> On Sat, 3 Oct 2020 at 05:04, Maxim Cournoyer <[email-masked]> wrote:
>
>> Idea of an improvement: it should choose the offload machine with the
>> less load (already the case, I believe), and not block waiting for the
>> load to go down before starting a build.
>
> I have never looked at this: schedule an offloading strategy.  And for
> example, I do not even know what is the current one.  However, is it
> not reinventing the wheel?  I mean, there are "well-know" job
> schedulers dealing with various constraints that we could
> "reimplement" instead of trying "ours".  Well, my remark is fully
> naive, I do not know. :-)

I tried to get inspiration from Jenkins's sources, but I failed to
locate it.  The patch posted here ended up fixing the normalized load
and making it configurable.  It reuses the existing (very simple)
scheduling scheme.  I've summarily documented it in the patch if you are
curious.

Maxim