Gentoo Archives: gentoo-user

From: Rich Freeman <rich0@g.o>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Re: webrsync {SOLVED}
Date: Sat, 29 Feb 2020 14:25:45
Message-Id: CAGfcS_=Gf1yA3o6BwkAYVF4kZsO8ULRvYyRXoNhfhOGUMY3bJQ@mail.gmail.com
In Reply to: Re: [gentoo-user] Re: webrsync {SOLVED} by Dale
1 On Sat, Feb 29, 2020 at 9:13 AM Dale <rdalek1967@×××××.com> wrote:
2 >
3 > Runaway processes is one reason I expanded my memory to 32GBs. It gives
4 > me more wiggle room for portage to be on tmpfs.
5 >
6
7 That is my other issue. 99% of the time the OOM killer is preferred
8 when this happens versus having the system just grind to a complete
9 halt. Either way some service is going to stop working, but at least
10 with the OOM killer it probably will only be one service.
11
12 OOM doesn't always kill the right thing, but it happens so
13 infrequently I haven't bothered to address this.
14
15 Setting limits on VM use on each service would of course be a good
16 idea. Also, you can tune OOM priority as well for any process. With
17 systemd these are unit config settings. I haven't looked at openrc
18 recently but certainly you can just edit the init.d script to set
19 these if there isn't just a config option.
20
21 I've found OOM guessing wrong is more of an issue when you have a lot
22 of medium-sized processes vs one large one. If one process is using
23 10GB of RAM and goes haywire it is very likely that this is the one
24 OOM-killer will go after. On the other hand if you're building with
25 make -j16 and you hit some really intensive part of a build and you
26 get 16 processes demanding half a GB each then it is more likely that
27 the OOM killer will first target some service that is RAM-hungry but
28 not usually a problem, because it is using more than any one of the
29 gcc processes.
30
31 I wonder if you can make OOM-killer cgroup-aware. Services are
32 generally in separate cgroups while make would all be in another, so
33 if it looked at total use of the cgroup and not the individual process
34 then it would weigh something that forks heavily a lot higher.
35
36 --
37 Rich

Replies

Subject Author
Re: [gentoo-user] Re: webrsync {SOLVED} Dale <rdalek1967@×××××.com>