0 Replies Latest reply: Sep 13, 2013 2:55 AM by ThomasSchumacher RSS

    JDK 1.7.0_40, G1 Full GC due to failed humongous allocation request

    ThomasSchumacher


      Hi all,

       

      Though G1 behavior and performance has improved in the latest JDK, we're facing a few Full GCs within a 24h period.

      All Full GC shows the same log entries: G1 tries twice to allocate humongous space, fails and finally decides to do a full collect.

       

      31923.180: [G1Ergonomics (Heap Sizing) attempt heap expansion, reason: humongous allocation request failed, allocation request: 67108880 bytes]

      31923.180: [G1Ergonomics (Heap Sizing) expand the heap, requested expansion amount: 62914560 bytes, attempted expansion amount: 62914560 bytes]

      31923.180: [G1Ergonomics (Heap Sizing) did not expand the heap, reason: heap expansion operation failed]

      31923.180: [G1Ergonomics (Heap Sizing) attempt heap expansion, reason: allocation request failed, allocation request: 67108880 bytes]

      31923.180: [G1Ergonomics (Heap Sizing) expand the heap, requested expansion amount: 67108880 bytes, attempted expansion amount: 71303168 bytes]

      31923.180: [G1Ergonomics (Heap Sizing) did not expand the heap, reason: heap expansion operation failed]

      2013-09-13T00:27:08.454+0200: 31923.180: [Full GC 11G->7931M(23G), 24.7367670 secs]

       

      We don't quite understand why G1 thinks he must do a Full GC at this time. The GC right before the Full GC shows that there should be plenty of space to fullfill the little 67MB request:

      [Eden: 448.0M(1096.0M)->0.0B(1104.0M) Survivors: 104.0M->96.0M Heap: 11.9G(23.4G)->11.3G(23.4G)]

       

      Here are our JVM settings:

      -Xms24000m

      -Xmx24000m

      -XX:PermSize=320m

      -XX:MaxPermSize=320m

      -XX:+UseG1GC

      -XX:MaxGCPauseMillis=300

      -XX:InitiatingHeapOccupancyPercent=0

      -XX:+DisableExplicitGC

      -XX:ReservedCodeCacheSize=128m

      -XX:InitialCodeCacheSize=128m

      -XX:-UseCodeCacheFlushing

      -XX:G1RSetRegionEntries=512

      -XX:G1HeapRegionSize=4m

      -XX:+PrintGCDateStamps

      -XX:+PrintGCApplicationStoppedTime

      -XX:+PrintGCApplicationConcurrentTime

      -XX:+PrintGCDetails

      -XX:+PrintTenuringDistribution

      -XX:+PrintAdaptiveSizePolicy

      -XX:+UnlockDiagnosticVMOptions

      -XX:+UseGCLogFileRotation

      -XX:NumberOfGCLogFiles=6

      -XX:GCLogFileSize=40M

      -XX:+G1SummarizeRSetStats

      -XX:G1SummarizeRSetStatsPeriod=1000

      -verbose:gc

       

      Any comments on this are appreciated.

       

      Regards

      Thomas

       

      Typo fixed