On 05/01/2022 09.28, Ulrich Mueller wrote:
On Tue, 04 Jan 2022, Sam James wrote:
Crank down MAKEOPTS jobs if MAKEOPTS="-jN" is too high for the
amount of RAM available (uses amount declared as needed
in the ebuild). Typically should be ~2GB per job.
Where does this number 2 GB come from? The amount of RAM strongly
depends on the programming language and other factors, so I don't
believe that there's one number that can be used for everything.
Surely not, but 2 GiB seems like a good start. I guess it could become
an eclass variable that ebuilds could modify later (if the need emerges).
+# @ECLASS-VARIABLE: CHECKREQS_MEMORY_MANGLE_JOBS
+# @USER_VARIABLE
+# @DESCRIPTION:
+# Allow packages to reduce the number of multiprocessing (e.g. make, ninja)
jobs
+# to lower memory usage.
+: ${CHECKREQS_MEMORY_MANGLE_JOBS=yes}
If anything, the feature should be opt-in rather than opt-out.
It appears to me that the motivation for this change is to prevent users
from running into OOM situations when emerging a package. And I believe
that many users, especially novices, are not directly able to determine
that portage failed due to OOM, simply because there is no direct hint
in the build log. Hence opt-out appears to be sensible to me here.
- Flow