Java application’s performance tuning

I guess all of us will agree that while writing a clean code for Java application is one thing, making it performant is another skill. In this blog, I will try to highlight some of the key facts which a Java developer/architect/performance engineer needs to be aware for detecting possible reasonsn for performance issues in Java application.

Some basic high level facts of Java memory and garbage collection

In the next few lines, I would just touch upon some of the basic facts for JVM memory management and Java Garbage Collection basics which every Java developer should be aware of. Esssentially, the JVM heap memory is divided into the following components:

There are 2 types of garbage collection (GC):

Also following are the main types of GC threads available in JVM:

Following are some of the most important types of OutOfmemory(OOM) error:

What are some common steps to rectify Java performance issues ?

Now that you have a got a brief idea about JVM memory/ heap space sub divisions and GC and OOM errors, let me quickly suggest a few most common steps to address java performance issues: