Skip to content

Instantly share code, notes, and snippets.

@EliFuzz
Created June 23, 2023 15:41
Show Gist options
  • Save EliFuzz/5cd59fa986e0a94770a528744d8efc97 to your computer and use it in GitHub Desktop.
Save EliFuzz/5cd59fa986e0a94770a528744d8efc97 to your computer and use it in GitHub Desktop.
Comparison table for Garbage Collector Types
Type Threads Stop-the-world Concurrent Throughput Latency Memory Fragmentation Tuning JVM arguments
Serial Single Yes No Low High Low Low Easy -XX:+UseSerialGC
Parallel Multiple Yes No High High High Low Moderate -XX:+UseParallelGC
CMS Multiple Yes (briefly) Yes (mostly) Moderate Low Moderate High Difficult -XX:+UseConcMarkSweepGC
G1 Multiple Yes (briefly) Yes (mostly) High Low High Low Moderate -XX:+UseG1GC
ZGC Multiple No Yes (fully) High Ultra-low Very high Low Easy -XX:+UseZGC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment