Profile Image
Pedro Llanten

long garbage collection times

We are receiving warnings about very long garbage collection times for our Liferay platform, which works on a JVM. What can you suggest to correct these alerts?

Your help please. These are the values of our JVM

" - XX:+PrintGCApplicationStoppedTime -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/opt/liferay/data/heap_dumps -XX:+PrintGCDateStamps -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=50M",


Report URL - https://fastthread.io/my-gc-report.jsp?p=c2hhcmVkLzIwMjQvMDIvMjIvbGlmZXJheWdjMS5sb2dfMjAwMjIwMjQuemlwLS0xNy0zNi01MA==&channel=WEB

    Please Sign In or to post your comment or answer

    Profile Image

    Ram Lakshmanan

    Hello Pedro!

     

     I reviewed your GC log analysis report. Below are my observations:

     

    a. Long Pauses happening around the same time

     Below is your Pause GC duration graph from your report. If you notice Long GC pauses are happening around the same (Feb' 19 2:20pm - 4:15pm and then Feb' 20 8:30pm - 9:15pm). This type of behaviour can happen when there is spike in the traffic around that time. Can you check whether your application was processing high amount of traffic volume at this time frame? Was a batch process running at this time period? Is there any way to can regulate this traffic? Adding a new JVM at this time period can remove memory pressure on the application, thus reduce GC pause time as well.

     

     

    b. CMS GC algorithm

    Your application is using CMS GC algorithm. This is algorithm is a good algorithm until it breaks (like this). It's known for notorious long GC pause. You might consider switching to a G1 GC algorithm. Read this success story by swtiching from CMS GC algorithm to G1 GC algorithm for this robotics application.

     

    c. Remove System.gc()

     More than 1 minute of GC pauses are caused because your application source code (or 3rd party libraries) it's using is invoking System.gc() call. It's a wrong practise. Consider passing -XX:+DisableExplicitGC.

     

     

    Profile Image

    Pedro Llanten

    Thank you very much for your suggestions RAM, I will review them with my supervisor. I appreciate your clarity and speed in your responses.


    Have a very good day

    Got something else on mind? Post Your Question