[ https://issues.apache.org/jira/browse/LUCENE-9196?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17033538#comment-17033538 ]
Dawid Weiss commented on LUCENE-9196: ------------------------------------- I agree we could fine-tune the defaults better. I have two concerns: 1) these XX flags are tricky in that they may come and go. And of course they're not compatible with J9. I wonder if it'd be better to know which JVM we're running and whether it supports these options, and then apply it at runtime rather than via static local settings. It'll quickly get hairy with different variants. 2) tweaking JVM defaults makes it less likely we can discover hotspot bugs. Not that I care about it that much but perhaps it'd be nice to at least allow the CI to run with standard, unoptimized settings (gradle workers count can be set to 1 on such a job). > look into adding -XX:ActiveProcessorCount=1 to parallel build jvms > ------------------------------------------------------------------ > > Key: LUCENE-9196 > URL: https://issues.apache.org/jira/browse/LUCENE-9196 > Project: Lucene - Core > Issue Type: Task > Components: general/build > Reporter: Robert Muir > Priority: Major > > I've been using this in my own gradle.properties (both for test and gradle > vms). > I think otherwise there may be a bad multiplicative effect at play: if you > have N (say 16 cores), the build defaults to using 8 parallel resources. But > each of these jvms uses ergonomic defaults to size stuff like compiler/gc > threads according to the entire machine. Similar to the reasons behind > container support, etc. > I tell each build/test JVM to pretend like it runs on 1 cpu machine with this > flag. It seems to give a lower load average when running tests? Something to > look into. > {quote} > -XX:ActiveProcessorCount=x > Overrides the number of CPUs that the VM will use to calculate > the size of thread pools it will use for various operations such > as Garbage Collection and ForkJoinPool. > The VM normally determines the number of available processors > from the operating system. This flag can be useful for parti‐ > tioning CPU resources when running multiple Java processes in > docker containers. This flag is honored even if UseContainer‐ > Support is not enabled. See -XX:-UseContainerSupport for a de‐ > scription of enabling and disabling container support. > {quote} > cc [~dweiss] -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org