[ 
https://issues.apache.org/jira/browse/LUCENE-9196?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17033612#comment-17033612
 ] 

Dawid Weiss commented on LUCENE-9196:
-------------------------------------

Maybe I'm being overprotective here but it'll make it a pain to switch between 
JVMs if those local settings are just global. And 
those rare people that run with J9 would have the generated defaults that'd 
fail on a subsequent gradle invocation. I'm not saying no - I'm just looking at 
how it could work for everyone in a reasonable way (and I don't see any obvious 
answer).

> 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

Reply via email to