Java garbage collection low throughput
Issue
- Garbage collection (GC) maximum response time is relatively small (less than 6 seconds); however, overall throughput is not very good (below 95%), and there are stretches when almost all time is spent doing GC, one full GC after another.
-
There is one young collection after another, many times per second, with very few old collections.
-
There are old collections when the old generation is not full. For example:
25.180: [Full GC (System) 25.180: [CMS: 115K->115K(63872K), 0.0172770 secs] 116K->115K(83008K), [CMS Perm : 2728K->2728K(21248K)], 0.0174030 secs] [Times: user=0.02 sys=0.00, real=0.01 secs]
-
There are young and old collections paired together when neither the young, old, nor permanent generations are full. For example:
2011-09-01T14:50:43.615-0400: 30.153: [GC [PSYoungGen: 0K->0K(14016K)] 115K->115K(46144K), 0.0003020 secs] [Times: user=0.00 sys=0.00, real=0.01 secs] 2011-09-01T14:50:43.617-0400: 30.155: [Full GC (System) [PSYoungGen: 0K->0K(14016K)] [PSOldGen: 115K->115K(32128K)] 115K->115K(46144K) [PSPermGen: 2727K->2727K(21248K)], 0.0093540 secs] [Times: user=0.01 sys=0.00, real=0.00 secs]
-
Frequent full GC occuring in logs even though the heap space does not appear to be exhausted
- Why is FULL GC being triggered in spite of enough space available in the JVM?
Environment
- OpenJDK
- Oracle/Sun JDK
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.