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

CPU overhead in FJ due to spinning in awaitWork

    Details

      Backports

        Description

        The patch JDK-8056248 improved FJ handling of threads and removed the risk over starting and activating too many threads. This came with a slight performance impact for streams and FJ work on smaller data sets, which was mitigated by adding extra spinning checking for work before the FJworker-threads go to sleep. The claiming of a task is much faster from a spinning thread than from a thread that first need to be unparked.

        Unfortunately the spinning has shown to be fairly CPU intensive causing overall performance regressions in applications due to less CPU available for the other parts of the application not running as FJ tasks.

        The recommendation which has been discussed with Doug Lea is to disable the spinning for JDK 8, and for JDK 9 continue the ongoing Work and research to solve the active waiting without spinning. Depending on timing of this work it may potentially be back ported to a later release of 8u.

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  psandoz Paul Sandoz
                  Reporter:
                  sfriberg Staffan Friberg (Inactive)
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: