我们有一个跨6个盒子的weblogic集群。每个盒子有3个JVM。 与其他CPU利用率低于10%的JVM相比,第4盒上的2个JVM显示出非常高的CPU利用率(在80-90%范围内)。
我们检查了负载平衡。请求将统一分发到所有JVM。所有JVM都正确地执行GC,垃圾收集没有问题。每个JVM都具有相同的GC和内存配置。
有没有办法弄清楚什么线程正在使用高CPU?我们无法重新启动JVM或修改它们上的任何设置,因为它们是生产JVM。
答案 0 :(得分:1)
它将显示如下的java忙线程:
The stack of busy(0.2%) thread(3901/0xf3d) of java process(3626) of user(zuojing):
"ApplicationImpl pooled thread 16" daemon prio=10 tid=0x00007fbd54076000 nid=0xf3d waiting on condition [0x00007fbcd9636000]
java.lang.Thread.State: TIMED_WAITING (sleeping)
at java.lang.Thread.sleep(Native Method)
at com.intellij.util.TimeoutUtil.sleep(TimeoutUtil.java:58)
at com.intellij.util.io.BaseOutputReader.doRun(BaseOutputReader.java:116)
at com.intellij.util.io.BaseOutputReader$1.run(BaseOutputReader.java:57)
at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:454)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:701)
at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:152)
The stack of busy(0.2%) thread(3897/0xf39) of java process(3626) of user(zuojing):
"ApplicationImpl pooled thread 15" daemon prio=10 tid=0x00007fbd1c39b800 nid=0xf39 waiting on condition [0x00007fbcd9838000]
java.lang.Thread.State: TIMED_WAITING (sleeping)
at java.lang.Thread.sleep(Native Method)
at com.intellij.util.TimeoutUtil.sleep(TimeoutUtil.java:58)
at com.intellij.util.io.BaseOutputReader.doRun(BaseOutputReader.java:116)
at com.intellij.util.io.BaseOutputReader$1.run(BaseOutputReader.java:57)
at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:454)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:701)
....