This easily could be garbage collector affecting performance of your application. Try to monitor GC cycles with following command:
jstat -gccause <pid-of-java-process> 200
and see is there any correlation between spikes and GC activity. Jstat provides following output:
100.00 0.00 5.63 86.19 60.53 768 4.165 16 0.796 4.960 unknown GCCause No GC
0.00 96.01 0.00 87.15 60.53 769 4.172 16 0.796 4.967 unknown GCCause No GC
0.00 96.01 82.86 87.15 60.54 770 4.172 16 0.796 4.967 unknown GCCause Allocation Failure
75.27 0.00 69.29 87.15 60.54 770 4.175 16 0.796 4.971 unknown GCCause No GC
0.00 94.75 16.33 87.30 60.56 771 4.179 16 0.796 4.975 unknown GCCause No GC
41.07 0.00 0.00 87.69 60.59 772 4.184 16 0.796 4.980 unknown GCCause No GC
When you see Allocation failure
this means full GC is started in cause of wanted memory.
Btw, jstat
is part of JDK distribution, so it's must be installed.