Skip to content
Ameen Abozaid
Planned lessonMID-002-L03

Collectors: G1, ZGC, Parallel

  • Lesson 3 of 7
  • Mid-level
On This Lesson 4 topics

This lesson is planned. The outline below lists the topics it will cover. The full lesson has not been published yet.

In this lesson

pick a collector for a latency or throughput goal.

Planned topics

  • Parallel GC: maximizes throughput with stop-the-world pauses; good for batch jobs.
  • G1: region-based, targets a pause goal (-XX:MaxGCPauseMillis); the default in modern JDKs; a sound general choice.
  • ZGC: concurrent, very short pauses even on large heaps; trades some throughput and memory; generational mode in newer JDKs (verify version before recording).
  • Choose from a requirement (p99 latency, throughput), then measure.
  • Do not switch collectors without a baseline.
Draft outline details

Demonstration

GoalStart with
Batch throughputParallel
Typical web APIG1
Strict latency, big heapZGC

Check your understanding

Which collector for a nightly import with no latency target?

Show answer

Parallel.

Practice

Apply this lesson with the module's lab, exercises and quiz.

Lab and exercises Quiz

Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.

Continue to next lesson

Type to search levels, phases, modules and lessons.