Gentoo Archives: gentoo-dev

From: Ulrich Mueller <ulm@g.o>
To: Florian Schmaus <flow@g.o>
Cc: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [PATCH] check-reqs.eclass: clamp MAKEOPTS for memory/RAM usage
Date: Wed, 05 Jan 2022 18:22:47
Message-Id: u1r1m9h5l@gentoo.org
In Reply to: Re: [gentoo-dev] [PATCH] check-reqs.eclass: clamp MAKEOPTS for memory/RAM usage by Florian Schmaus
1 >>>>> On Wed, 05 Jan 2022, Florian Schmaus wrote:
2
3 > On 05/01/2022 09.28, Ulrich Mueller wrote:
4 >>>>>>> On Tue, 04 Jan 2022, Sam James wrote:
5 >>> Crank down MAKEOPTS jobs if MAKEOPTS="-jN" is too high for the
6 >>> amount of RAM available (uses amount declared as needed
7 >>> in the ebuild). Typically should be ~2GB per job.
8 >> Where does this number 2 GB come from? The amount of RAM strongly
9 >> depends on the programming language and other factors, so I don't
10 >> believe that there's one number that can be used for everything.
11
12 > Surely not, but 2 GiB seems like a good start. I guess it could become
13 > an eclass variable that ebuilds could modify later (if the need
14 > emerges).
15
16 We already have an eclass variable, namely CHECKREQS_MEMORY. Do you want
17 to introduce another one that is counting memory per job? I doubt that
18 would be possible, because the amount of memory greatly varies within a
19 single build. For example, it is different for compiler vs linker vs
20 building the documentation.
21
22 > It appears to me that the motivation for this change is to prevent
23 > users from running into OOM situations when emerging a package. And I
24 > believe that many users, especially novices, are not directly able to
25 > determine that portage failed due to OOM, simply because there is no
26 > direct hint in the build log. Hence opt-out appears to be sensible to
27 > me here.
28
29 That applies to all parallel builds though, not only to ebuilds
30 inheriting check-reqs.eclass. By tweaking MAKEOPTS, we're basically
31 telling the user that the --jobs setting in their make.conf is wrong,
32 in the first place.
33
34 Ulrich

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies