Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-21167

Performance degradation when unloading classes with Java 21 when compared to Java 17

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • rhel-9.2.0
    • java-21-openjdk
    • None
    • Moderate
    • rhel-sst-java
    • None
    • False
    • Hide

      None

      Show
      None
    • None
    • OpenJDK
    • None
    • None
    • None
    • x86_64
    • None

      What were you trying to do that didn't work?

      We observe a performance degradation when unloading classes, after updating to OpenJDK 21, up from OpenJDK 17.

      Please provide the package NVR for which bug is seen:

      -

      How reproducible:

      See steps to reproduce.

      Steps to reproduce

      1. Extract the attached archive.
      2. Change to that directory, run the snippet.
      3. Observe running times with JDK 17 and JDK 21, observe degradation with JDK 21.

      I bisected the degradation to this commit on JDK 20: https://github.com/openjdk/jdk20u/commit/cf4a4966a846ebea7e07c4ee6387fbf1081ea385

      There is one commit after that, that reduces the performance loss: https://github.com/openjdk/jdk20u/commit/4f50316a1a985cd06af7eed158d7e1917b86d159

      Its possible there is another degradation in JDK 18, but the times vary somewhat so its hard to tell.

      Expected results

      No notable performance degradation when loading and unloading classes.

      Actual results

      About 20-30% performance degradation is observed.

              rhn-engineering-ahughes Andrew Hughes
              andreevsimeon Simeon Andreev (Inactive)
              Andrew Hughes Andrew Hughes
              David Kutalek David Kutalek
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated: