简体   繁体   中英

how to add CMS GC tuning on weblogic 12c

I understand that weblogic 12C comes with parallel Garbage Collection algorithm. but how and where to add CMS (concurrent mark-sweep collector, concurrent collector) to my current weblogic 12c. Any help is appreciated.

I found answers from Oracle Document. I am pasting here as it going to help other folks.

Tuning Garbage Collection with Sun JDK When using Sun's JDK, the goal in tuning garbage collection performance is to reduce the time required to perform a full garbage collection cycle. You should not attempt to tune the JVM to minimize the frequency of full garbage collections, because this generally results in an eventual forced garbage collection cycle that may take up to several full seconds to complete.

The simplest and most reliable way to achieve short garbage collection times over the lifetime of a production server is to use a fixed heap size with the default collector and the parallel young generation collector, restricting the new generation size to at most one third of the overall heap.

The following example JVM settings are recommended for most engine tier servers:

 -server -Xmx1024m -XX:MaxPermSize=128m -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:+UseTLAB -XX:+CMSIncrementalMode -XX:+CMSIncrementalPacing -XX:CMSIncrementalDutyCycleMin=0 -XX:CMSIncrementalDutyCycle=10 -XX:MaxTenuringThreshold=0 -XX:SurvivorRatio=256 -XX:CMSInitiatingOccupancyFraction=60 -XX:+DisableExplicitGC 

For replica servers, use the example settings:

 -server -Xmx3072m -XX:MaxPermSize=128m -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:+UseTLAB -XX:+CMSIncrementalMode -XX:+CMSIncrementalPacing -XX:CMSIncrementalDutyCycleMin=0 -XX:CMSIncrementalDutyCycle=10 -XX:MaxTenuringThreshold=0 -XX:SurvivorRatio=256 -XX:CMSInitiatingOccupancyFraction=60 -XX:+DisableExplicitGC 

The above options have the following effect:

  • -XX:+UseTLAB—Uses thread-local object allocation blocks. This improves concurrency by reducing contention on the shared heap lock.

  • -XX:+UseParNewGC—Uses a parallel version of the young generation copying collector alongside the concurrent mark-and-sweep collector. This minimizes pauses by using all available CPUs in parallel. The
    collector is compatible with both the default collector and the
    Concurrent Mark and Sweep (CMS) collector.

  • -Xms, -Xmx—Places boundaries on the heap size to increase the predictability of garbage collection. The heap size is limited in
    replica servers so that even Full GCs do not trigger SIP
    retransmissions. -Xms sets the starting size to prevent pauses caused by heap expansion.

  • -XX:MaxTenuringThreshold=0—Makes the full NewSize available to every NewGC cycle, and reduces the pause time by not evaluating tenured
    objects. Technically, this setting promotes all live objects to the
    older generation, rather than copying them.

  • -XX:SurvivorRatio=128—Specifies a high survivor ratio, which goes along with the zero tenuring threshold to ensure that little space is reserved for absent survivors.

You add these to the JVM starting the weblogic servers, this goes into the file startWeblogicServer or startManagedWeblogicServer or setDomainENV

You will find these in the server/bin directory.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM