Gentoo Archives: gentoo-user

From: tastytea <tastytea+gentoo@××××××××.de>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Re: Change MAKEOPTS on the fly?
Date: Sun, 12 Jul 2020 08:54:33
Message-Id: 20200712105423.026f8986@ventiloplattform.tastytea.de
In Reply to: [gentoo-user] Re: Change MAKEOPTS on the fly? by Nikos Chantziaras
1 On 2020-07-12 11:29+0300 Nikos Chantziaras <realnc@×××××.com> wrote:
2
3 > On 12/07/2020 09:04, William Kenworthy wrote:
4 > > Hi,
5 > >
6 > >     is there a way to change the MAKEOPTS setting on a running
7 > > emerge? I am using "-j 5 -l 4" whilst emerging gcc-9.3 but its
8 > > creating too much pressure  on memory.  I expect the emerge to take
9 > > many more hours but complete eventually - but reducing it to "-j2"
10 > > will help other operations whilst not losing whats already been
11 > > completed (this is an old atom N330 with 4G ram and is my
12 > > gateway/router/firewall/snort/... and the overload is starting to
13 > > affect the network throughput significantly).
14 >
15 > […]
16 > ionice is in sys-apps/util-linux, so it's probably already installed.
17 > schedtool though is in sys-process/schedtool and it might not be
18 > installed.
19 > […]
20
21 The nice level can also be adjusted with `renice` from
22 sys-apps/util-linux:
23
24 renice -n 19 -p pid
25
26 > Another thing I recommend is getting rid of "-j5". Use -j4. The "+1"
27 > recommendation from decades ago does not apply anymore with modern
28 > Linux kernels. You can test this yourself by emerging a smaller
29 > package that takes like 2 minutes or so to emerge, and compare times
30 > with j4 and j5. Most likely you will see no difference, other than j5
31 > using more RAM.
32
33 You can also set MAKEOPTS and other Portage variables per package, for
34 example:
35
36 echo 'MAKEOPTS="-j1"' >> /etc/portage/env/onejob.conf
37 echo 'sys-devel/gcc onejob.conf' >> /etc/portage/package.env/onejob
38
39 See <https://wiki.gentoo.org/wiki//etc/portage/package.env> for more
40 information.

Replies

Subject Author
[gentoo-user] Re: Change MAKEOPTS on the fly? Nikos Chantziaras <realnc@×××××.com>