Skip to content
Preptima
hardConceptScenarioSeniorStaffLead

Your GC log shows a stop-the-world pause far longer than the collection work inside it. Where did the rest of the time go?

Most likely into reaching the safepoint. Every application thread has to arrive at a poll point before the operation can begin, and one late thread stalls all of them, so the pause is time-to-safepoint plus the actual work. Safepoint logging separates the two.

5 min readUpdated 2026-08-15Target archetype: Big Tech, Enterprise Captive, Product Startup

Answer

Short answer

A Java GC pause can be longer than the collection work because the JVM first waits for every application thread to reach a safepoint. Diagnose the difference with safepoint logging so you can separate time-to-safepoint from actual garbage collection time before changing collectors or heap settings.

Was this answer helpful?

Likely follow-ups

  • Why does a thread blocked inside a native call not need to be interrupted for a safepoint to begin?
  • What does loop strip mining change about a counted loop, and what does it cost?
  • How would you identify which thread is arriving late, rather than only that one is?
  • Which JVM operations besides collection require a global safepoint?

Related questions

Further reading