RFR(M): 8220089: G1 wastes a significant amount of space in survivor regions

sangheon.kim at oracle.com sangheon.kim at oracle.com
Wed Apr 10 04:48:39 UTC 2019


Hi all,

Please resume the review.
The review for the blocking issue, JDK-8218049 is finished/pushed.

Previously I requested to hold the review because of JDK-8218049 which 
addresses the problem of inconsistent data between MemoryUsage.used()  
and actual used bytes. This CR - 8220089 would change the number of 
survivor and eden regions which is related to JDK-8218049.

webrev.1 includes:
1) JDK-8218049 related changes.
    - Changed to minimize direct use of G1EdenRegions and 
G1SurvivorRegions. Instead changed to use 
G1CollectedHeap::eden_regions_count() and 
G1CollectedHeap::survivor_regions_count() which reflect the retained 
region.  G1EdenRegions::length() and G1SurvivorRegions::length() returns 
only current region count.
2) Minor refactoring such as renaming methods and updating comments.

http://cr.openjdk.java.net/~sangheki/8220089/webrev.1
http://cr.openjdk.java.net/~sangheki/8220089/webrev.1_inc

Testing: hs-tier1 ~ 5, some benchmark tests(specjbb2015, 2005 and 
specjvm2008) shows no significant difference.

Thanks,
Sangheon


On 3/28/19 12:51 PM, sangheon.kim at oracle.com wrote:
> Hi all,
>
> Please hold reviewing this.
>
> During offline discussion with Thomas, he found a problem with 
> MemoryMXBeans. As proposed patch is changing survivor region to 
> mutator region, used bytes as survivor region will not count the 
> retained survivor region. This problem will be addressed by 
> JDK-8218049 but as this patch also would be affected, I propose to 
> hold reviewing this.
>
> Thanks,
> Sangheon
>
>
> On 3/27/19 10:49 PM, sangheon.kim at oracle.com wrote:
>> Hi all,
>>
>> Can I have some reviews for the patch that changes to reuse survivor 
>> region as mutator region?
>>
>> Currently survivor region is released at the end of gc and then added 
>> to the next collection set. This means there would be waste if the 
>> survivor region has enough free space. As the survivor regions are 
>> converted to eden at the start of gc, reusing the *last* survivor 
>> region as a mutator region would maximize the use of heap region. 
>> This patch suggests to reuse the survivor region as described if the 
>> remaining free space satisfies a minimum threshold(currently, larger 
>> than or equal to minimum TLAB).
>>
>> Some benchmarks(specjbb2015, specjbb2005, specjvm2008) that I ran 
>> didn't have noticeable improvement. However, I think this change 
>> would benefit more with NUMA implementation because the NUMA 
>> implementation manages survivor region per NUMA node. i.e. more 
>> wastes on multiple node system.
>>
>> CR: https://bugs.openjdk.java.net/browse/JDK-8220089
>> webrev: http://cr.openjdk.java.net/~sangheki/8220089/webrev.0
>>              (based on JDK-8218668 webrev.1 which is under review now)
>> Testing: hs-tier1 ~ 5
>>
>> Thanks,
>> Sangheon
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/hotspot-gc-dev/attachments/20190409/3b60e645/attachment.htm>


More information about the hotspot-gc-dev mailing list