RFR: 8350860: Max GC memory overhead tests

Rui Li duke at openjdk.org
Thu May 1 05:41:39 UTC 2025


The G1 GC metadata has increased from JDK8 to the current tip. When upgrading JDK for an application from JDK8, applications might observe native memory increases. GC is one of the top contributors. Small applications tend to get impacted more significantly. See sample test in description in https://bugs.openjdk.org/browse/JDK-8350860, when heap is 128m, the native memory used by gc can be over 80m.

In order to make sure we don't bring dramatic native memory increase while developing G1, adding this metadata guardrail test. The test calculates the native memory based on existing GC usages and provides some headroom. When there are significant increase, the test would fail and we should look back to see if the added native memory make sense.

-------------

Commit messages:
 - Remove trailing whitespaces
 - 8350860: Max GC memory overhead tests

Changes: https://git.openjdk.org/jdk/pull/24981/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24981&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8350860
  Stats: 174 lines in 1 file changed: 174 ins; 0 del; 0 mod
  Patch: https://git.openjdk.org/jdk/pull/24981.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/24981/head:pull/24981

PR: https://git.openjdk.org/jdk/pull/24981


More information about the hotspot-gc-dev mailing list