Profile Image
Kousika M

Frequent 'Full GC - Ergonomics'

We are facing an issue in our production application. 'Full GC - Ergonomics' events are being triggered frequently even though we have already set Xmx and Xms to the same value. Can you please advise us how to fix this issue?

 

Here is our GC log analysis report:

 

 

Here are the JVM Parameters we pass to our application:

 

-Xms25g 
-Xmx25g 
-Xmn12g 
-XX:+HeapDumpOnOutOfMemoryError 
-XX:+DisableExplicitGC 
-XX:+PrintGCDetails 
-XX:+PrintGCDateStamps 
-XX:+PrintGCTimeStamps 
-Xloggc:<path>

 

Thank you and we look forward to your valuable input.

  • fullgc-ergonomics

  • gclog

  • frequentfullgc-ergonomic

  • xmx

  • xms

  • parallelgc

  • garbagecollectiontuning

  • useadaptivesizepolicy

Please Sign In or to post your comment or answer

Profile Image

Ram Lakshmanan

Hello Kousika!
 Greetings.
a. Your application is using the 'Parallel GC' algorithm. Even though you didn't explicitly configure it, your application is using the 'Parallel GC' algorithm. This is the default algorithm for server class JVMs that are running on Java 8 or below.

 

b. When it comes to garbage collection tuning, one of the key performance metrics to study is: 'GC Throughput percentage' - it indicates how much time an application is spending in garbage collection vs how much time it's spending in processing customer transactions. If your application's GC Throughput is 98%, it indicates your application is spending 98% of its time in processing customer transactions and remaining 2% of time in processing GC activity. 

 

c. In Parallel GC, you can set the GC throughput goal by passing the JVM argument '-XX:GCTimeRatio=<N>', which sets the ratio of garbage collection time to application time to 1 / (1 + <N>). For example, -XX:GCTimeRatio=19 sets a goal of 1/20 or 5% of the total time in garbage collection. The default value is 99, resulting in a goal of 1% of the time in garbage collection. This is exactly happening in your application. According to the GCeasy analysis report, your GC throughput is 99.475%. To keep up with GC throughput goal 'Full GC - ergonomics' is frequently triggered.

 

Potential solutions to address 'Full GC - ergonomics'

 

1. You set '-XX:GCTimeRatio=19' or something like that, so that GC throughput goal will be relaxed, it will minimize the number of time 'Full GC - ergonomics' runs

 

2. You can pass this '-XX:-UseAdaptiveSizePolicy' JVM argument. When you pass this argument, all the default ergonomic goals such as 1% GC throughput governed by '-XX:GCTimeRatio' will not be governed. It has high potential to eliminate the frequent Full GCs your application is experiencing today.

 

3. Your average pause time is 3.58 seconds and 10 GC events are taking more than 5 seconds. This performance characteristics might be acceptable for most applications. If it's acceptable to you, you can continue as is, because you are enjoying very good GC throughput today

Got something else on mind? Post Your Question

Not the answer you're looking for? Browse other questions tagged
  • fullgc-ergonomics

  • gclog

  • frequentfullgc-ergonomic

  • xmx

  • xms

  • parallelgc

  • garbagecollectiontuning

  • useadaptivesizepolicy