1 |
Hi, |
2 |
|
3 |
On Sun, 19 Feb 2017 13:53:49 +0100 Helmut Jarausch wrote: |
4 |
> Hi, |
5 |
> |
6 |
> sometime I have some memory hungry ebuilds in the background, when I |
7 |
> start (e.g.) Chromium which needs very much memory if you have a lot of |
8 |
> open tabs. |
9 |
> |
10 |
> In that case my system nearly freezes. I cannot even kill chrome. |
11 |
> What can I do in that case. (Remote login doesn't work either) |
12 |
> |
13 |
> Can I have any additional program (like Chromium) die if there is not |
14 |
> enough memory. |
15 |
|
16 |
1. Use reasonable -j and -l options in MAKEOPTS. A good start will |
17 |
be -j N and -l 2*N, where N is a number of your logical cores. |
18 |
|
19 |
2. Set the lowest CPU and I/O priorities for emerge: |
20 |
PORTAGE_NICENESS=19 and run emerge as `ionice -c3 emerge ...`, |
21 |
you have to use CFQ scheduler to be able to use ionice. |
22 |
|
23 |
3. Use zswap with z3fold allocator. It helps me well on my laptop |
24 |
with 2GB RAM. |
25 |
|
26 |
4. If everything above doesn't help: |
27 |
a) reduce -j to a value where memory usage is suitable for you; |
28 |
b) consider using -Os in your {C,CXX,F,FC}FLAGS, since such system |
29 |
is certainly short of memory. |
30 |
|
31 |
5. If even 4. doesn't help, consider using more powerful host to |
32 |
build binary packages for this one. |
33 |
|
34 |
Best regards, |
35 |
Andrew Savchenko |