RFR: 8366476: Test gc/z/TestSmallHeap.java fails OOM with many NUMA nodes

Joel Sikström jsikstro at openjdk.org
Mon Sep 1 15:32:42 UTC 2025


On Sat, 30 Aug 2025 05:47:46 GMT, SendaoYan <syan at openjdk.org> wrote:

> Hi all,
> 
>   The PR [JDK-8359683](https://bugs.openjdk.org/browse/JDK-8359683) added NUMA-Aware Relocation for ZGC, it's optimized for the majority of NUMA workloads, but the cost is requiring more headroom in terms of heap memory. This PR add extra JVM option "-XX:-UseNUMA" to make this test run normally.
> 
> Test-fix only, change has been verified locally, no risk.

Thank you for this! I think this is a good compromise.

With [JDK-8359683](https://bugs.openjdk.org/browse/JDK-8359683), the heap memory overhead now scales with the number of NUMA nodes, which means small heaps now play less nice on a machine with many NUMA nodes.

test/hotspot/jtreg/gc/z/TestSmallHeap.java line 57:

> 55:         for (var maxCapacity: args) {
> 56:             ProcessTools.executeTestJava(
> 57:                 // Disable NUMA to avoid OOM with -Xmx16M after JDK-8359683

We might fail with a larger heap on a machine with more NUMA nodes, so I'd change this to be more general.
Suggestion:

                // Disable NUMA to avoid potential OOM after JDK-8359683

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

PR Review: https://git.openjdk.org/jdk/pull/27019#pullrequestreview-3174055252
PR Review Comment: https://git.openjdk.org/jdk/pull/27019#discussion_r2314234900


More information about the hotspot-gc-dev mailing list