CMS large objects vs G1 humongous allocations

Thomas Schatzl thomas.schatzl at oracle.com
Wed Feb 1 13:10:28 UTC 2017


Hi Amit,

On Tue, 2017-01-31 at 22:04 +0530, Amit Balode wrote:
> File is a bit huge:) linked it here https://raw.githubusercontent.com
> /amitbalode/uploads/master/amit.txt
> 

  some observations:

- some humongous objects; not sure if increasing heap region size helps
- as for the evacuation failures, I think they can be avoided by
capping the maximum young gen size. Every time this happens, the young
gen is really large, however it seems that according to heap size
calculations the surviving objects should actually have enough space.
It does not because the humongous objects may take up too much space,
and at least the printing does not take that into account.

I remember discussing this or similar issues in the past, not sure if
it has been fixed in one way or another in the meantime.

Anyway, capping young gen should be able to avoid this issue at least
some times. Try setting -XX:G1MaxNewSizePercent to something lower than
the default 60%.

Thanks,
  Thomas



More information about the hotspot-gc-use mailing list