Upload your JVM GC and safepoint logs for analysis
pl_PL locale).gcCollector field
with cURL).-Xlog:codecache=info,
codecache+sweep*=trace,
class+unload,
class+load,
os+thread,
safepoint,
gc*,
gc+stringdedup=debug,
stringdedup*=debug,
gc+ergo=trace,
gc+age=trace,
gc+phases=trace,
gc+humongous=trace,
gc+heap=trace,
gc+tlab=trace,
jit+compilation=debug
:file=/tmp/app.log
:level,tags,time,uptime
:filesize=104857600,filecount=5
-Xlog:safepoint,
gc*,
gc+heap=trace,
gc+age=trace,
gc+phases=trace,
gc+humongous=trace
:file=/tmp/app.log
:level,tags,time,uptime
-XX:+PrintGCDetails
-XX:+PrintGCDateStamps
-XX:+PrintGCTimeStamps
-XX:+PrintTenuringDistribution
-XX:+PrintGCApplicationStoppedTime
-XX:+PrintGCApplicationConcurrentTime
-XX:+PrintSafepointStatistics
-XX:PrintSafepointStatisticsCount=1
JDK 8 prints the GC log and the safepoint statistics to the standard output, save it to a file, e.g. java ... > /tmp/app.log. Do not add -Xloggc (the GC log would be separated from the safepoint statistics) nor -XX:+LogVMOutput (it escapes the output as XML).
sudo -u JVM_USER jcmd `pgrep -x java` VM.log
output="file=/PATH/TO/gc.log"
output_options="filesize=104857600,filecount=5"
what="codecache=info,codecache+sweep*=trace,class+unload,class+load,os+thread,safepoint,gc*,gc+stringdedup=debug,stringdedup*=debug,gc+ergo=trace,gc+age=trace,gc+phases=trace,gc+humongous=trace,gc+heap=trace,gc+tlab=trace,jit+compilation=debug"
decorators="level,tags,time,uptime,pid"