Java 为什么阻止 weblogic.socket.Muxer 线程在 webogic 中是可以接受的?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/20424680/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-13 01:50:50  来源:igfitidea点击:

Why blocking weblogic.socket.Muxer Threads are acceptable in webogic?

javamultithreadingsocketsweblogic

提问by Vipin

Ιs it really a blocking issue in my Application?

这真的是我的应用程序中的阻塞问题吗?

weblogic.socket.DevPollSocketMuxer.processSockets(DevPollSocketMuxer.java:92)shows blocking in thread analyzer , is it really a blocking thread I should worry about?

weblogic.socket.DevPollSocketMuxer.processSockets(DevPollSocketMuxer.java:92)在线程分析器中显示阻塞,它真的是我应该担心的阻​​塞线程吗?

ExecuteThread: '3' for queue: 'weblogic.socket.Muxer'"   daemon prio=3 tid=0x0000000101f38000 nid=0x38 waiting for monitor entry [0xfffffffe40dff000]      
java.lang.Thread.State: BLOCKED (on object monitor)      at 
weblogic.socket.DevPollSocketMuxer.processSockets(DevPollSocketMuxer.java:92)      - 
waiting to lock <0xfffffffe70ec4898> (a java.lang.String)      at 
weblogic.socket.SocketReaderRequest.run(SocketReaderRequest.java:29)      at 
weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:42)      at 
weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:145)      at 
weblogic.kernel.ExecuteThread.run(ExecuteThread.java:117)

EDIT:

编辑:

I got a linkexplaining answer ( Which says its not an issue) but Not sure what purpose can a blocked Thread serve ? Why it is designed in this way? So changing title of question as below

我得到了一个解释答案的链接(它说这不是问题)但不确定阻塞的线程可以用于什么目的?为什么它是这样设计的?所以改变问题的标题如下

Old Title- weblogic.socket.DevPollSocketMuxer.processSockets shows blocking in thread analyzer , is it really a blocking thread I should worry about?

旧标题 weblogic.socket.DevPollSocketMuxer.processSockets 在线程分析器中显示阻塞,这真的是我应该担心的阻​​塞线程吗?

New Title -Why blocking weblogic.socket.Muxer Threads are acceptable ? What purpose will it serve?

新标题 - 为什么阻止 weblogic.socket.Muxer 线程是可以接受的?它将服务于什么目的?

采纳答案by Ale?

Observing Muxer threads to be blocked is not an issue and this is a normal behavior. You should not worry about this.

观察到被阻塞的 Muxer 线程不是问题,这是正常行为。你不应该担心这个。

The muxer threads contend for the poll lock to poll on the file descriptors, so a large number of threads does not add any benefit. One Muxer thread is usually in the poll function, while the others are available to process requests. The polling thread is visible in a thread dump.

muxer 线程争夺轮询锁以轮询文件描述符,因此大量线程不会增加任何好处。一个多路复用器线程通常在轮询函数中,而其他线程可用于处理请求。轮询线程在线程转储中可见。

Here is more detail on this :

这里有更多细节:

One can see that both ExecuteThread:'5' and '4' are belonging to the weblogic.socket.Muxer queue with ExecuteThread:'5' holding a lock on java/lang/String@0x17674d0c8 and ExecuteThread: '4' blocking for the same lock. The Muxer thread holding the lock is doing a native poll while other muxer threads are blocked as there can be only one thread doing poll on a set of fds.

可以看到 ExecuteThread:'5' 和 '4' 都属于 weblogic.socket.Muxer 队列,其中 ExecuteThread:'5' 持有对 java/lang/String@0x17674d0c8 和 ExecuteThread: '4' 阻塞的锁一样的锁。持有锁的 Muxer 线程正在进行本地轮询,而其他 muxer 线程被阻塞,因为只能有一个线程对一组 fd 进行轮询。

Other resources:

其他资源:

Muxer thread tuning:

多路复用器线程调整:

Even though the threads remain BLOCKED in your thread dump and you do not need to worry about this, you always need to check that you an appropriate number of threads allocated for your WLS instance - based on number of available cores per WLS instance. See Weblogic Tuning - Tuning Muxers.

即使线程在您的线程转储中保持 BLOCKED 并且您不必担心这一点,您始终需要检查是否为您的 WLS 实例分配了适当数量的线程 - 基于每个 WLS 实例的可用内核数。请参阅Weblogic 调优 - 调优多路复用器