
JVM Cheat Sheet (as a meme)

JVM cheat sheet (as meme)
Save it and never use it
Working with Java you’ve probably heard that Garbage Collection is a Stop The World event.
This is probably because some Java developers religiously believe that JVM is the whole world to them, I don’t know.
Since the GC has been split into a minor and major GC events, the frequent question was : is minor GC stopping the world? Spoiler alert, it does.
So the GC pauses are stop the world events, but are all stop the world events GC pauses?
So it turns out, it’s not and some of the APM tools are oblivious to that. They’re usually events that require full inspection of the memory, like thread dumps and heap dumps. In JVM world, this event is referred to as a safe point synchronization. It pauses all the threads so you can safely inspect the memory heap. Be aware that these actions will affect your application and the bigger the heap, the bigger the impact.
To measure all the stop the world pauses of your application, you can use both flags when starting your JVM. This way all the events won’t go unnoticed:
PrintGCApplicationConcurrentTime
PrintSafepointStatistics
Share this content:













Post Comment