0

6 つのボックスにまたがる weblogic クラスタがあります。各ボックスには 3 つの JVM があります。ボックス 4 の 2 つの JVM は、CPU 使用率が 10% 未満の他の JVM と比較して、非常に高い CPU 使用率 (80 ~ 90% の範囲) を示しています。

負荷分散を確認しました。リクエストは、すべての JVM に均一に分散されています。すべての JVM が GC を正しく実行しており、ガベージ コレクションに問題はありません。各 JVM には、同じ GC およびメモリ構成があります。

CPU 使用率の高いスレッドを特定する方法はありますか? JVM は運用環境の JVM であるため、JVM を再起動したり設定を変更したりすることはできません。

4

1 に答える 1

1

ボックス 4 でこのシェルを試してください。

show-busy-java-threads.sh

次のような 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)
    ....

次に、スタックをトレースして、ソース コード内でビジー状態のスレッドが何をしているかを調べます。

于 2013-12-03T00:12:40.590 に答える