If you want to learn more about performance tuning and garbage collection in Java, this article by Tim Ojo is for you.
Garbage collection is the mechanism by which the JVM reclaims memory on behalf of the application when it’s no longer needed. At a high level, it consists of finding objects that are no longer in use, freeing the memory associated with those objects, and occasionally compacting the heap to prevent memory fragmentation.
The garbage collector performs it’s work using one or more threads. But in order to do the job of tracking down object references and moving objects around in memory, it needs to make sure that the application threads are not currently using those objects. The garbage collectors must pause all application threads when performing certain tasks.
The article explains:
- Sizing the Heap
- Tuning GC Performance
- Fixing Concurrent Mode Failures
Good introduction with various parameters and flags explained. Happy tuning![Read More]