RFR (S): 7057939 : jmap shows MaxNewSize=4GB when Java is using parallel collector

Krystal Mok rednaxelafx at gmail.com
Wed Apr 17 18:33:43 UTC 2013


Hi Thomas,

Could the same kind of update be done for OldSize and SurvivorRatio?
For OldSize, if it's not explicitly set then it'll always show a default
value which is like 5MB or something, regardless of the collector used.
For SurvivorRatio, when using UseParallelGC or UseParallelOldGC, if it's
not explicitly set then InitialSurvivorRatio is the flag that actually
takes effect. It's better if SurvivorRatio could be updated accordingly too.

Thanks,
Kris



On Thu, Apr 18, 2013 at 1:53 AM, Thomas Schatzl
<thomas.schatzl at oracle.com>wrote:

> Hi all,
>
>   could I have some reviews for the change for CR 7057939?
>
> The problem presented in that CR is that if MaxNewSize is not specified on
> the command line, it will never be updated by the internal sizing logic.
>
> So programs like jmap that read MaxNewSize always display uintx_max.
>
> The patch simply updates the MaxNewSize global after the sizing logic
> has been applied for all heaps (in GenCollectorPolicy and
> G1CollectorPolicy) as this problem is not only specific to parallel gc.
>
> The change for G1CollectorPolicy is slightly more complicated because
> there are multiple exits in the constructor of G1YoungGenSizer (where this
> calculation happens).
> Also depending on the sizing goals for G1, a different calculation for
> MaxNewSize has to be applied.
>
> In particular, if NewRatio is defined, the MaxNewSize is MaxHeapSize
> divided by NewRatio, otherwise it is dependent on G1MaxNewSizePercent.
>
> I also moved some asserts from G1YoungGenSizer to checks in argument
> processing as the asserts are actually mandatory (range checking).
>
> Bugs.sun:
> http://bugs.sun.com/view_bug.do?bug_id=7057939
>
> JIRA:
> https://jbs.oracle.com/bugs/browse/JDK-7057939
>
> Webrev:
> http://cr.openjdk.java.net/~tschatzl/7057939/webrev/
>
> Testing:
> jprt, jtreg tests
>
> Thanks,
> Thomas
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/hotspot-gc-dev/attachments/20130418/beff3e34/attachment.htm>


More information about the hotspot-gc-dev mailing list