G1gc compaction algorithm
Yu Zhang
yu.zhang at oracle.com
Wed Jul 16 05:29:32 UTC 2014
Martin,
Humongous objects are treated specially. They are not collected in
young gc.
By definition, if the object size > 1/2 region size, it is humongous
object. If the object size is just a little over 1/2 region size, then
the fragmentation could be high.
One trick we can do is to increase region size (-XX:G1HeapRegionSize) so
that we do not see much humongous allocation. Do you know the size of
the humongous objects? If you use -XX:+PrintAdaptiveSizePolicy, you can
see that information.
The humongous objects are handled better in latest jdk8, and more
improvement under development.
Thanks,
Jenny
On 7/15/2014 8:45 PM, Martin Makundi wrote:
> Hi!
>
> Humongous allocation fails when there is not enough contiguous free
> space in memory.
>
> How does g1gc compaction algorithm work, does it compact only within a
> region or does it attempt to compact in a whole-heap-defragmentation
> way? The latter would reduce the probability of "humongous allocation
> failure". And if this is possible, is there a parameter/s that can be
> changed to tune this?
>
> **
> Martin
>
>
> _______________________________________________
> hotspot-gc-use mailing list
> hotspot-gc-use at openjdk.java.net
> http://mail.openjdk.java.net/mailman/listinfo/hotspot-gc-use
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/hotspot-gc-use/attachments/20140715/5b9d1b80/attachment.html>
More information about the hotspot-gc-use
mailing list