RFR: 8267246: -XX:MaxRAMPercentage=0 is unreasonable for jtreg tests on many-core machines
Aleksey Shipilev
shade at openjdk.java.net
Mon May 17 17:00:00 UTC 2021
On Mon, 17 May 2021 13:24:16 GMT, Jie Fu <jiefu at openjdk.org> wrote:
> Hi all,
>
> vmTestbase/vm/mlvm/anonloader/stress/oome/metaspace/Test.java fails on our many-core machines due to `-XX:MaxRAMPercentage=0`.
> This is because `MaxRAMPercentage` will be always 0 if JTREG_JOBS > 25 [1].
>
> It can be reproduced by: `make test TEST="vmTestbase/vm/mlvm/anonloader/stress/oome/metaspace/Test.java" JTREG="JOBS=26"` on almost all machines.
>
> Setting `-XX:MaxRAMPercentage=0` on many-core machines seems unreasonable.
> It would be better to fix it.
>
> Thanks.
> Best regards,
> Jie
>
>
> [1] https://github.com/openjdk/jdk/blob/master/make/RunTests.gmk#L741
Wait, no. That would mean on large core machines, the sum of heap sizes would be more than physical memory size. That is, 1% multiplied over >100 JTREG_JOBS would be >100%. Since `MaxRAMPercentage` is lower priority than `-Xmx`, and seeing that test does not expect heap OOME, why not just put the explicit heap size in that test?
diff --git a/test/hotspot/jtreg/vmTestbase/vm/mlvm/anonloader/stress/oome/metaspace/Test.java b/test/hotspot/jtreg/vmTestbase/vm/mlvm/anonloader/stress/oome/metaspace/Test.java
index 0d5f1a1626f..4ee794fb79d 100644
--- a/test/hotspot/jtreg/vmTestbase/vm/mlvm/anonloader/stress/oome/metaspace/Test.java
+++ b/test/hotspot/jtreg/vmTestbase/vm/mlvm/anonloader/stress/oome/metaspace/Test.java
@@ -36,7 +36,7 @@
* @build vm.mlvm.anonloader.stress.oome.metaspace.Test
* @run driver vm.mlvm.share.IndifiedClassesBuilder
*
- * @run main/othervm -XX:-UseGCOverheadLimit -XX:MetaspaceSize=10m -XX:MaxMetaspaceSize=20m vm.mlvm.anonloader.stress.oome.metaspace.Test
+ * @run main/othervm -Xmx1g -XX:-UseGCOverheadLimit -XX:MetaspaceSize=10m -XX:MaxMetaspaceSize=20m vm.mlvm.anonloader.stress.oome.metaspace.Test
*/
package vm.mlvm.anonloader.stress.oome.metaspace;
-------------
Changes requested by shade (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/4062
More information about the build-dev
mailing list