G1 makes two concurrent refinement threads with -XX:G1ConcRefinementThreads=1

XMLWordPrintable

    • Type: Bug
    • Resolution: Duplicate
    • Priority: P4
    • 9
    • Affects Version/s: 9
    • Component/s: hotspot
    • gc

      This simplest way to demonstrate this is to run:

      $ java -XX:G1ConcRefinementThreads=1 -XX:+UnlockDiagnosticVMOptions -XX:+G1TraceConcRefinement Hello
      G1-Refine-stop
      G1-Refine-stop

      Those two lines correspond to two separate threads coming to ConcurrentG1RefineThread::stop. I understand this is because of:

        // We need one extra thread to do the young gen rset size sampling.
        _n_threads = _n_worker_threads + 1;

      ...but this is not what user supplied for the number of refinement threads. This is at very least confusing, and potentially complicates GC fine-tuning.

            Assignee:
            Derek White
            Reporter:
            Aleksey Shipilev
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: