Why does G1GC do Full GC when it only needs 40 bytes?
YU ZHANG
yu.zhang at oracle.com
Mon Jun 9 05:55:55 UTC 2014
Martin,
The log shows full gc happened when it tries to satisfy a 40 byte
allocation request.
-XX:InitiatingHeapOccupancyPercent=0 should trigger concurrent gcs too
much.
What is the jdk version? Can you share the gc log?
Thanks,
Jenny
On 6/7/2014 1:03 AM, Martin Makundi wrote:
> Why does G1GC do Full GC when it only needs only 40 bytes?
>
> Is there a way to tune this so that it would try to free up "some"
> chunk of memory and escape the full gc when enough memory has been
> freed? This would lower the freeze time?
>
> See logs:
>
> [Times: user=12.89 sys=0.16, real=1.25 secs]
> 2014-06-06T17:11:48.727+0300: 34022.631: [GC
> concurrent-root-region-scan-start]
> 2014-06-06T17:11:48.727+0300: 34022.631: [GC
> concurrent-root-region-scan-end, 0.0000180 secs]
> 2014-06-06T17:11:48.727+0300: 34022.631: [GC concurrent-mark-start]
> 34022.632: [G1Ergonomics (Heap Sizing) attempt heap expansion,
> reason: allocation request failed, allocation request: 40 bytes]
> 34022.632: [G1Ergonomics (Heap Sizing) expand the heap, requested
> expansion amount: 8388608 bytes, attempted expansion amount: 8388608
> bytes]
> 34022.632: [G1Ergonomics (Heap Sizing) did not expand the heap,
> reason: heap expansion operation failed]
> {Heap before GC invocations=1867 (full 1):
> garbage-first heap total 31457280K, used 31453781K
> [0x00007f1724000000, 0x00007f1ea4000000, 0x00007f1ea4000000)
> region size 8192K, 0 young (0K), 0 survivors (0K)
> compacting perm gen total 524288K, used 166271K [0x00007f1ea4000000,
> 0x00007f1ec4000000, 0x00007f1ec4000000)
> the space 524288K, 31% used [0x00007f1ea4000000,
> 0x00007f1eae25fdc8, 0x00007f1eae25fe00, 0x00007f1ec4000000)
> No shared spaces configured.
> 2014-06-06T17:11:48.728+0300: 34022.632: [Full GC 29G->13G(30G),
> 47.7918670 secs]
>
>
> Settings:
>
> -server -XX:InitiatingHeapOccupancyPercent=0 -Xss4096k
> -XX:MaxPermSize=512m -XX:PermSize=512m -Xms20G -Xmx30G -Xnoclassgc
> -XX:-OmitStackTraceInFastThrow -XX:+UseNUMA
> -XX:+UseFastAccessorMethods -XX:ReservedCodeCacheSize=128m
> -XX:-UseStringCache -XX:+UseGCOverheadLimit -Duser.timezone=EET
> -XX:+UseCompressedOops -XX:+DisableExplicitGC -XX:+AggressiveOpts
> -XX:CMSInitiatingOccupancyFraction=70 -XX:+ParallelRefProcEnabled
> -XX:+UseAdaptiveSizePolicy -XX:MaxGCPauseMillis=500 -XX:+UseG1GC
> -XX:G1HeapRegionSize=8M -XX:GCPauseIntervalMillis=10000
> -XX:+PrintGCDetails -XX:+PrintHeapAtGC -XX:+PrintAdaptiveSizePolicy
> -XX:+PrintGCDateStamps -XX:+PrintGC -Xloggc:gc.log
>
>
> _______________________________________________
> 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/20140608/e0ad20d6/attachment.html>
More information about the hotspot-gc-use
mailing list