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

Optimizer never finishes in certain situations causing performance issues

XMLWordPrintable

    • x86_64
    • linux

      ADDITIONAL SYSTEM INFORMATION :
      # java -version
      openjdk version "17.0.6" 2023-01-17
      OpenJDK Runtime Environment (Red_Hat-17.0.6.0.10-1.fc37) (build 17.0.6+10)
      OpenJDK 64-Bit Server VM (Red_Hat-17.0.6.0.10-1.fc37) (build 17.0.6+10, mixed mode, sharing)

      # uname -a
      Linux fedora 6.1.9-200.fc37.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Feb 2 00:21:48 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

      # cat /etc/fedora-release
      Fedora release 37 (Thirty Seven)


      A DESCRIPTION OF THE PROBLEM :
      Adding more than two identical things inside a busy loop in very heavy multithreaded application causes performance and CPU usage to plummet. In my testing environment and application -DmsgCount=2 causes 1200% cpu load (6c12t machine) where -DmsgCount=3 howers around 20%-30%. Using -Xint increases performance significantly in in -DmsgCount=3 case but also increases CPU usage.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      All of the source code and required steps are in https://github.com/StrongestNumber9/threadbug repository.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      CPU usage and performance to scale linearly with available CPU cores and processing threads.

      ACTUAL -
      CompilerThreads keeps on trying to optimize code, causing significantly reduced performance and low CPU usage.

      ---------- BEGIN SOURCE ----------
      All of the source code and required steps are in https://github.com/StrongestNumber9/threadbug
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      Partial workaround is to use -Xint but it is still significant performance loss as other optimizations are lost.

      FREQUENCY : always


            Unassigned Unassigned
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: