ParOldGen, old gen full, frequent full gc instead of heap expansion

Jon Masamitsu jon.masamitsu at oracle.com
Wed Sep 12 08:21:15 PDT 2012



On 9/12/2012 6:20 AM, Ion Savin wrote:
> Hi,
>
> I'm using -Xms512m -Xmx2200m -Xmn400m and for some reason even if the old generation is (almost?) full the jvm doesn't grow the heap size above the -Xms value (and with it the old generation size) and instead it does frequent full GCs.
>
> Looking at the heap occupancy after the full gc it seems that the total heap free space is at 32% which is below the 40% default for -XX:MinHeapFreeRatio at which the heap should expand.

UseParallelGC does not use MinHeapFreeRatio.  It controls the generation 
sizes
through the policies in UseAdaptiveSizePolicy.
> Can anyone help me understand why the jvm is behaving this way? Does it have anything to do with the disabled adaptive sizing?

Yes, if UseAdaptiveSizePolicy is turned off, the heap does not grow.

Jon

> There is no OOM exception and the application works OK (except for the total 1000+ seconds duration).
>
> [...] (last minor and first major gc)
>
> 2012-09-12T08:47:23.733+0900: 26502.170: [GC [PSYoungGen: 257277K->40945K(307200K)] 353828K->149380K(421888K), 0.0422890 secs] [Times: user=0.40 sys=0.01, real=0.04 secs]
> 2012-09-12T08:47:23.775+0900: 26502.213: [Full GC [PSYoungGen: 40945K->7139K(307200K)] [ParOldGen: 108434K->114683K(114688K)] 149380K->121823K(421888K) [PSPermGen: 10684K->10663K(21888K)], 0.7935330 secs] [Times: user=5.90 sys=0.07, real=0.79 secs]
>
> [...] (~2900 full gcs between these two and no minor gc)
>
> 2012-09-12T19:36:08.332+0900: 65426.770: [Full GC [PSYoungGen: 204800K->169466K(307200K)] [ParOldGen: 114687K->114687K(114688K)] 319487K->284154K(421888K) [PSPermGen: 10763K->10763K(21248K)], 0.2298050 secs] [Times: user=2.02 sys=0.00, real=0.23 secs]
>
> * jvm version:
>
> java version "1.6.0_31"
> Java(TM) SE Runtime Environment (build 1.6.0_31-b04)
> Java HotSpot(TM) 64-Bit Server VM (build 20.6-b01, mixed mode)
>
> * cmdline flags:
>
> -XX:InitialHeapSize=536870912 -XX:MaxHeapSize=2306867200 -XX:MaxNewSize=419430400 -XX:NewSize=419430400 -XX:ParallelGCThreads=13 -XX:+PrintCommandLineFlags -XX:+PrintGC -XX:+PrintGCDateStamps -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintTenuringDistribution -XX:SurvivorRatio=2 -XX:+TraceClassUnloading -XX:-UseAdaptiveSizePolicy -XX:+UseCompressedOops -XX:+UseParallelGC -XX:+UseParallelOldGC
>
> * jmap -heap output:
> using thread-local object allocation.
> Parallel GC with 13 thread(s)
>
> Heap Configuration:
>     MinHeapFreeRatio = 40
>     MaxHeapFreeRatio = 70
>     MaxHeapSize      = 2306867200 (2200.0MB)
>     NewSize          = 419430400 (400.0MB)
>     MaxNewSize       = 419430400 (400.0MB)
>     OldSize          = 5439488 (5.1875MB)
>     NewRatio         = 2
>     SurvivorRatio    = 2
>     PermSize         = 21757952 (20.75MB)
>     MaxPermSize      = 85983232 (82.0MB)
>
> Heap Usage:
> PS Young Generation
> Eden Space:
>     capacity = 209715200 (200.0MB)
>     used     = 198097304 (188.9203109741211MB)
>     free     = 11617896 (11.079689025878906MB)
>     94.46015548706055% used
> > From Space:
>     capacity = 104857600 (100.0MB)
>     used     = 0 (0.0MB)
>     free     = 104857600 (100.0MB)
>     0.0% used
> To Space:
>     capacity = 104857600 (100.0MB)
>     used     = 0 (0.0MB)
>     free     = 104857600 (100.0MB)
>     0.0% used
> PS Old Generation
>     capacity = 117440512 (112.0MB)
>     used     = 117437840 (111.99745178222656MB)
>     free     = 2672 (0.0025482177734375MB)
>     99.99772480555943% used
> PS Perm Generation
>     capacity = 21757952 (20.75MB)
>     used     = 11023832 (10.513145446777344MB)
>     free     = 10734120 (10.236854553222656MB)
>     50.6657611892884% used
>
> Regards,
>   Ion Savin
> _______________________________________________
> hotspot-gc-use mailing list
> hotspot-gc-use at openjdk.java.net
> http://mail.openjdk.java.net/mailman/listinfo/hotspot-gc-use


More information about the hotspot-gc-use mailing list