RFR (XXS): 8164133: Tests gc/arguments/TestAlignmentToUseLargePages.java and gc/cms/TestBubbleUpRef.java use too small heap
sangheon
sangheon.kim at oracle.com
Mon Aug 22 19:49:19 UTC 2016
Hi Dima and Jon,
Let me interrupt a little bit.
As you know, we can have quite big heap alignment with large pages
enabled. And this affects to our heap ergonomics.
However, as the test case tests only whether the VM is successfully
initialized or not, I think large 'Xms' option is enough to fix the problem.
For me, the new 'Xms/Xmx' values seem always OK to initialize VM.
Jon, the original test failure contains '-Xms7m -Xmx9m' options.
"GC triggered before VM initialization completed. Try increasing
NewSize, current value 1280K. "
To answer to Jon's original question, the reason of "1280k (1310720)" is
that NewSize(default value of 1363144) is aligned to gen
alignment(65536) from GenCollectorPolicy::initialize_flags().
collectorPolicy.cpp:line 316
We resize NewSize from GenCollectorPolicy::initialize_size_info() if
needed, but it seems like this is not the case.
Given above, the patch seems okay.
Thanks,
Sangheon
On 08/22/2016 10:37 AM, Jon Masamitsu wrote:
>
>
> On 08/22/2016 08:55 AM, Dmitry Fazunenko wrote:
>> Jon,
>>
>> The problem could be reproduced by the following command:
>>
>> #> java -Xmx3m -XX:+UseConcMarkSweepGC -XX:+AggressiveOpts -version
>> Error occurred during initialization of VM
>> GC triggered before VM initialization completed. Try increasing
>> NewSize, current value 640K.
>
> I didn't notice that "-Xmx3m" was on the command line for the original
> failure.
> Without -Xmx3m I expected that the default heap was large and wondered
> why
> NewSize was so small.
>
> Jon
>
>>
>> increasing Xmx from 3m to 4m helps:
>>
>> #> java -Xmx4m -XX:+UseConcMarkSweepGC -XX:+AggressiveOpts -version
>> java version "9-ea"
>> Java(TM) SE Runtime Environment (build 9-ea+132)
>> Java HotSpot(TM) 64-Bit Server VM (build 9-ea+132, mixed mode)
>>
>> I don't see anything suspicious in the GC log (attached).
>>
>> There is no requirement to minimal heap required for Hotspot to work
>> normally, so I think the tests should not start VM with so small heaps.
>>
>>
>> Thanks,
>> Dima
>>
>>
>>
>>
>> On 19.08.2016 21:02, Jon Masamitsu wrote:
>>> Dima,
>>>
>>> The error message I see in the logs is
>>>
>>> GC triggered before VM initialization completed. Try increasing
>>> NewSize, current value 1280K.
>>>
>>> Do you know why the NewSize is so small? I ask because I'm
>>> not sure setting a larger heap size will always fix this failure.
>>>
>>> If the test is run (with the parameters that fail) and
>>> -Xlog:gc*=trace, you might
>>> see why the NewSize is so small (if you don't know now).
>>>
>>> Jon
>>>
>>>
>>> On 8/19/2016 9:02 AM, Dmitry Fazunenko wrote:
>>>> Hello,
>>>>
>>>> May I have to get a couple of reviews for a trivial fix:
>>>>
>>>> https://bugs.openjdk.java.net/browse/JDK-8164133
>>>> http://cr.openjdk.java.net/~dfazunen/8164133/webrev.01/
>>>>
>>>> Two tests set very small maximum heap size, which may cause:
>>>> starts VM with too small heap size, which might cause
>>>> Error occurred during initialization of VM
>>>> None of those tests does really require such a small heap, so just
>>>> increasing should help.
>>>>
>>>> Thanks,
>>>> Dima
>>>>
>>>>
>>>>
>>>
>>
>
More information about the hotspot-gc-dev
mailing list