GC Flags

Prints all available GC flags:


Don’t JIT huge methods: 

Methods that have more than 2500 lines are considered are huge method.

Impact: Long GC Pauses


CMS Steps:

  1. STW Initial Mark
  2. Concurrent Mark
  3. Concurrent Preclean
  4. STW Remark
  5. Concurrent Sweep
  6. Concurrent Reset

CMS Flags:


Default on: -XX:+CMSParallelRemarkEnabled

Default on: -XX:+UseParNewGC

Default on: -XX:+CMSConcurrentMTEnabled




(< 1.8) -XX:+CMSPermGenSweepingEnabled

-XX:+ExplicitGCInvokesConcurrent or  -XX:+ExplicitGCInvokesConcurrentAndUnloadsClasses

Trigger minor collection before Remark Phase in CMS:(off by default)

Impact is Remark phase might be longer. Remember Remark phase is Stop The World.


Ref: http://blog.sokolenko.me/2014/11/javavm-options-production.html


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s