Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8023656

Bug in G1GC it performs Full GC when code cache is full resulting in overkill

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Incomplete
    • Icon: P3 P3
    • None
    • 7u21
    • hotspot
    • gc
    • linux

      FULL PRODUCT VERSION :
      java version " 1.7.0_21 "
      Java(TM) SE Runtime Environment (build 1.7.0_21-b11)
      Java HotSpot(TM) 64-Bit Server VM (build 23.21-b01, mixed mode)


      FULL OS VERSION :
      Linux version 3.0.1.stk64 (dfn@localhost.localdomain) (gcc version 4.5.1 20100924 (Red Hat 4.5.1-4) (GCC) ) #1 SMP Sat Aug 13 12:53:46 EDT 2011


      EXTRA RELEVANT SYSTEM CONFIGURATION :
      -Duser.timezone=EET
      -XX:+AggressiveOpts
      -XX:+DisableExplicitGC
      -XX:+ParallelRefProcEnabled
      -XX:+PrintGCDateStamps
      -XX:+PrintGCDetails
      -XX:+PrintHeapAtGC
      -XX:+UseAdaptiveSizePolicy
      -XX:+UseCompressedOops
      -XX:+UseFastAccessorMethods
      -XX:+UseG1GC
      -XX:+UseGCOverheadLimit
      -XX:+UseNUMA
      -XX:+UseStringCache
      -XX:CMSInitiatingOccupancyFraction=70
      -XX:GCPauseIntervalMillis=10000
      -XX:InitiatingHeapOccupancyPercent=0
      -XX:MaxGCPauseMillis=500
      -XX:MaxPermSize=512m
      -XX:PermSize=512m
      -XX:ReservedCodeCacheSize=48m
      -Xloggc:gc.log
      -Xmaxf1
      -Xms30G
      -Xmx30G
      -Xnoclassgc
      -Xss4096k


      A DESCRIPTION OF THE PROBLEM :
      For long time, we have had about 10gb more memory than what we need, but about 1-3 times per day in production, the G1GC performs Full GC without any apparent reason.

      Recently we installed Appdynamics profiler which shows also Code Cache memory levels. To our surprise we noticed, that every time the code cache becomes almost full, G1GC performs a Full GC, which we ofcourse consider an overkill because the Full GC takes nearly 60 seconds every time with our memory size!

      See profiler snapshots at:

      http://eisler.vps.kotisivut.com/logs/g1gc-code-cache-full-gc-bug-illustration.png

      The issue is not an isolated occurrence, it occurs daily.

      Similar posts can be found on the web where G1GC performs Full GC with no apparent reason:

      http://grokbase.com/t/openjdk/hotspot-gc-use/1192sy84j5/g1c-strange-full-gc-behavior http://grokbase.com/p/openjdk/hotspot-gc-use/123ydf9c92/puzzling-why-is-a-full-gc-triggered-here

      THE PROBLEM WAS REPRODUCIBLE WITH -Xint FLAG: Did not try

      THE PROBLEM WAS REPRODUCIBLE WITH -server FLAG: Yes

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      See configuration and load curves in http://eisler.vps.kotisivut.com/logs/g1gc-code-cache-full-gc-bug-illustration.png

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      No full gc if memory available.
      REPRODUCIBILITY :
      This bug can be reproduced always.

            Unassigned Unassigned
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: