Hello!
Glad to hear that you were able to reduce the GC pause time from 52seconds to 10seconds. Great Job. When you tune GC performance, you are not only reducing GC pause time, but also improving overall application's response time and reducing computing cost. Reducing Response Time & computing Cost is what you need to showcase to your management. They will not recgonize GC pause time improvements. Read more about GC tuning benefits here.
Here are few suggestions tips to reduce your G1 GC pause time even further:
a. Your application is suffering from 'G1_EVACUATION_PAUSE'. Here are the tips given by the GCeasy tool (i.e. in the paid subscription) to reduce type of GC events:
- 6 min 32 sec 969 ms of GC pause time is triggered by 'G1_EVACUATION_PAUSE' event. This GC is triggered when copying live objects from one set of regions to another set of regions. When Young generation regions are only copied then Young GC is triggered. When both Young + Tenured regions are copied, Mixed GC is triggered..
Solution:
1. Evacuation failure might happen because of over tuning. So eliminate all the memory related properties and keep only min and max heap and a realistic pause time goal (i.e. Use only -Xms, -Xmx and a pause time goal -XX:MaxGCPauseMillis). Remove any additional heap sizing such as -Xmn, -XX:NewSize, -XX:MaxNewSize, -XX:SurvivorRatio, etc.
2. If the problem still persists then increase JVM heap size (i.e. -Xmx).
3. If you can't increase the heap size and if you notice that the marking cycle is not starting early enough to reclaim the old generation then reduce -XX:InitiatingHeapOccupancyPercent. The default value is 45%. Reducing the value will start the marking cycle earlier. On the other hand, if the marking cycle is starting early and not reclaiming, increase the -XX:InitiatingHeapOccupancyPercent threshold above the default value.
4. You can also increase the value of the '-XX:ConcGCThreads' argument to increase the number of parallel marking threads. Increasing the concurrent marking threads will make garbage collection run fast.
5. Increase the value of the '-XX:G1ReservePercent' argument. Default value is 10%. It means the G1 garbage collector will try to keep 10% of memory free always. When you try to increase this value, GC will be triggered earlier, preventing the Evacuation pauses. Note: G1 GC caps this value at 50%.
b. You can consider playing with the following G1 GC flags to tune it further.
c. Here is a free youTube video talk on GC tuning. It share high level general tips for GC tuning.
d. If you want learn more in-depth about GC tuning strategies, tips & techniques, you may enroll in this online JVM Performance Masterclass.
Edit your Comment