A Work in Progress

When you execute "java ..." you get some number of garbage collection (GC) threads. If you want to know how many GC threads, you can execute java -XX:+PrintFlagsFinal -version and look for ParallelGCThreads in the output (of which there will be plenty). You will find something like uintx ParallelGCThreads := 23 {product} If the number of GC threads you see looks way too big to you, this note may be of some interest. That number of GC threads is some fraction of the number...

Thursday, September 29, 2016 | Java | Read More

The Unspoken - The Why of GC Ergonomics

Do you use GC ergonomics, -XX:+UseAdaptiveSizePolicy, with the UseParallelGC collector? The jist of GC ergonomics for that collector is that it tries to grow or shrink the heap to meet a specified goal. The goals that you can choose are maximum pause time and/or throughput. Don't get too excited there. I'm speaking about UseParallelGC (the throughput collector) so there are definite limits to what pausegoals can be achieved. When you say out loud "I don't care about pause...

Friday, June 28, 2013 | Java | Read More

The Unspoken - Application Times

Sometimes it is interesting to know how long your application runs between garbage collections. That can be calculated from the GC logs but a convenient way to see that information is through the command line flags -XX:+PrintGCApplicationStoppedTime and -XX:+PrintGCApplicationConcurrentTime. Adding these to your command line produces output such as this. Application time: 0.2863875 secondsTotal time for which application threads were stopped: 0.0225087 secondsApplication...

Thursday, April 18, 2013 | Java | Read More

The Unspoken - CMS and PrintGCDetails

What follows is an example of the GC logging output with CMS (UseConcMarkSweepGC) and PrintGCDetails plus some explanation of the output. The "CMS-initial-mark" indicates the start of a CMS concurrent collection. [GC [1 CMS-initial-mark: 463236K(515960K)] 464178K(522488K), 0.0018216 secs] [Times: user=0.01 sys=0.00, real=0.00 secs] 463236K above is the space occupied by objects in the old (CMS) generation at the start of the collection. Not all those objects are necessarily...

Wednesday, February 13, 2013 | Java | Read More

The Unspoken - Phases of CMS

CMS (-XX:+UseConcMarkSweepGC) or the concurrent mark sweep GC could have been called the mostly concurrent mark sweep GC and here's why. These are the phases of a CMS concurrent collection. 1. Initial mark. This is the the start of CMS collection. This is a stop-the-world phase. All the applications threads are stopped and CMS scans the application threads (e.g. the thread stacks) for object references. 2. Concurrent mark. This is a concurrent phase. CMS restarts all the...

Monday, February 11, 2013 | Java | Read More

Really? iCMS? Really?

When I use the term iCMS, I'm referring to the incremental mode of CMS (-XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode). This is a mode of CMS where the concurrent phases (concurrent marking and concurrent sweeping) are run in short increments (does some work, yields and sleeps for a while, then runs again). It was implemented in CMS primarily for use on platforms with a single hardware thread. The concurrent phases are typically long (think seconds and not milliseconds).If...

Tuesday, November 1, 2011 | Java | Read More
 

Visit the Oracle Blog

 

Contact Us

Oracle

Integrated Cloud Applications & Platform Services