RFR: 8183910: gc/arguments/TestAggressiveHeap.java fails intermittently

Stefan Johansson stefan.johansson at oracle.com
Tue May 15 14:42:28 UTC 2018

Thanks for the review Thomas,

On 2018-05-15 16:17, Thomas Schatzl wrote:
> Hi,
> On Tue, 2018-05-15 at 11:12 +0200, Stefan Johansson wrote:
>> Hi,
>> Please review this test change to avoid memory exhaustion during
>> testing.
>> Issue: https://bugs.openjdk.java.net/browse/JDK-8183910
>> Webrev: http://cr.openjdk.java.net/~sjohanss/8183910/00
>> Summary
>> The option AggressiveHeap sets the heap to half of the physical
>> memory, turns on ParallelGC and set a bunch of other options. The
>> test TestAggressiveHeap only verifies that Parallel GC was set. With
>> this in mind I don't see a good reason for letting this test set the
>> heap size so big and cause a lot of problems in our testing
>> environment. The suggested fix limits the heap to 128M which is half
>> of what the option  requires the machine to have. This can of course
>> still cause failures on systems with little memory, but the problem
>> is not bigger than today since the system must have more than 256M
>> for the test to run.
>    looks good.
> Maybe the "heapSizeOption" variable could be calculated from the
> existing minMemory value. Ignore if you think that is not necessary.
I thought about that as well, but decided to go with a hard-code 
approach since it doesn't affect the test and therefor I didn't want to 
add some calculation logic just because.

> Thomas

More information about the hotspot-gc-dev mailing list