gpt4 book ai didi

performance - 如何使用Mule中的线程工具解决如何解决性能问题?

转载 作者:行者123 更新时间:2023-12-02 04:36:22 25 4
gpt4 key购买 nike

我正在使用Anypoint Studio 6.1和Mule 3.8.1,并且工作流程没有执行,因为线程监视看起来好像没有使用250个最大 Activity 线程,即使无限大的250个并发用户正在调用该流从JMeter 3.1开始循环。

我使用了VisualVM和YourKit之类的工具来调查问题并尝试确定解决方案。似乎大多数线程都已停放或正在等待,但是我不确定如何从线程转储和分析工具中找到最佳性能解决方案?

测试XML

<?xml version="1.0" encoding="UTF-8"?>

<mule xmlns:ee="http://www.mulesoft.org/schema/mule/ee/core"
xmlns:dw="http://www.mulesoft.org/schema/mule/ee/dw" xmlns:metadata="http://www.mulesoft.org/schema/mule/metadata" xmlns:tracking="http://www.mulesoft.org/schema/mule/ee/tracking" xmlns:json="http://www.mulesoft.org/schema/mule/json" xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns:mongo="http://www.mulesoft.org/schema/mule/mongo" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
xmlns:spring="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.mulesoft.org/schema/mule/ee/core http://www.mulesoft.org/schema/mule/ee/core/current/mule-ee.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/json http://www.mulesoft.org/schema/mule/json/current/mule-json.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.mulesoft.org/schema/mule/mongo http://www.mulesoft.org/schema/mule/mongo/current/mule-mongo.xsd
http://www.mulesoft.org/schema/mule/ee/tracking http://www.mulesoft.org/schema/mule/ee/tracking/current/mule-tracking-ee.xsd
http://www.mulesoft.org/schema/mule/ee/dw http://www.mulesoft.org/schema/mule/ee/dw/current/dw.xsd">
<ee:object-store-caching-strategy name="Caching_Strategy" doc:name="Caching Strategy">
<managed-store storeName="cacheManagedObjectStore" maxEntries="1000" entryTTL="846000" expirationInterval="846000"/>
</ee:object-store-caching-strategy>
<http:listener-config name="HTTP_Listener_Config" host="0.0.0.0" port="8081" basePath="/api" doc:name="HTTP Listener Configuration">
<http:worker-threading-profile maxThreadsActive="250" maxThreadsIdle="2" threadTTL="10000" poolExhaustedAction="WAIT" threadWaitTimeout="10000" maxBufferSize="0"/>
</http:listener-config>
<flow name="testFlow" initialState="started">
<http:listener config-ref="HTTP_Listener_Config" path="/perf-test" allowedMethods="GET" doc:name="HTTP"/>
<set-payload value="#['{&quot;EffectiveEndDateTime&quot; : null}']" doc:name="Set Payload"/>
<logger message="#[payload]" level="INFO" doc:name="Logger"/>
<ee:cache cachingStrategy-ref="Caching_Strategy" doc:name="Cache">
<mongo:find-documents config-ref="Mongo_DB__Configuration" collection="${test.collection}" doc:name="Mongo DB"/>
<json:object-to-json-transformer encoding="UTF-8" mimeType="application/json" doc:name="Object to JSON"/>
</ee:cache>
<logger level="INFO" doc:name="Logger"/>
</flow>
</mule>

监控图
enter image description here

垃圾收集
enter image description here

读取
enter image description here

enter image description here

抓取翻拍快照(完整日志太大)
2017-02-16 21:59:58
Full thread dump Java HotSpot(TM) 64-Bit Server VM (25.112-b15 mixed mode):

"[test-project].HTTP_Listener_Config.worker.147" #263 daemon prio=5 os_prio=0 tid=0x000000002636e800 nid=0x31a0 waiting on condition [0x000000003efce000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000006da7ec940> (a java.util.concurrent.SynchronousQueue$TransferStack)

Locked ownable synchronizers:
- None

"[test-project].HTTP_Listener_Config.worker.91" #207 daemon prio=5 os_prio=0 tid=0x0000000027dfc000 nid=0x1988 waiting on condition [0x000000003b7ce000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000006da7ec940> (a java.util.concurrent.SynchronousQueue$TransferStack)

Locked ownable synchronizers:
- None

"RMI TCP Connection(3)-192.168.0.16" #200 daemon prio=5 os_prio=0 tid=0x0000000027df9000 nid=0x4668 runnable [0x000000003afcd000]
java.lang.Thread.State: RUNNABLE
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
at java.io.BufferedInputStream.read(BufferedInputStream.java:265)
- locked <0x00000006d885d660> (a java.io.BufferedInputStream)
at java.io.FilterInputStream.read(FilterInputStream.java:83)
Locked ownable synchronizers:
- <0x00000006d885e008> (a java.util.concurrent.ThreadPoolExecutor$Worker)

"pool-1-thread-1" #153 daemon prio=5 os_prio=0 tid=0x0000000027bb6000 nid=0x5524 waiting on condition [0x0000000035b2f000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000006da8578e8> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)

Locked ownable synchronizers:
- None

"[test-project].HTTP_Listener_Config.worker.38" #152 daemon prio=5 os_prio=0 tid=0x0000000027bb8000 nid=0x2988 waiting on condition [0x0000000035a2f000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000006da7ec940> (a java.util.concurrent.SynchronousQueue$TransferStack)

Locked ownable synchronizers:
- None

"cluster-ClusterId{value='58a620afa3cb7258cc6cd828', description='null'}-test-project-shard-00-02.mongodb.net:27017" #151 daemon prio=5 os_prio=0 tid=0x0000000027bb9800 nid=0x33c0 waiting on condition [0x000000003495e000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000006daa03680> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
at com.mongodb.connection.DefaultServerMonitor$ServerMonitorRunnable.waitForSignalOrTimeout(DefaultServerMonitor.java:238)
at com.mongodb.connection.DefaultServerMonitor$ServerMonitorRunnable.waitForNext(DefaultServerMonitor.java:219)
at com.mongodb.connection.DefaultServerMonitor$ServerMonitorRunnable.run(DefaultServerMonitor.java:168)
- locked <0x00000006daa03650> (a com.mongodb.connection.DefaultServerMonitor$ServerMonitorRunnable)
at java.lang.Thread.run(Thread.java:745)
Locked ownable synchronizers:
- None

"cluster-ClusterId{value='58a620afa3cb7258cc6cd828', description='null'}-test-project-shard-00-01.mongodb.net:27017" #150 daemon prio=5 os_prio=0 tid=0x0000000027bbc800 nid=0x208c waiting on condition [0x000000003485f000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000006da856910> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
at com.mongodb.connection.DefaultServerMonitor$ServerMonitorRunnable.waitForSignalOrTimeout(DefaultServerMonitor.java:238)
at com.mongodb.connection.DefaultServerMonitor$ServerMonitorRunnable.waitForNext(DefaultServerMonitor.java:219)
at com.mongodb.connection.DefaultServerMonitor$ServerMonitorRunnable.run(DefaultServerMonitor.java:168)
- locked <0x00000006da8568e0> (a com.mongodb.connection.DefaultServerMonitor$ServerMonitorRunnable)
at java.lang.Thread.run(Thread.java:745)
Locked ownable synchronizers:
- None

"[test-project].HTTP_Listener_Config.worker.37" #149 daemon prio=5 os_prio=0 tid=0x0000000027bbb000 nid=0x3668 waiting on condition [0x000000003475f000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000006da7ec940> (a java.util.concurrent.SynchronousQueue$TransferStack)

Locked ownable synchronizers:
- None

"cluster-ClusterId{value='58a620afa3cb7258cc6cd828', description='null'}-test-project-shard-00-00.mongodb.net:27017" #148 daemon prio=5 os_prio=0 tid=0x0000000027bbc000 nid=0x2844 waiting on condition [0x000000003465e000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000006daacb940> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
at com.mongodb.connection.DefaultServerMonitor$ServerMonitorRunnable.waitForSignalOrTimeout(DefaultServerMonitor.java:238)
at com.mongodb.connection.DefaultServerMonitor$ServerMonitorRunnable.waitForNext(DefaultServerMonitor.java:219)
at com.mongodb.connection.DefaultServerMonitor$ServerMonitorRunnable.run(DefaultServerMonitor.java:168)
- locked <0x00000006daacb910> (a com.mongodb.connection.DefaultServerMonitor$ServerMonitorRunnable)
at java.lang.Thread.run(Thread.java:745)
Locked ownable synchronizers:
- None

"[test-project].HTTP_Listener_Config.worker.34" #145 daemon prio=5 os_prio=0 tid=0x0000000027bb9000 nid=0x274 waiting on condition [0x000000003435f000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000006da7ec940> (a java.util.concurrent.SynchronousQueue$TransferStack)

Locked ownable synchronizers:
- None

"[test-project].HTTP_Listener_Configuration.worker.02" #111 daemon prio=5 os_prio=0 tid=0x000000001d6f3000 nid=0x24a8 waiting on condition [0x0000000030d8e000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000006da86d580> (a java.util.concurrent.SynchronousQueue$TransferStack)

Locked ownable synchronizers:
- None

"[test-project].HTTP_Listener_Configuration.worker.01" #110 daemon prio=5 os_prio=0 tid=0x00000000261e7000 nid=0x4ee0 waiting on condition [0x0000000030c8e000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000006da86d580> (a java.util.concurrent.SynchronousQueue$TransferStack)

Locked ownable synchronizers:
- None

"DestroyJavaVM" #109 prio=5 os_prio=0 tid=0x00000000261e5800 nid=0x7330 waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
Locked ownable synchronizers:
- None

"Mule.app.deployer.monitor.1.thread.1" #108 prio=1 os_prio=-2 tid=0x00000000261e5000 nid=0x3d24 waiting on condition [0x000000003098f000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000006daacc138> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)

Locked ownable synchronizers:
- None

"[test-project].processing.time.monitor" #107 daemon prio=5 os_prio=0 tid=0x00000000261e6800 nid=0x6268 in Object.wait() [0x000000002f6bf000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:143)
- locked <0x00000006d7a6bc10> (a java.lang.ref.ReferenceQueue$Lock)
Locked ownable synchronizers:
- None

"[test-project].testFlow.stage1.01" #104 prio=5 os_prio=0 tid=0x00000000261dc800 nid=0x2fb4 in Object.wait() [0x000000002f3be000]
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
at org.mule.util.queue.AbstractQueueStoreDelegate.poll(AbstractQueueStoreDelegate.java:81)
- locked <0x00000006daa523b8> (a org.mule.util.queue.DefaultQueueStoreDelegate)
Locked ownable synchronizers:
- <0x00000006da6616e8> (a java.util.concurrent.ThreadPoolExecutor$Worker)


"Thread-8" #57 daemon prio=5 os_prio=0 tid=0x0000000023cec800 nid=0x30c0 waiting on condition [0x000000002c4be000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000006d9b219f8> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)

Locked ownable synchronizers:
- None

"pool-7-thread-6" #56 daemon prio=5 os_prio=0 tid=0x000000001eb5f800 nid=0x2914 waiting on condition [0x000000002bcbf000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000006d88e7270> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)

Locked ownable synchronizers:
- None

"[test-project].http.listener.HttpIdleConnectionCloser.01" #50 prio=5 os_prio=0 tid=0x00000000241cd000 nid=0x2b50 in Object.wait() [0x000000002aa2f000]
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
at org.glassfish.grizzly.utils.DelayedExecutor$DelayedRunnable.run(DelayedExecutor.java:172)
- locked <0x00000006d8bdac18> (a java.lang.Object)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

Locked ownable synchronizers:
- <0x00000006d8bbf6c0> (a java.util.concurrent.ThreadPoolExecutor$Worker)

"[test-project].http.listener.worker(8)" #49 daemon prio=5 os_prio=0 tid=0x00000000241d3800 nid=0xb34 waiting on condition [0x000000002a92f000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000006d8bcf9a8> (a java.util.concurrent.LinkedTransferQueue)

Locked ownable synchronizers:
- None

"[test-project].http.listener.worker(7)" #48 daemon prio=5 os_prio=0 tid=0x00000000241d3000 nid=0x67d4 waiting on condition [0x000000002a82e000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000006d8bcf9a8> (a java.util.concurrent.LinkedTransferQueue)

Locked ownable synchronizers:
- None

"[test-project].http.listener(5) SelectorRunner" #41 daemon prio=5 os_prio=0 tid=0x00000000241cf000 nid=0x4288 runnable [0x000000002a12e000]
java.lang.Thread.State: RUNNABLE
at sun.nio.ch.WindowsSelectorImpl$SubSelector.$$YJP$$poll0(Native Method)
at sun.nio.ch.WindowsSelectorImpl$SubSelector.poll0(WindowsSelectorImpl.java)
at sun.nio.ch.WindowsSelectorImpl$SubSelector.poll(WindowsSelectorImpl.java:296)
at sun.nio.ch.WindowsSelectorImpl$SubSelector.access$400(WindowsSelectorImpl.java:278)
at sun.nio.ch.WindowsSelectorImpl.doSelect(WindowsSelectorImpl.java:159)
at sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:86)
- locked <0x00000006da0f16c0> (a sun.nio.ch.Util$3)
- locked <0x00000006da0f16d8> (a java.util.Collections$UnmodifiableSet)
- locked <0x00000006d8a843c0> (a sun.nio.ch.WindowsSelectorImpl)
at sun.nio.ch.SelectorImpl.select(SelectorImpl.java:97)
at org.glassfish.grizzly.nio.DefaultSelectorHandler.select(DefaultSelectorHandler.java:115)
Locked ownable synchronizers:
- None

"[test-project].http.listener(4) SelectorRunner" #40 daemon prio=5 os_prio=0 tid=0x000000001efaa000 nid=0x2bb0 runnable [0x000000002a02f000]
java.lang.Thread.State: RUNNABLE
at sun.nio.ch.WindowsSelectorImpl$SubSelector.$$YJP$$poll0(Native Method)
at sun.nio.ch.WindowsSelectorImpl$SubSelector.poll0(WindowsSelectorImpl.java)
at sun.nio.ch.WindowsSelectorImpl$SubSelector.poll(WindowsSelectorImpl.java:296)
at sun.nio.ch.WindowsSelectorImpl$SubSelector.access$400(WindowsSelectorImpl.java:278)
at sun.nio.ch.WindowsSelectorImpl.doSelect(WindowsSelectorImpl.java:159)
at sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:86)
- locked <0x00000006d8bdac48> (a sun.nio.ch.Util$3)
- locked <0x00000006d8bdac60> (a java.util.Collections$UnmodifiableSet)
- locked <0x00000006d8770f40> (a sun.nio.ch.WindowsSelectorImpl)
at sun.nio.ch.SelectorImpl.select(SelectorImpl.java:97)
Locked ownable synchronizers:
- None

"Log4j2-AsyncLoggerConfig-4" #36 daemon prio=5 os_prio=0 tid=0x000000001daee000 nid=0x6afc waiting on condition [0x0000000026f1e000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000006d9a27c00> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
Locked ownable synchronizers:
- <0x00000006d6fa29f8> (a java.util.concurrent.ThreadPoolExecutor$Worker)

"[test-project].Mule.01" #35 prio=5 os_prio=0 tid=0x000000001daec800 nid=0x114c waiting on condition [0x000000002544e000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000006d808bcc0> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
Locked ownable synchronizers:
- <0x00000006d80a0ae8> (a java.util.concurrent.ThreadPoolExecutor$Worker)

"Log4j2-AsyncLoggerConfig-3" #34 daemon prio=5 os_prio=0 tid=0x000000001daeb800 nid=0x6274 runnable [0x0000000024b4e000]
java.lang.Thread.State: RUNNABLE
at java.io.FileOutputStream.writeBytes(Native Method)
at java.io.FileOutputStream.write(FileOutputStream.java:326)
at java.io.BufferedOutputStream.write(BufferedOutputStream.java:122)
- locked <0x00000006d697bce0> (a java.io.BufferedOutputStream)
at java.io.PrintStream.write(PrintStream.java:480)
- locked <0x00000006d68e2f20> (a java.io.PrintStream)
at org.apache.logging.log4j.core.util.CloseShieldOutputStream.write(CloseShieldOutputStream.java:50)
at org.apache.logging.log4j.core.appender.OutputStreamManager.write(OutputStreamManager.java:123)
- locked <0x00000006d6c8f7f0> (a org.apache.logging.log4j.core.appender.OutputStreamManager)
at org.apache.logging.log4j.core.appender.OutputStreamManager.write(OutputStreamManager.java:136)
Locked ownable synchronizers:
- <0x00000006d80a0b18> (a java.util.concurrent.ThreadPoolExecutor$Worker)

"Log4j2-AsyncLoggerConfig-2" #28 daemon prio=5 os_prio=0 tid=0x000000001daef800 nid=0x6eec waiting on condition [0x000000002327f000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000006d7a78c00> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
Locked ownable synchronizers:
- <0x00000006d6e6d4a0> (a java.util.concurrent.ThreadPoolExecutor$Worker)

"agw-policy-watcher" #27 prio=5 os_prio=0 tid=0x000000001daf1000 nid=0x1870 waiting on condition [0x000000002317f000]
java.lang.Thread.State: TIMED_WAITING (sleeping)
at java.lang.Thread.sleep(Native Method)
at org.apache.commons.io.monitor.FileAlterationMonitor.run(FileAlterationMonitor.java:188)
at java.lang.Thread.run(Thread.java:744)
Locked ownable synchronizers:
- None

"MapDB writer #2" #24 daemon prio=5 os_prio=0 tid=0x000000001daf0000 nid=0x6984 waiting on condition [0x000000002307f000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:338)
at org.mapdb.AsyncWriteEngine$WriterRunnable.run(AsyncWriteEngine.java:165)
at java.lang.Thread.run(Thread.java:744)
Locked ownable synchronizers:
- None

"MapDB writer #1" #22 daemon prio=5 os_prio=0 tid=0x000000001daee800 nid=0x6098 waiting on condition [0x0000000022f7f000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:338)
at org.mapdb.AsyncWriteEngine$WriterRunnable.run(AsyncWriteEngine.java:165)
at java.lang.Thread.run(Thread.java:744)
Locked ownable synchronizers:
- None

"JMX server connection timeout 21" #21 daemon prio=5 os_prio=0 tid=0x000000001e58f800 nid=0x3d50 in Object.wait() [0x0000000022e7f000]
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
at com.sun.jmx.remote.internal.ServerCommunicatorAdmin$Timeout.run(ServerCommunicatorAdmin.java:168)
- locked <0x00000006d6e7e948> (a [I)
Locked ownable synchronizers:
- None

"RMI Scheduler(0)" #20 daemon prio=5 os_prio=0 tid=0x000000001dba8800 nid=0x3590 waiting on condition [0x0000000022d7e000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000006d68e1878> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
Locked ownable synchronizers:
- None

"Log4j2-AsyncLoggerConfig-1" #19 daemon prio=5 os_prio=0 tid=0x000000001d920000 nid=0x334 waiting on condition [0x0000000022c7f000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000006d68e99c0> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
Locked ownable synchronizers:
- <0x00000006d68f47e0> (a java.util.concurrent.ThreadPoolExecutor$Worker)

"RMI TCP Connection(2)-192.168.0.16" #18 daemon prio=5 os_prio=0 tid=0x000000001da4a000 nid=0x4eb8 runnable [0x0000000022b7d000]
java.lang.Thread.State: RUNNABLE
at java.net.SocketInputStream.socketRead0(Native Method)
- locked <0x00000006daa99310> (a java.io.BufferedInputStream)
at java.io.FilterInputStream.read(FilterInputStream.java:83)
Locked ownable synchronizers:
- <0x00000006d68e9ba0> (a java.util.concurrent.ThreadPoolExecutor$Worker)

"RMI TCP Accept-0" #17 daemon prio=5 os_prio=0 tid=0x000000001d793000 nid=0x273c runnable [0x000000002297e000]
java.lang.Thread.State: RUNNABLE
at java.net.TwoStacksPlainSocketImpl.socketAccept(Native Method)
at java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:409)
at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:199)
- locked <0x00000006d68eded0> (a java.net.SocksSocketImpl)
at java.net.ServerSocket.implAccept(ServerSocket.java:545)
Locked ownable synchronizers:
- None

"Service Thread" #13 daemon prio=9 os_prio=0 tid=0x000000001b40e800 nid=0x1478 runnable [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
Locked ownable synchronizers:
- None

"C1 CompilerThread2" #12 daemon prio=9 os_prio=2 tid=0x000000001bdcc800 nid=0x6d1c waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
Locked ownable synchronizers:
- None

"C2 CompilerThread1" #11 daemon prio=9 os_prio=2 tid=0x000000001bdcb800 nid=0x1448 waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
Locked ownable synchronizers:
- None

"C2 CompilerThread0" #10 daemon prio=9 os_prio=2 tid=0x000000001b40a000 nid=0x4144 waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
Locked ownable synchronizers:
- None

"VM JFR Buffer Thread" #9 daemon prio=5 os_prio=0 tid=0x000000001b3fc000 nid=0x5e30 waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
Locked ownable synchronizers:
- None

"JFR request timer" #7 daemon prio=5 os_prio=0 tid=0x0000000021824000 nid=0x135c in Object.wait() [0x000000002207e000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x00000006d68e18c0> (a java.util.TaskQueue)
at java.lang.Object.wait(Object.java:502)
at java.util.TimerThread.mainLoop(Timer.java:526)
- locked <0x00000006d68e18c0> (a java.util.TaskQueue)
at java.util.TimerThread.run(Timer.java:505)
Locked ownable synchronizers:
- None

"Attach Listener" #6 daemon prio=5 os_prio=2 tid=0x000000001b2b6800 nid=0x1008 waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
Locked ownable synchronizers:
- None

"Signal Dispatcher" #5 daemon prio=9 os_prio=2 tid=0x000000001b2b5000 nid=0x2da8 runnable [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
Locked ownable synchronizers:
- None

"Surrogate Locker Thread (Concurrent GC)" #4 daemon prio=9 os_prio=0 tid=0x000000001b2be000 nid=0xdd8 waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
Locked ownable synchronizers:
- None

"Finalizer" #3 daemon prio=8 os_prio=1 tid=0x0000000021474800 nid=0x6fa0 in Object.wait() [0x0000000021c7f000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:143)
- locked <0x00000006d68e18d8> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:164)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:193)
Locked ownable synchronizers:
- None

"Reference Handler" #2 daemon prio=10 os_prio=2 tid=0x000000002144d800 nid=0x6b30 in Object.wait() [0x0000000021b7f000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:502)
at java.lang.ref.Reference.tryHandlePending(Reference.java:191)
- locked <0x00000006d68e99f0> (a java.lang.ref.Reference$Lock)
at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:153)
Locked ownable synchronizers:
- None

"VM Thread" os_prio=2 tid=0x0000000021441000 nid=0x5ad8 runnable

"Gang worker#0 (Parallel GC Threads)" os_prio=2 tid=0x0000000001875800 nid=0x401c runnable

"Gang worker#1 (Parallel GC Threads)" os_prio=2 tid=0x0000000001876000 nid=0x6060 runnable

"Gang worker#2 (Parallel GC Threads)" os_prio=2 tid=0x0000000001877800 nid=0x1fc runnable

"Gang worker#3 (Parallel GC Threads)" os_prio=2 tid=0x0000000001879000 nid=0x4a5c runnable

"Concurrent Mark-Sweep GC Thread" os_prio=2 tid=0x00000000018bd800 nid=0x17b8 runnable

"VM Periodic Task Thread" os_prio=2 tid=0x000000001be76800 nid=0x4dd0 waiting on condition

JNI global references: 17658

最佳答案

问题描述似乎不正确。您提到“看起来好像没有使用250个最大 Activity 线程”。那是问题吗?如果处理效率足够高,能够以比资源使用量少的资源使用量来回答所有请求,那为什么会成为问题呢?您需要澄清是否遇到与此相关的实际问题。

线程转储通常用于查找线程锁定问题,或在某些任务中线程明显延迟。对于性能问题,最好使用分析器,例如YourKit或VisualVM中较为有限的一种。同样,您需要更清楚地定义问题,以查看要使用的正确工具是什么。

关于performance - 如何使用Mule中的线程工具解决如何解决性能问题?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42298950/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com