Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8159422

Very high Concurrent Mark mark stack contention

XMLWordPrintable

    • gc
    • b139

      Concurrent mark uses a global mark stack to store objects that do not fit the local ones.

      Threads are competing for these objects if their local stacks are empty.

      Now, the following problems:
        - the number of references that are pushed/popped per operation is 16. Considering that the local mark stacks contain 128k (entries I think), quite a few push/pop operations need to be done to fill/empty this stack (note that we never completely fill/empty the local stack, but we do partial filling/emptying)
        - the global mark stack is protected by a single global lock (that is not even a lock specifically for the mark stack, that lock is shared by other stuff in the GC too!). This means death on machines with 100+ threads, particularly at the "end" of marking when all threads are emptying the global mark stack

      Some applications need a mark stack with 1G entries. Above two issues are really problematic in these cases.

            tschatzl Thomas Schatzl
            tschatzl Thomas Schatzl
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: