Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-9196

look into adding -XX:ActiveProcessorCount=1 to parallel build jvms

Details

    • Task
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • general/build
    • None
    • New

    Description

      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.

      -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.

      cc dweiss

      Attachments

        Activity

          People

            Unassigned Unassigned
            rcmuir Robert Muir
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: