0

we are currently using G1GC which does not honour/support UseGCOverheadLimit, so our app is sometimes completely stuck in GC-thrashing and the jvm never aborts/crashes.

Just checking which options we do have, according to this overview the latest GC is ZGC but I can't find anything whether ZGC actually supports the overhead limit?

hotzen
  • 2,800
  • 1
  • 28
  • 42
  • 1
    Just few questions to understand the context and how you concluded that the JVM got stuck in GC. 1- What version of Oracle JDK are you using? 2- What JVM options are you using? 3- Did you enable GC log file (**) to understand the behavior of this JVM ? * Given you asked for ZGC (debuted in Java 11), GC log file is enabled with: a- G1: -Xlog:gc*:time,gc+phases=debug:file=gc.log OR b- non-G1: -Xlog:gc*:file=gc.log – Mario.Cadiz Sep 08 '22 at 17:51

1 Answers1

1

Use this simple command to verify if that JVM option is enabled:

java -XX:+PrintFlagsFinal -XX:+UseZGC -version | grep -i Overhead
     bool UseGCOverheadLimit                       = true                                      {product} {default}
java version "17.0.3.1" 2022-04-22 LTS
Java(TM) SE Runtime Environment (build 17.0.3.1+2-LTS-6)
Java HotSpot(TM) 64-Bit Server VM (build 17.0.3.1+2-LTS-6, mixed mode, sharing)
Mario.Cadiz
  • 178
  • 12