RFR: 8267246: -XX:MaxRAMPercentage=0 is unreasonable for jtreg tests on many-core machines

erik.joelsson at oracle.com erik.joelsson at oracle.com
Mon May 17 17:30:52 UTC 2021


On 2021-05-17 10:19, Aleksey Shipilev wrote:
> 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
> `-XX:MaxRAMPercentage` is actually `double`, so it can accept values below 1. The last time I looked into trouble like this, it was a problem with doing floating-point division in the make files -- not sure if something can be done about that.
Oh, if it's double, we can just switch to using awk to make the 
calculation, just like we do for TEST_JOBS. I just did a quick check and 
it produces float values.
> But my point is that the failing test -- is that the only test that fails? -- expects some heap size to accommodate Java allocations until the expected Metaspace OOM happens. In that case, the fix should be in the test itself. Because even if we do +1 to `MaxRAMPercentage`, it might still be not enough.

If this test has special needs, those should of course be handled by the 
test itself.

/Erik




More information about the build-dev mailing list