Profiling shows 0 time spent in GC
-
- Posts: 5
- Joined: Wed Dec 02, 2020 4:06 pm
Profiling shows 0 time spent in GC
The profiling results shows zero time spent in GC in the CPU tab, but Memory tab shows frequent GC pauses. What could it be?
-
- Posts: 6172
- Joined: Wed Aug 11, 2004 8:37 am
Re: Profiling shows 0 time spent in GC
The GC time is reported by the JVM, the profiler shows it as reported.
What JVM and garbage collector do you use?
What is the platform?
What JVM and garbage collector do you use?
What is the platform?
-
- Posts: 5
- Joined: Wed Dec 02, 2020 4:06 pm
Re: Profiling shows 0 time spent in GC
OpenJDK 64-Bit Server VM; 1.8.0_111-internal; 25.111-b14; mixed mode
-
- Posts: 6172
- Joined: Wed Aug 11, 2004 8:37 am
Re: Profiling shows 0 time spent in GC
You provided no information about the platform (OS) and the GC options used.
Anyway, you're using very old ("1.8.0_111") and likely customized or non-release ("internal") build.
I suggest to try the newest JVM build for your platform from one of prominent OpenJDK vendors.
Anyway, you're using very old ("1.8.0_111") and likely customized or non-release ("internal") build.
I suggest to try the newest JVM build for your platform from one of prominent OpenJDK vendors.
-
- Posts: 5
- Joined: Wed Dec 02, 2020 4:06 pm
Re: Profiling shows 0 time spent in GC
These are the flags passed to the jvm:
-javaagent:/var/lib/aspectjweaver.jar
-agentpath:/app/libyjpagent.so
-server
-XX:+UseConcMarkSweepGC
-XX:+UseCondCardMark
-XX:-UseBiasedLocking
-Xms1024m
-Xss1m
-javaagent:/var/lib/aspectjweaver.jar
-agentpath:/app/libyjpagent.so
-server
-XX:+UseConcMarkSweepGC
-XX:+UseCondCardMark
-XX:-UseBiasedLocking
-Xms1024m
-Xss1m
-
- Posts: 6172
- Joined: Wed Aug 11, 2004 8:37 am
Re: Profiling shows 0 time spent in GC
Perhaps JVM does not fully accounts GC activities happening in background GC threads. As I suggested, please try a newer JVM to compare.
Anyway, the profiler cannot do anything to improve accuracy of reported GC CPU times which are supplied by the JVM.
Despite the CPU usage numbers, if there are many GC pauses, there must be significant GC activity. The profiler can help locating the code causing excessive allocations: https://www.yourkit.com/docs/java/help/excessive_gc.jsp
Anyway, the profiler cannot do anything to improve accuracy of reported GC CPU times which are supplied by the JVM.
Despite the CPU usage numbers, if there are many GC pauses, there must be significant GC activity. The profiler can help locating the code causing excessive allocations: https://www.yourkit.com/docs/java/help/excessive_gc.jsp