Hi Rakesh,
By analyzing the attached report I can say that your application is suffering from long-running GC events. 233 GC events took more than 5.0 seconds. Long-running GCs are unfavorable for the application's performance.
Below are my observations and recommendations:
1. If you observe the Object stats section in the below image from the GC report, the avg object creation rate is 187.23 Mb/sec, This might be quite high. If it is very high, the garbage collection rate will also be very high. A high garbage collection rate will increase the GC pause time as well. Thus, optimizing the application to create fewer objects is THE EFFECTIVE strategy to reduce long GC pauses. This might be a time-consuming exercise, but it is 100% worth doing. In order to optimize the object creation rate in the application, you can consider using java profilers like JProfiler, YourKit, JVisualVM...).
2. You are setting -XX:MaxGCPauseMillis to 500 milliseconds. If you can reduce this number then JVM will try its best to meet it to reduce the pause time.
3. You have kept the JVM heap size above 16GB. Large heap size can also cause long GC pauses. If the heap size is quite high, then more garbage will be get accumulated in the heap. When Full GC is triggered to evict all the accumulated garbage in the heap, it will take a long time to complete. Logic is simple: If you have a small can full of trash, it's going to be quick and easy to dispose of them. On the other hand, if you have a truckload of trash, it's going to take more time to dispose of them.
4. Your CPU is spending more time in system calls within the kernel, as opposed to library code, which is still running in user-space. In 4 GC event(s), 'sys' time is greater than 'usr' time. It's not a healthy sign.
Edit your Comment