答复: Re: [HTML]my CMS incremental duty cycle can't be controll by GCparameter settings

Bond Chen Bond.Chen at lombardrisk.com
Fri Aug 31 20:50:39 PDT 2012


Hi Sri,

Thanks for your help, now I know where the issue is.

By default the CMSIncrementalPacing is true, so JVM will automatically
adjust the duty cycle, which explain why I still see high icms value
when I set the duty cycle to 3

BTW, an official doc at Oracle website says the default is false.


Thanks again for this
Bond
 

>>> Srinivas Ramakrishna <ysr1729 at gmail.com> 12年08月30日 下午 16:04 >>>
Bond --

On Wed, Aug 29, 2012 at 7:40 PM, Bond Chen
<Bond.Chen at lombardrisk.com>wrote:

>  Dear All & Sri,
> Our application have encountered very long GC pause, from the GC
analysis,
> I found the CMS takes 20-30 minutes to get finished by the value of
> icms_dc=1230 seconds, so the solution is to reduce this value, to let
CMS
> finished ASAP, by reading a doc on oracle website about the CMS
> incremental mode, I want to have a concept demonstration test, but the
> result confusing me.
>

Not really. If you want the CMS cycled to finish as soon as possible you
should increase the duty cycle, not decrease it. (The idea is that the
duty-cycle defines the %ge of "concurrent time" that the ICMS thread
will
be eligible to run.)

    -XX:CMSIncrementalDutyCycle=50

will, for example, let it run 50% of the time between two scavenges.

Then, you have to turn off the automatic duty-cycle control that ICMS
does,
if you want  to maintain that duty cycle value whenever ICMS runs:-

  -XX:-CMSIncrementalPacing

I believe the min value sets a lower bound on the duty-cycle when
incremental pacing is on. It just sets a floor under which the
duty-cycle
will never go.
Yes, I know, it's kind of asymmetric, and I can't recall the thinking
behind that, but it should be possible, i guess to bound the cycle
between
two values
if you really wanted to make that modification. Ah, now I remember...
the
idea is that concurrent mode failure is bad, so escalating the
duty-cycle
to as much as 100%
should be permitted rather than bound it from above, lose the race and
cause a concurrent mode failure.

Here's the set of relevant options:-

$ java -XX:+PrintFlagsFinal -version | grep CMSIncremental
    uintx CMSIncrementalDutyCycle                   = 10
{product}
    uintx CMSIncrementalDutyCycleMin                = 0
{product}
     bool CMSIncrementalMode                        = false
{product}
    uintx CMSIncrementalOffset                      = 0
{product}
     bool CMSIncrementalPacing                      = true
{product}
    uintx CMSIncrementalSafetyFactor                = 10
{product}
java version "1.7.0_05"
Java(TM) SE Runtime Environment (build 1.7.0_05-b05)
Java HotSpot(TM) 64-Bit Server VM (build 23.1-b03, mixed mode)

-- ramki


>
> *1)I have the set 3 CMS incremental parameters:*
>  -XX:+CMSIncrementalMode -XX:CMSIncrementalDutyCycleMin=0
> -XX:CMSIncrementalDutyCycle=3
>
>    My expectation is:
>      the icms_dc value in the gc log should be in range 0-3
>
>    Actual results:
>      the icms_dc value are out of the range
>
>
>
>
> *2)All vm options:*
> VM arguments: -Dprogram.name=run.sh -Xms6072M -Xmx6072M
-XX:PermSize=512m
> -XX:MaxPermSize=512m -Xss1024k -XX:+UseParNewGC
-XX:+UseConcMarkSweepGC
> -XX:+CMSParallelRemarkEnabled -XX:+UseTLAB -XX:+CMSIncrementalMode
> -XX:ParallelGCThreads=6 -XX:CMSIncrementalDutyCycleMin=0
> -XX:CMSIncrementalDutyCycle=3 -XX:MaxTenuringThreshold=32
> -XX:+PrintTenuringDistribution -XX:CMSInitiatingOccupancyFraction=50
> -Xmn1700m -XX:+UseLargePages -XX:LargePageSizeInBytes=64k
> -XX:+UseCMSInitiatingOccupancyOnly -XX:+PrintGCDetails
> -XX:+PrintGCApplicationStoppedTime -Xloggc:./gc_10_20120902171712.log
> -Dsun.rmi.dgc.server.gcInterval=18000000
> -Dsun.rmi.dgc.client.gcInterval=18000000 -verbose:gc
>
-Djava.library.path=/export/home/test/server/colline/cluster/jboss/server/2011.2.0.0.3/lib/valuation-lib:/export/home/test/server/colline/cluster/jboss/server/2011.2.0.0.3/firmament
>
-Djava.endorsed.dirs=/export/home/test/server/colline/cluster/jboss/lib/endorsed
>
-Djavax.manageme> -Djboss.platform.mbeanserver -Dcom.sun.management.jmxremote.port=1234
> -Dcom.sun.management.jmxremote.authenticate=false
> -XX:+ExplicitGCInvokesConcurrent -XX:+PrintTenuringDistribution
> -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -XX:+PrintHeapAtGC
> -XX:+PrintPromotionFailure -XX:PrintFLSStatistics=2
> -Djboss.cluster.number=4 -Djboss.cluster.monitor.switch=y
> -Djboss.messaging.groupname=MessagingPostOffice
-Djboss.partition.name=UATPartition_RH
> -Djboss.messaging.serverpeerid=10 -Djboss.web.lb.nodeid=nodee
> -Djboss.home.dir=/export/home/test/server/colline/cluster/jboss -
> Djboss.profile.name=2011.2.0.0.3
-Djboss.cluster.node1.addr=172.20.30.8
> -Djboss.cluster.node2.addr=172.20.30.11
> -Djboss.cluster.node3.addr=172.20.30.16
> -Djboss.cluster.node4.addr=172.20.30.10
-Djboss.cluster.port_hacluster=7800
> -Djboss.cluster.port_jbmdata=7900 -Djboss.cluster.port_jbmcontrol=7910
> -Djboss.cluster.port_invalidationcache=7920
> -Djboss.cluster.port_replicationcache=7930
> -Djboss.messaging.consumer_count=3 -Djboss.jndi.port=1099
> -Djboss.hajndi.port=1100
>
-Dcollateral_config=/export/home/test/server/colline/cluster/bin/collateral.properties
> -DIGNORE_FQN=/marketdata/FxRates,/marketdata/EODFxRates
> -Ddatasource.min.pool.size=5 -Ddatasource.max.pool.size=150
> -Djboss.partition.udpGroup=230.1.0.4
> -Dcom.sun.management.jmxremote.port=5004
> -Dcom.sun.management.jmxremote.ssl=false
> -Dcom.sun.management.jmxremote.authenticate=false
>
-Djavax.management.builder.initial=org.jboss.system.server.jmx.MBeanServerBuilderImpl
> -Djboss.platform.mbeanserver
>
-Djava.endorsed.dirs=/export/home/test/server/colline/cluster/jboss/lib/endorsed
>
>
>
>
> *3)GC logs:*
> -bash-3.00$ cat gc_10_20120902004701.log |grep icms
>  icms_dc=0 , 0.1387250 secs] [Times: user=0.35 sys=0.20, real=0.14
secs]
>  icms_dc=0 , 0.3590387 secs] [Times: user=0.90 sys=0.43, real=0.36
secs]
>  icms_dc=15 , 0.5206302 secs] [Times: user=1.31 sys=0.46, real=0.52
secs]
>  icms_dc=30 , 0.2350382 secs] [Times: user=0.76 sys=0.01, real=0.24
secs]
>  icms_dc=45 , 0.4883827 secs] [Times: user=1.38 sys=0.37, real=0.49
secs]
>  icms_dc=41 , 0.7013340 secs] [Times: user=0.92 sys=0.05, real=0.70
secs]
>
>
> *4)JVM version:*
> -bash-3.00$ java -version
> java version "1.6.0_21"
> Java(TM) SE Runtime Environment (build 1.6.0_21-b06)
> Java HotSpot(TM) Server VM (build 17.0-b16, mixed mode)
> -bash-3.00$ ./launch_bondGCParameter.sh
>
> Regards,
> Bond
>
> This e-mail together with any attachments (the "Message") is
confidential and may contain privileged information. If you are not the
intended recipient (or have received this e-mail in error) please notify
the sender immediately and delete this Message from your system.  Any
unauthorized copying, disclosure, distribution or use of this Message is
strictly forbidden.
>
>
>


This e-mail together with any attachments (the "Message") is confidential and may contain privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and delete this Message from your system.  Any unauthorized copying, disclosure, distribution or use of this Message is strictly forbidden.



More information about the hotspot-gc-use mailing list