Page 1 of 1

Raspberry Pi4B 8GB EMERGE_DEFAULT_OPTS

Posted: Mon Jun 13, 2022 10:48 pm
by n1ese
What would be good --jobs and --load-average settings be for EMERGE_DEFAULT_OPS on a Raspberry Pi4B with 8GB of RAM.

Today, I emerged x11-base/xorg-server and x11-terms/xterm. Two of the dependices called for two different versions of sys-devel/llvm and it emerged them both at the same time:

Code: Select all

>>> Emerging (66 of 75) sys-devel/llvm-13.0.1::gentoo
>>> Emerging (67 of 75) sys-devel/llvm-14.0.4::gentoo
It took over 8 hours to emerge both at the same time and I was really surprised it took so long. The entire time, my system was running with a load average over 8. Is compiling LLVM really this taxing? I'm also surprised two different versions were requested/needed.

My make.conf:

Code: Select all

MAKEOPTS="-j4"
EMERGE_DEFAULT_OPTS="--jobs 4 --load-average 3.7"

Posted: Mon Jun 13, 2022 11:13 pm
by Leonardo.b
In my opinion, you should not compile more packages in parallel.

Posted: Tue Jun 14, 2022 12:37 am
by n1ese
Leonardo.b wrote:In my opinion, you should not compile more packages in parallel.
yeah, thinking a couple guides I read lead me astray.

Posted: Tue Jun 14, 2022 1:13 am
by Hu
The typical advice I see is to allocate 2GB RAM per job. By that rule, you need 4 * 4 * 2GB = 32GB RAM on this device for your current settings.

To see why you need 2 versions of LLVM, we would need to see the output of emerge --tree --verbose before you installed them. You might be able to answer this now by checking emerge --pretend --verbose --depclean sys-devel/llvm. I would expect that emerge --ask --verbose x11-base/xorg-server x11-terms/xterm should have informed you that 2 LLVM versions were scheduled.

Posted: Tue Jun 14, 2022 1:21 am
by n1ese
Hu wrote:To see why you need 2 versions of LLVM, we would need to see the output of emerge --tree --verbose before you installed them. You might be able to answer this now by checking emerge --pretend --verbose --depclean sys-devel/llvm. I would expect that emerge --ask --verbose x11-base/xorg-server x11-terms/xterm should have informed you that 2 LLVM versions were scheduled.

Code: Select all

ganymede ~ # emerge --pretend --verbose --depclean sys-devel/llvm

Calculating dependencies... done!
  sys-devel/llvm-13.0.1 pulled in by:
    media-libs/mesa-22.0.3 requires <sys-devel/llvm-14:=, <sys-devel/llvm-14:13/13=, sys-devel/llvm:13

  sys-devel/llvm-14.0.4 pulled in by:
    sys-devel/llvmgold-14 requires sys-devel/llvm:14[binutils-plugin]

Posted: Tue Jun 14, 2022 2:40 pm
by Hu
That provides the immediate answer. llvmgold brought in the newer version. mesa brought in the older one. You could optionally add those to the command if you want to dig deeper and understand why each of them are needed.

Posted: Tue Jun 14, 2022 3:40 pm
by n1ese
Hu wrote:That provides the immediate answer. llvmgold brought in the newer version. mesa brought in the older one. You could optionally add those to the command if you want to dig deeper and understand why each of them are needed.
Yeah, I'm starting to become more confused.

Code: Select all

emerge --pretend --verbose --depclean sys-devel/llvmgold

Calculating dependencies... done!
  sys-devel/llvmgold-14 pulled in by:
    sys-devel/llvm-13.0.1 requires >=sys-devel/llvmgold-13
    sys-devel/llvm-14.0.4 requires >=sys-devel/llvmgold-14

Posted: Tue Jun 14, 2022 4:15 pm
by Hu
Mesa caused you to need llvm-13. llvm-13 needed any recent llvmgold. The most recent llvmgold is llvmgold-14, which is acceptable to llvm, so it was installed. Once you needed llvmgold-14, then you also needed llvm-14.

Posted: Tue Jun 14, 2022 4:40 pm
by n1ese
Hu wrote:Mesa caused you to need llvm-13. llvm-13 needed any recent llvmgold. The most recent llvmgold is llvmgold-14, which is acceptable to llvm, so it was installed. Once you needed llvmgold-14, then you also needed llvm-14.
Gotcha, makes sense now, thanks.