This message was deleted.
# performance
s
This message was deleted.
c
It defaults to number of CPUs. Set ‘org.gradle.workers.max’ to adjust.
t
Well its not defaulting to the number of CPUs. I have 64. How does it get the default.
Looks like Runtime.getRuntime().availableProcessors(); which is returning 8. Hmm
c
Is it a VM or container?
Perhaps check /proc/cpuinfo
t
Baremetal hardware. /proc/cpuinfo shows all 64 procs
c
Odd. What jvm / version is Gradle using?
t
Does it with both 11 and 17
OpenJDK 64-Bit Server VM (Red_Hat-17.0.4.1.1-1.fc36) (build 17.0.4.1+1, mixed mode, sharing)
OpenJDK 64-Bit Server VM (Red_Hat-11.0.16.1.1-1.fc36) (build 11.0.16.1+1, mixed mode, sharing)
c
Nothing related set in gradle.properties? A few locations to check - project dir, $home/.gradle mainly.
t
Its definitely not gradle, Runtime.getRuntime().availableProcessors() in a standalone program returns 8 at well...
For now I just set a gradle.properties in my home directory that brings it up to 56, and that helps a lot. It was weird switching to linux and having my C++ complile times get exponentially slower. Thats generally not the case.
c
Ah yea. Is it perhaps 8 cores with threading? What is the processor?
t
Threadripper 3970X
32 cores, 64 threads.
c
Seems like that jvm is mis-identifying the cores.
t
Yeah. Whats weird is copying the processor code out of the JVM into a standalone exe seems to work ok.
c
yea. Perhaps check openjdk source for how it determines cpus, possibly hints in there.
t
It does normal things with sysconf and NPROCESSORS
I'll keep playing around, and if I can't find anything I'll make an issue on Java itself.
👍 1
Copy code
[0.001s][trace][os] active_processor_count: using static path - configured processors: 64
[0.001s][trace][os] active_processor_count: sched_getaffinity processor count: 64
[0.001s][trace][os] active_processor_count: determined by OSContainer: 8
[0.001s][debug][os] Initial active processor count set to 8
[0.001s][trace][os] active_processor_count: determined by OSContainer: 8
For some reason it thinks its containerized
c
Is cgroups configured, or perhaps taskset?
t
Not that I know of. I'm mostly windows, so I know thats mostly docker stuff, but don't know how to configure them, or check if theyre configured.
c
Perhaps something here of use. Hints at turning off container support.
t
Apparently its this, fixed in Java 18
And 17.0.5. I'm still on 17.0.4
c
Good find.
👍 1
1