Gentoo Archives: gentoo-user

From: Johannes Rosenberger <gentoo@×××××.eu>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] How to keep my system from (nearly) freezing?
Date: Sun, 19 Feb 2017 14:19:28
Message-Id: d9133f90-54ca-0bd6-e6b1-07b4ee8ec7f3@jorsn.eu
In Reply to: Re: [gentoo-user] How to keep my system from (nearly) freezing? by Meino.Cramer@gmx.de
1 On 19.02.2017 14:41, Meino.Cramer@×××.de wrote:
2 > Helmut Jarausch <jarausch@××××××.be> [17-02-19 14:04]:
3 >> Hi,
4 >>
5 >> sometime I have some memory hungry ebuilds in the background, when I
6 >> start (e.g.) Chromium which needs very much memory if you have a lot of
7 >> open tabs.
8 >>
9 >> In that case my system nearly freezes. I cannot even kill chrome.
10 >> What can I do in that case. (Remote login doesn't work either)
11 >>
12 >> Can I have any additional program (like Chromium) die if there is not
13 >> enough memory.
14 >>
15 >> Many thanks for a hint,
16 >> Helmut
17 >>
18 > Hi Helmut,
19 >
20 > I know that situation very well...additionally I have Blender
21 > open...
22 >
23 > But I think that the "freeze" of the system is not due to the memory
24 > amount but due to the heavy I/O while swapping.
25
26 I think so, too.
27
28 > May be a tool like ionice could help you to keep the possibility
29 > of killing certain processes. Ionice the emerge itself and additinally
30 > nice it also.
31 > The emerge may take longer, but a frozen system is even slower...
32 > ;)
33 >
34 > HTH!
35 > Cheers
36 > Meino
37
38 You can also use a compressed swap partition in RAM via zram
39 (Instructions: https://wiki.gentoo.org/wiki/Zram).
40 Then your system is still responsive enough to kill chromium when you
41 realize that your memory fills up.
42
43 It should also be possible to somehow dynamically set memory quotas but
44 I've not tried it yet. It might work via cgroups (which portage can use
45 natively).