GNU bug report logs -
#47717
Avoid system freezes by using earlyoom (with D-Bus notifications)
Previous Next
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
On Thu, Apr 22, 2021 at 02:34:22PM -0400, Mark H Weaver wrote:
> Hi Maxim,
>
> Maxim Cournoyer <maxim.cournoyer <at> gmail.com> writes:
>
> > Mark H Weaver <mhw <at> netris.org> writes:
> >
> >> '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).
> [...]
> > 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.
>
> Okay, I trust your judgment on this. I haven't tried 'earlyoom' myself.
> Moreover, my use case is very unusual, and so it doesn't make sense to
> choose a default behavior based on my needs.
>
> So, I've changed my mind. Thanks for talking me through it.
>
> > 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).
>
> That sounds excellent, if it can be done. Otherwise, it might still
> make sense to have 'earlyoom' on by default in Guix. I'll leave it to
> others to decide.
>
> Thanks,
> Mark
FWIW I setup OOM so that it would specifically kill build processes or
icecat but not my desktop.
(service earlyoom-service-type
(earlyoom-configuration
(prefer-regexp "(cc1(plus)?|.rustc-real|ghc|Web Content)")
(avoid-regexp "enlightenment")))
--
Efraim Flashner <efraim <at> flashner.co.il> אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[signature.asc (application/pgp-signature, inline)]
This bug report was last modified 3 years and 89 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.