What is Garbage Collection Performance Tuning in Java
This is a quick tutorial on Garbage Collection Performance Tuning in Java.
The Java garbage collection process is one of the most important contributing factors for optimal application performance. In order to provide efficient garbage collection, the heap is essentially divided into two sub areas:
- Young generation (nursery space)
- Old generation (tenured space)
Choosing the right garbage collector for your application is a determinant factor for optimal application performance, scalability, and reliability. The GC algorithms are included in the table below:
When evaluating application performance, most of the time you won’t have to worry about configuring garbage collection. However, if you are seeing that your application performance degrades significantly during garbage collection, you do have a lot of control over garbage collection. Concepts like generation size, throughput, pauses, footprint, and promptness can all be tuned.
For more information on performance metric types, please refer to Oracle’s Java 8 documentation on GC tuning.