Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

262
Views
Java GC - Is Minor GC Collection a STW event?

Does GC need to “Stop The World” for Minor GC or only for Full GC? As I understand, a minor GC will happen when there is no space available in EDEN to allocate an object, so does that mean that for each minor GC there will be a STW event?

over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

The answer is "it depends".

With most modern Java collectors, a minor (young / Eden space) collection is indeed a stop-the-world collection. This is not a direct logical consequence of minor GC's being triggered by a young space filling up. (Other strategies are possible for triggering a minor GC, or for dealing with a young space filling up.) Rather it is just ... they way that most Java GCs are implemented.

One exception is ZGC which is not generational. Hence there is no such thing as a minor collection. Instead, when the GC is triggered there is a short (less than 10ms) stop the world event while the GC roots are found. A second exception is the Shenandoah GC, which is likewise not generational.

(And of course, the original Java 1.1 GC was a mark-sweep collector, non-generational and stop-the-world.)

over 4 years ago · Santiago Trujillo Report

0

After reading several books I found that a Minor GC is always a Stop The World event, which will stop all the application threads and will normally have a short duration, as opposed to a GC pause for Full GC, which will take considerably much more time because it will run on Both Young and Old generations. So both Minor GC and Full GC are always Stop the World events.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!