Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 821529

Summary: sys-apps/portage manpage 5 make.conf: -jx up to date?
Product: Portage Development Reporter: korte
Component: DocumentationAssignee: Portage team <dev-portage>
Status: RESOLVED FIXED    
Severity: normal CC: sam
Priority: Normal Keywords: InVCS
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 915120    
Bug Blocks:    

Description korte 2021-11-03 21:43:10 UTC
Is the following paragraph from man 5 make.conf up to date?

 MAKEOPTS
              Use  this  variable  if  you  want  to  use  parallel  make.  For example, if you have a dual-processor system, set this variable to "-j2" or "-j3" for  enhanced  build  performance  with  many packages. Suggested settings are between CPUs+1 and 2*CPUs+1. In order to avoid excess load, the --load-average option is recommended.  For  more  information, see  make(1). Also see emerge(1) for information about analogous --jobs and --load-average options.

It would be nice if there could be a hint about lowering the number of threads if there are out of memory problems, e.g.:

If you experience out of memory problems when running emerge, lower the number of threads in make.conf or on a per package base in package.env . Most packages will be merged without memory problems if you limit the thread count to RAM/2GB.


See also: https://wiki.gentoo.org/wiki/Knowledge_Base:Emerge_out_of_memory
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-11-04 00:03:37 UTC
Yeah, this is inconsistent with modern advice, which is:
jobs=min(RAM/2GB, threads)
... given modern compiler (often C++) jobs can take up to 2GB per job.
Comment 2 Larry the Git Cow gentoo-dev 2023-10-06 01:30:41 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/portage.git/commit/?id=79a7fea7d32c924d290569c0d9efbc377eb87749

commit 79a7fea7d32c924d290569c0d9efbc377eb87749
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-10-06 01:30:04 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-10-06 01:30:04 +0000

    make.conf(5): update MAKEOPTS guidance
    
    We recommend min(RAM/2GB, threads) nowadays because C++ projects may need
    up to 2GB per job.
    
    Bug: https://bugs.gentoo.org/821529
    Signed-off-by: Sam James <sam@gentoo.org>

 man/make.conf.5 | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
Comment 3 Larry the Git Cow gentoo-dev 2023-10-20 00:51:32 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3500483f75789c36e379c1b6546a09df7c11e2b1

commit 3500483f75789c36e379c1b6546a09df7c11e2b1
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-10-20 00:49:33 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-10-20 00:51:00 +0000

    sys-apps/portage: add 3.0.53
    
    Closes: https://bugs.gentoo.org/915120
    Closes: https://bugs.gentoo.org/821529
    Closes: https://bugs.gentoo.org/914441
    Closes: https://bugs.gentoo.org/914722
    Closes: https://bugs.gentoo.org/914873
    Closes: https://bugs.gentoo.org/915099
    Closes: https://bugs.gentoo.org/915123
    Closes: https://bugs.gentoo.org/915128
    Closes: https://bugs.gentoo.org/915136
    Closes: https://bugs.gentoo.org/915330
    Closes: https://bugs.gentoo.org/915494
    Closes: https://bugs.gentoo.org/915834
    Closes: https://bugs.gentoo.org/915903
    Closes: https://bugs.gentoo.org/900224
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-apps/portage/Manifest              |   1 +
 sys-apps/portage/portage-3.0.53.ebuild | 238 +++++++++++++++++++++++++++++++++
 2 files changed, 239 insertions(+)