Sobes.tech
Senior

Why did you not use ZGC or Shenandoah?

sobes.tech AI

Answer from AI

The choice of garbage collector depends on the project requirements and the runtime environment. ZGC and Shenandoah are modern low-latency garbage collectors that minimize pauses, but they may have increased memory consumption or be less stable on certain JVMs or versions.

Possible reasons not to use ZGC or Shenandoah:

  • Compatibility requirements with the JVM version used, where these GCs are not yet supported or are unstable.
  • The application does not experience GC pause issues, and the current collector is satisfactory.
  • Memory constraints or other system requirements where ZGC/Shenandoah are not optimal.
  • The need for predictable behavior, where a proven GC is preferable.

Thus, the choice of garbage collector is a trade-off between delays, resource usage, and stability, and the decision is made based on the specific conditions of the project.