Subject: bug#47717: guix outrageously exhaust itself (freeze) when there is package build failure

From: Maxim Cournoyer <[email-masked]>
Date: Tue, 20 Apr 2021 21:35:34 -0400

Hi,

Mark H Weaver <[email-masked]> writes:

> bo0od <[email-masked]> writes:
>
>>  > I mean the ‘outrageously’ part.  When Linux runs out of memory, it
>>  > freezes up.  Moral judgment is futile.  Better to adopt raingloom's
>>  > earlyoom suggestion or similar.
>>
>> Im using default guix system nothing special, If this package usable to
>> solve these stuff i suggest then to include it by default.
>
> 'earlyoom' behavior is not necessarily desirable.  I, for one, have a
> fairly old computer by today's standards, and sometimes I ask it to do
> intensive things that are at the edge of its capabilities, such as
> compiling GNU IceCat.  An aggressive 'earlyoom' might prematurely abort
> jobs that could have completed, and thereby make it impossible for me to
> continue using this old computer for development.
>
> With that in mind, it's far from clear that 'earlyoom' should be our
> default behavior.  It's good to have it as an option, though.

Earlyoom's default config is to only kills processes when both the
physical memory *and* the swap have been used by more than 90%; in such
as serious resource depletion situation, that usually mean having to
hard reset the machine, or waiting one night not knowing if it'll be
done doing whatever it's doing the next morning (probably getting OOM'd
anyway by the kernel, Linux).

>>  > 4 GiB is absolutely not enough to build an outrageous amount of ‘modern’
>>  > software, especially in parallel (so not using --cores=1 --max-jobs=1)
>>  > to make use of those expensive cores.
>>  >
>>  > I'm disgusted too.
>>
>> Yes it is, But you know this cant be a way of life with guix for end
>> user no? Something by default should solve this matter otherwise this is
>> not usable distro.
>
> Many people are happily using it, and are quite enthusiastic about it,
> so evidently it's "usable".  That doesn't imply that it's good for
> everyone.  Perhaps you would prefer a more traditional distro, or one
> that has had more time to mature.  If so, that's okay.

My 2 cents here is that earlyoom makes Guix System more usable on dated
hardware than Linux's default OOM behavior; from my experience of using
it on a 4 GiB RAM 2010-era laptop for a good while.

I personally would see it a good option for our users to have it on by
default *if* we could manage to connect Earlyoom's notification system
with the desktop (via D-Bus, I think it supports that), so that when a
process is killed, the users has some feedback about it (the stock Linux
OOMK is sure to not let you wondering what's going on -- everything
stops to a crawl, and your hard drive gets thrashed).

Maxim