javagarbage-collectionjvmg1gc

Does G1 GC in Young generation halts the application


We use corretto java and using G1 gc.

As far as I know, the gc algorithms do halts the application while doing full gc for sometime not while young generation as it happens more frequently.

But some of articles mentioned that G1 gc halts the application in young generation too at the beginning of the GC to do some quick bookkeeping before it immediately resumes the application. Is it true ? Because during this time our health check failed and our Auto scaling group triggered scale out event.

Is it true that G1 gc in young generation halts the application ?


Solution

  • G1 Young phase includes two stop-the-world steps (marking and cleanup). It also includes some steps (Concurrent Start) which are concurrent.

    So I would answer your question: yes, Young Collection halts/stop-the-world your application.

    You can check G1 specifics here