1

We need help regarding G1GC Algorithm , can we use this GC for low heap size around 1GB or this is only for bigger heap.

We want to use this GC because we are getting "GC overhead limit exceeds" and application using the default GC collector.

1 Answers1

1

I assume you still use OpenJDK 8 and the Parallel garbage collector (otherwise the default is G1 already). It is difficult to generalize things, but G1 tends to benefit more from additional headroom than the parallel collector. If the heap size is already tight, switching to G1 will likely make things worse. On other hand, if your workload benefits a lot from G1 string deduplication (which needs to be enabled explicitly with -XX:+UseStringDeduplication), G1 may indeed be the better option.

In any case, you probably should upgrade to OpenJDK 11 if you want to use G1 because of the many improvements there.

Florian Weimer
  • 32,022
  • 3
  • 48
  • 92