NOTE

1.2 STW

Historical notes on what STW is, why it happens during GC, and the question of how to reduce it.

Garbage Collection / RuntimeCreated Updated 1 min readhistorical

This is a historical learning note and may contain outdated or incomplete understanding.

1. What Is STW?

GC causes the application to be unable to respond externally.

2. Why Does STW Happen?

In a language with GC, there are at least two threads: the user thread and the GC thread. The user thread creates objects and GC reclaims objects. If the two threads execute concurrently, objects that are not garbage may be reclaimed, so the user thread is paused during GC.

3. How to Solve STW

Discussion

Sign in with GitHub to comment. Discussions are stored as GitHub Issues.View on GitHub