0

some the k8s pod's cpu suddenly increase to 100% , and i find out the C2 compileThread takes long time;

"C2 CompilerThread0" #6 daemon prio=9 os_prio=0 tid=0x00007f6c9416b800 nid=0xf runnable [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

   Locked ownable synchronizers:
    - None

the codecache is not full, but reduce a lot; and service is normal;

codecache:

enter image description here

i restart the pod, but after some day, it happens again;

how can i solve the problem ? why ??

Lajos Arpad
  • 64,414
  • 37
  • 100
  • 175
  • What happens if you DON'T restart the pod? Does the CPU usage drop back to normal after a few minutes? Hours? This could just be "normal behavior" when you run a Java large application in a pod with insufficient resources (e.g. cores) ... and the JIT compiler gets busy. – Stephen C Jul 09 '23 at 02:15
  • The thread dump line showing the C2 thread state doesn't reveal anything or indicate any abnormal activity. – boneill Jul 09 '23 at 02:20
  • 1
    If something is actually wrong, you will need to investigate what the JIT compiler is doing. See https://theboreddev.com/java-jit-compiler-explained-part-1/ for some hints on what to look for. Start by turning on JIT compiler logging .... – Stephen C Jul 09 '23 at 02:21
  • 1
    Thanks a lot; if dont't restart the pod, the cpu usage will not drop back to normal ater a few days, it keeps in high level ; and the codecache keeps falling. – Yan Zheng Jul 09 '23 at 14:21

0 Answers0