Gentoo Archives: gentoo-user

From: Kai Krakow <hurikhan77@×××××.com>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Re: How to keep my system from (nearly) freezing?
Date: Mon, 20 Feb 2017 12:12:27
Message-Id: 20170220131204.319b45e7@jupiter.sol.kaishome.de
In Reply to: Re: [gentoo-user] How to keep my system from (nearly) freezing? by Meino.Cramer@gmx.de
1 Am Sun, 19 Feb 2017 14:41:20 +0100
2 schrieb Meino.Cramer@×××.de:
3
4 > Helmut Jarausch <jarausch@××××××.be> [17-02-19 14:04]:
5 > > Hi,
6 > >
7 > > sometime I have some memory hungry ebuilds in the background, when
8 > > I start (e.g.) Chromium which needs very much memory if you have a
9 > > lot of open tabs.
10 > >
11 > > In that case my system nearly freezes. I cannot even kill chrome.
12 > > What can I do in that case. (Remote login doesn't work either)
13 > >
14 > > Can I have any additional program (like Chromium) die if there is
15 > > not enough memory.
16 > >
17 > > Many thanks for a hint,
18 > > Helmut
19 > >
20 >
21 > Hi Helmut,
22 >
23 > I know that situation very well...additionally I have Blender
24 > open...
25 >
26 > But I think that the "freeze" of the system is not due to the memory
27 > amount but due to the heavy I/O while swapping.
28
29 Yes, and it's the small tiny write IO every application does every now
30 and then which then blocks the application or even the whole OS for
31 minutes. Because IO work-queues tend to be really big.
32
33 > May be a tool like ionice could help you to keep the possibility
34 > of killing certain processes. Ionice the emerge itself and additinally
35 > nice it also.
36
37 No, ionice cannot help here. If a process blocks due to exhausting
38 dirty_background_bytes, it is blocked. Nothing will help to write back
39 that data any earlier. And if even dirty_bytes is exhausted, the whole
40 system blocks.
41
42 I suggested another approach in my other reply:
43
44 Lower dirty_background_bytes, maybe switch to deadline scheduler for
45 better in-time servicing of write requests.
46
47 > The emerge may take longer, but a frozen system is even slower...
48 > ;)
49
50 Not really, most of it can run from cache (if you allow for
51 "swappiness"). It will have almost no impact on system performance if
52 running in tmpfs. I'm having 16GB of RAM and allow portage to use 32GB
53 of tmpfs - that means: Parts of ongoing big emerges WILL be swapped
54 out. But since using deadline, this has almost no impact. Emerging is
55 still lots faster than without tmpfs.
56
57 --
58 Regards,
59 Kai
60
61 Replies to list-only preferred.