Bug in G1GC it performs Full GC when code cache is full resulting in overkill
Charlie Hunt
chunt at salesforce.com
Tue May 28 11:00:48 PDT 2013
Hi Martin,
On the subject of cmd line options ...
Here's a list of options that I think look a bit questionable, and I'd like to understand why you feel the need to set them:
-XX:+UseFastAccessorMethod (the default is disabled)
-XX:+UseNUMA (Are you running a JVM that spans NUMA memory nodes? Or, do you have multiple JVMs running on a NUMA or non-NUMA system?)
-XX:+UseStringCache (Do you have evidence that this helps? And, do you know what it does?)
-XX:CMSInitiatingOccupancyFraction=70 (This is applicable to CMS GC, and not applicable to G1 GC)
-XX:GCPauseIntervalMillis=10000 (Would like to understand the justification for setting this, and to a 10 second value. This will impact G1.)
-XX:InitiatingHeapOccupancyPercent=0 (You realize this will force G1's concurrent cycle to run continuously?)
-Xmaxf1 (I've never seen this used before, can you share what you it does and what you expect it to do?)
-noclassgc (This is rarely needed and haven't seen an app that required it for quite some time)
These you don't need to set as they are the default with 1.7.0_21 when you specify -XX:+UseG1GC, hence you can remove them:
-XX:+UseAdaptiveSizePolicy
-XX:+UseCompressedOops (this gets auto-enabled based on the size of the Java with 64-bit JVMs --- and you might realize slightly better performance if you can run with -Xmx26g / -Xms26g, that should give you zero base compressed oops)
-XX:+ UseGCOverheadLimit
-XX:+ReservedCodeCacheSize=48, that is the default for 7u21. You might consider setting it higher if you have the available space, and more importantly if you think you're running out of code space.
thanks,
charlie ...
On May 26, 2013, at 10:20 AM, Martin Makundi wrote:
> Sorry, forgot to mention, using:
>
> 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)
>
> Linux version 3.0.1.stk64 (dfn at 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
>
> -Dclassworlds.conf=/usr/share/maven/maven/bin/m2.conf
> -Dmaven.home=/usr/share/maven/maven
> -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
>
>
> **
> Martin
>
> 2013/5/26 Charlie Hunt <chunt at salesforce.com>:
>> Which version of the JDK/JRE are you using?
>>
>> One of the links you referenced below was using JDK 6, where there is no official support for G1. The other link suggests it could have been RMI DGC or a System.gc().
>>
>>
>>
>> Sent from my iPhone
>>
>> On May 25, 2013, at 11:43 PM, "Martin Makundi" <martin.makundi at koodaripalvelut.com> wrote:
>>
>>> it occurs daily.
More information about the hotspot-gc-use
mailing list