You are not logged in.

#1 2021-07-01 15:37:22

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,731
Website

5900X building with make -j25 does not use all cores [solved]

I'm wondering if there is an issue with how the kernel is reporting load, or with how am I compiling with make, or with my expectations.  On my a hyperthreaded Intel quad, when I run `makepkg -src` building the linux package, I see htop reporting >99% CPU usage on all 8 CPUs once it gets into the actual build.  If I let it go for a few min, the first number reported by uptime's load avg is really close to 9 (8.89 for example).

By contrast, on an AMD hyperthreaded 12 core chip, when I run `makepkg -src` on the same package, htop is not showing nearly as much CPU usage on the 24 CPUs and this is reflected in a much lower load average as well.  In this case, after letting it run for a few min, the 1 min load average is 11.63.  I do not see a substantial difference if I pass a larger value for MAKEFLAGS either (for example -j50).

Is this normal?  i would think gcc would be able to scale beyond this on a single machine.

* I am not thermally throttled (temps are only 60C).
* I am not I/O bound (compiling in tmpfs).

Further, if I run mprime with 24 threads doing small FTTs, all 24 CPUs get saturated to >99% and the 1 min load average is consistently above 24.  Thanks for the insights and experiences.

Last edited by graysky (2021-07-02 17:03:12)

Offline

#2 2021-07-01 20:25:51

Lithium Sulfate
Member
Registered: 2020-07-01
Posts: 28

Re: 5900X building with make -j25 does not use all cores [solved]

I just tried to replicate your "stress test" by building linux (according to this) on my 3900X with the same parameters (MAKEFLAGS=-j25) inside tmpfs (which is also my default configuration for most builds.)

Keeping watch on htop during the process, all of my 24 CPUs seemed to be at 100% pretty much during the entire build, and the highest 1 min load average I observed was about 24.3. After about 10 to 15 minutes I ran out of space on my /tmp (16 out of 32 GiB total RAM) so the build eventually failed, but that didn't really matter for this experiment, I suppose.

My CPU temperature went up to around 80 °C, which is about what I expect from my system under this load.

I know it's not quite the same CPU model, so I apologize if this information doesn't actually help you any.

Offline

#3 2021-07-02 02:29:32

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,731
Website

Re: 5900X building with make -j25 does not use all cores [solved]

I figured this out.  The differences in usage was due to the fact that I had ~/.config/pacman/makepkg.conf wherein MAKEFLAGS=-j9 (from my old system).  Changing it to -j25 fixes the behavior.

Last edited by graysky (2021-07-02 16:47:15)

Offline

Board footer

Powered by FluxBB